Sta*_*owe 3 php mysqli paypal paypal-sandbox
早上好,
我正在通过PHP和MySQLi构建自己的电子商务商店.目前的测试网站是:http://taxreturnsolutions.uk/ecommerce/
我遵循了这个指南:https://www.codexworld.com/paypal-standard-payment-gateway-integration-php/
我HAD 一切设置和在工作绝对没问题,我可以点击立即购买按钮,它会带我到沙盒的网站,我可以购买.我的SQLi数据库将使用相关数据等进行更新.但是现在我不断从Paypal Sandbox收到以下消息,如下所示:
*注意 URL:/ webapps/shoppingcart/error?flowlogging_id = 7be60528d708&code = EWP_SETTINGS
我每次按下立即购买按钮都会得到这个,但是在此之前,这是一个间歇性的问题,例如3/10次我使用现在购买按钮会出现此错误并且正确处理7/10次.
我的按钮代码如下:
$paypalURL = "https://www.sandbox.paypal.com/cgi-bin/webscr"; //Test PayPal API URL
$paypalID = 'ukpwneduk-facilitator@hotmail.com'; //Business Email
<!-- Button -->
<?php
if(isset ($_SESSION['login_user'])){
echo "
<form action=' $paypalURL ' method='post' style='text-align: center;'>
<!-- Identify your business so that you can collect the payments. -->
<input type='hidden' name='business' value='$paypalID'>
<!-- Specify a Buy Now button. -->
<input type='hidden' name='cmd' value='_xclick'>
<!-- Specify details about the item that buyers will purchase. -->
<input type='hidden' name='product_name' value='$product_array[$key]['product_name']'>
<input type='hidden' name='product_id' value='$product_array[$key]['product_id']'>
<input type='hidden' name='product_price' value='$product_array[$key]['product_price']'>
<input type='hidden' name='currency_code' value='GBP'>
<input type='hidden' name='notify_url' value='http://taxreturnsolutions.uk/ecommerce/payments/ipn.php'>
<!-- Specify URLs -->
<input type='hidden' name='cancel_return' value='http://taxreturnsolutions.uk/ecommerce/payments/cancel.php'>
<input type='hidden' name='return' value='http://taxreturnsolutions.uk/ecommerce/payments/success.php'>
<!-- Display the payment button. -->
<input type='image' name='submit' border='0'
src='https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif' alt='PayPal - The safer, easier way to pay online'>
<img alt='' border='0' width='1' height='1' src='https://www.paypalobjects.com/en_US/i/scr/pixel.gif' >
</form> ";
} else
{
echo "<p style='text-align: center;'><b> Log in</b> to Buy Now </p>";
}
?>
Run Code Online (Sandbox Code Playgroud)
任何帮助都将不胜感激.
谢谢.斯坦.
小智 13
我认为问题出在PayPal配置中.您需要允许未加密的网站向paypal付款.为此,请登录您的PayPal帐户:
配置文件和设置 - >我的销售工具 - >网站首选项
请转到" 加密的网站付款 "部分,然后选择"关闭"到"阻止未加密的网站付款":
这应该使它工作!祝好运