Why can't I generate a QR code?
尾生
尾生 2019-03-20 10:27:41
0
1
2326

class Index
{
public function index()
$input = new \WxPayUnifiedOrder();
// Set product description
$input->SetBody('Test product');
// Set order number
$input->SetOut_trade_no (date('YmdHis'));
//Set the order amount (unit: cents)
$input->SetTotal_fee('1');
//Set the asynchronous notification address
$ input->SetNotify_url('http://www.php.wx/index.php/index/Notify/index');
//Set transaction type
$input->SetTrade_type('NATIVE' );
// Set product ID
$input->SetProduct_id('123456780');
// Call unified order API
$result= \WxPayAPI::unifiedOrder($input) ;
               // Generate QR code
                $code_url = $result['code_url'];
      $img = '<img src=http://paysdk.weixin.qq.com/example/ qrcode.php?data='.urlencode($code_url).' />';
echo $img;

尾生
尾生

reply all(1)
原始刻意

Is it ok?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template