Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirming to Omnipay #116

Open
godadada opened this issue Jan 15, 2022 · 3 comments
Open

Confirming to Omnipay #116

godadada opened this issue Jan 15, 2022 · 3 comments

Comments

@godadada
Copy link

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,

@aimeos
Copy link

aimeos commented Jan 18, 2022

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

@godadada
Copy link
Author

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

@aimeos
Copy link

aimeos commented Mar 16, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants