每当我尝试捕获信用卡付款时,我都会从 omnipay 桥接器收到此错误:
Credit card details has to be set explicitly or there has to be an action that supports ObtainCreditCard request.
这是我的代码:
//...
$payum = (new PayumBuilder())
->addDefaultStorages()
->addGateway('paymentexpress_pxpost', ['factory' => 'omnipay_paymentexpress_pxpost', 'username' => 'some_username', 'password'=>'some_password'])
->getPayum();
$card = [
'number' => $request->input('cc_number'),
'expiryMonth' => $request->input('expiry_month'),
'expiryYear' => $request->input('expiry_year'),
'cvv' => $request->input('cvv'),
'name' => $request->input('card_name')
];
$payment = new ArrayObject(['amount' => '1.00', 'currency' => 'AUD', 'card' => $card]);
if ($reply = $payum->getGateway('paymentexpress_pxpost')->execute(new Capture($payment), true)) {
// convert reply to http response
}
//...
该->execute()
函数是引发错误的函数。我还从错误中提到了相同的问题:必须明确设置信用卡详细信息,或者必须有一个支持获取信用卡请求的操作。