omnipay-wechatpay icon indicating copy to clipboard operation
omnipay-wechatpay copied to clipboard

Confirming to Omnipay

Open godadada opened this issue 3 years ago • 3 comments

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,

godadada avatar Jan 15 '22 04:01 godadada

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

aimeos avatar Jan 18 '22 09:01 aimeos

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

godadada avatar Mar 15 '22 23:03 godadada

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.

aimeos avatar Mar 16 '22 06:03 aimeos