您知道通用錯誤消息如何幫助不大。Omni支付 - 支付通用錯誤
我想讓Omnipay與Pin Payments一起工作。
這是我到目前爲止有:
<?php
require 'vendor/autoload.php';
use Omnipay\CreditCard;
use Omnipay\Common\GatewayFactory;
$gateway = GatewayFactory::create('Pin');
$gateway->setSecretKey('KEY'); // TEST
$formData = ['number' => '4111111111111111', 'cvv' => '333','expiryMonth' => 6, 'expiryYear' => 2016];
$response = $gateway->purchase([
'email' => '[email protected]',
'description' => 'Widgets',
'amount' => '49.99',
'currency' => 'USD',
'card_token' => 'card_nytGw7koRg23EEp9NTmz9w',
'testMode' => true,
'ip_address' => '203.192.1.172',
'card' => $formData
])->send();
if ($response->isSuccessful()) {
// payment was successful: update database
print_r($response);
} elseif ($response->isRedirect()) {
// redirect to offsite payment gateway
$response->redirect();
} else {
// payment failed: display message to customer
exit($response->getMessage());
}
echo $response->getMessage();
?>
這是我的錯誤: 一個或多個參數丟失或無效
任何幫助表示讚賞:)
通過文檔來看,你錯過了你的'$ formData'數組中的CVV:https://github.com/omnipay/ omnipay –
他Scrowler,謝謝你的回覆,我已經加入了CVV。代碼工程沒有它,因爲我沒有從服務器收到有關CVV的消息。 – user30899
您是否從OmniPay或Pin付款中收到該錯誤? – Keith