您好我在我的网站上实施PayPal DoDirectPayment,我想要求过期日期和CVV,但是没有带有此警告的人付款“此交易已获批准。但是,提供的卡安全码太少,太多或无效字符类型,但根据您的帐户选项设置,在审批流程中不需要“
我正在使用PHP。
我的代码是
$api_endpoint = 'https://api-3t.sandbox.paypal.com/nvp';
$request = array
(
'METHOD' => 'DoDirectPayment',
'USER' => 'sell3_api1.pay.com',
'PWD' => '75DQHCABLDFSDF',
'SIGNATURE' => 'AFcWxV21C7fd0asdasdCpasdsdAtxzafSFsaKZ3unSUBjX9r-',
'VERSION' => '55.0',
'PAYMENTACTION' => 'Sale',
'FIRSTNAME' => $current_user->user_login,
'LASTNAME' => '.',
'IPADDRESS' => $_SERVER['REMOTE_ADDR'],
'ACCT' => $acct,
'CREDITCARDTYPE'=>
'EXPDATE' => $month.$year,
'CVV2' => $cvv,
'AMT' => $amt,
'CURRENCYCODE' => 'USD',
);
$nvp_string = '';
foreach ($request as $key => $value) {
$nvp_string .= '&'.$key.'='.urlencode($value);
}
$curl = curl_init();
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_URL, $api_endpoint);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $nvp_string);
$result = curl_exec($curl);
curl_close($curl);
parse_str($result);
我该如何解决呢。