大佬教程收集整理的这篇文章主要介绍了php-Adyen错误:[状态] => 403 [错误代码] => 010 [消息] =>不允许[错误类型] =>安全,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用JSON API,以便通过ADYEN进行(测试)付款.
这是代码(我从Github-> Adyen-> adyen-@L_616_3@-sample-code获得了这个示例:
<?@L_616_3@
/**
* Create Payment through the API (http Post)
*
*
* Please note: using our API requires a web service user. Set up your Webservice
* user: Adyen Test CA >> SetTings >> Users >> ws@Company. >> Generate password >> Submit
*
* @author Created by Adyen - Payments Made Easy
*/
/**
* A payment can be submitted by sending a Paymentrequest
* to the authorise action of the web service, the request should
* contain the following variables:
*
* - merchantAccount: The merchant account the payment was processed with.
* - amount: The amount of the payment
* - currency: the currency of the payment
* - amount: the amount of the payment
* - reference: Your reference
* - shopperIP: The IP address of the shopper (optional/recommended)
* - shopperEmail: The e-mail address of the shopper
* - shopperReference: The shopper reference, i.e. the shopper ID
* - fraudOffset: Numeric value that will be added to the fraud score (optional)
* - card
* - expirymonth: The expiration date's month written as a 2-digit String, padded with 0 if required (e.g. 03 or 12).
* - expiryYear: The expiration date's year written as in full. e.g. 2016.
* - holderName: The card holder's name, aas embossed on the card.
* - number: The card number.
* - cvc: The card validation code. This is the the CVC2 code (for MasterCard), CVV2 (for Visa) or CID (for American Express).
* - billingAddress: we advice you to submit billingAddress data if available for risk checks;
* - street: The street name
* - postalCode: The postal/zip code.
* - city: The city
* - housenumberOrName:
* - stateOrprovince: The house number
* - country: The country
*/
$request =array(
"merchantAccount" => "[YourMerchantAccount]",
"amount" => array(
"currency" => "EUR",
"value" => "199"
),
"reference" => "TEST-PAymENT-" . date("Y-m-d-H:i:s"),
"shopperIP" => "2.207.255.255",
"shopperReference" => "YourReference",
"billingAddress" => array(
"street" => "Simon Carmiggeltstraat",
"postalCode" => "1011DJ",
"city" => "Amsterdam",
"housenumberOrName" => "6-60",
"stateOrprovince" => "NH",
"country" => "NL"
),
"card" => array(
"expirymonth" => "08",
"expiryYear" => "2018",
"holderName" => "Test Card Holder",
"number" => "4111111111111111",
"cvc" => "737"
),
"browserInfo"=>array(
"acceptHeader"=>$_SERVER['http_user_ageNT'],
"userAgent"=>$_SERVER['http_ACCEPT']
)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://pal-test.adyen.com/pal/servlet/Payment/v25/authorise");
curl_setopt($ch, CURLOPT_HEADER, falsE);
curl_setopt($ch, CURLOPT_httpAUTH, CURLAUTH_BASIC );
curl_setopt($ch, CURLOPT_USERPWD, "YourWSUser:YourWSUserpassword");
curl_setopt($ch, CURLOPT_POST,count(json_encode($request)));
curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode($request));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, truE);
curl_setopt($ch, CURLOPT_httpHEADER,array("Content-type: application/json"));
$result = curl_exec($ch);
if($result === falsE)
echo "Error: " . curl_error($ch);
else{
/**
* If the payment passes validation a risk analysis will be done and, depending on the
* outcome, an authorisation will be attempted. You receive a
* payment response with the following fields:
* - pspReference: The reference we assigned to the payment;
* - resultCode: The result of the payment. One of Authorised, Refused or Error;
* - authCode: An authorisation code if the payment was successful, or blank otherwise;
* - refusalReason: If the payment was refused, the refusal reason.
*/
print_r(json_decode($result));
}
curl_close($ch);
?>
有人遇到过这个问题吗?我该如何解决?
我已经在github中使用了几乎所有示例,但是仅记录了一些错误,其余的都没有.
请帮我.谢谢
解决方法:
当您的用户无权处理原始卡详细信息时,通常会发生此问题.处理原始卡信息需要完全符合PCI(SAQ D).如果是您,请联系support@adyen.com,请求在您的帐户上启用该权限.
如果没有,您可以使用Adyen的CSE解决方案. Docs here. PHP example here.
以上是大佬教程为你收集整理的php-Adyen错误:[状态] => 403 [错误代码] => 010 [消息] =>不允许[错误类型] =>安全全部内容,希望文章能够帮你解决php-Adyen错误:[状态] => 403 [错误代码] => 010 [消息] =>不允许[错误类型] =>安全所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。