omnipay-wechatpay
omnipay-wechatpay copied to clipboard
Confirming to Omnipay
Someone one says omnipay-wechatpay does not confirm as from the link, https://aimeos.org/help/viewtopic.php?f=18&t=2287&start=0
Please comment.
Regards,
The used parameter names are not conforming to the Omnipay standard. Current:
$order = [
'body' => 'The test order',
'out_trade_no' => date('YmdHis').mt_rand(1000, 9999),
'total_fee' => 1, //=0.01
'spbill_create_ip' => 'ip_address',
'fee_type' => 'CNY'
];
Official parameter names:
$order = [
'description' => 'The test order',
'transactionId' => date('YmdHis').mt_rand(1000, 9999),
'amount' => '0.01', // must be multiplied by 100 in the driver
'clientIp' => 'ip_address',
'currency' => 'CNY',
'language' => 'zh'
];
This causes the driver not to work in applications implementing the Omnipay standard parameter names if no special handling is applied to convert the parameter names
The aimeos thread has reached a point where aimeos can get 'SUCCESS' return from wechatpay gatway. But it complained 'request_params' xml2array parsing error. Please help if you can.
https://aimeos.org/help/viewtopic.php?f=18&t=2287&start=30
We are not experts in what the Omnipay driver expects. If the usage guide (https://github.com/lokielse/omnipay-wechatpay#usage) doesn't help, you should dig into the code of the WechatPay driver to see what it expects.