-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Description
The used parameter names are not conforming to the Omnipay standard.
Current:
$order = [
'subject' => 'The test order',
'out_trade_no' => date('YmdHis') . mt_rand(1000, 9999),
'total_amount' => '0.01',
'product_code' => 'FAST_INSTANT_TRADE_PAY',
];
Official parameter names:
$order = [
'description' => 'The test order',
'transactionId' => date('YmdHis').mt_rand(1000, 9999),
'amount' => '0.01',
'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.
Furthermore, require to call the setBizContent() method is custom to the driver and will also don't work. Instead, the data must be passed to the purchase method.
$response = $gateway->purchase([
'description' => 'The test order',
'transactionId' => date('YmdHis').mt_rand(1000, 9999),
'amount' => '0.01',
'clientIp' => 'ip_address',
'currency' => 'CNY',
'language' => 'zh'
])->send();
Metadata
Metadata
Assignees
Labels
No labels