I am in the process of building my own ecommerce store via PHP and MySQLi. Current testing site is: http://taxreturnsolutions.uk/ecommerce/
I have followed this guide: https://www.codexworld.com/paypal-standard-payment-gateway-integration-php/
I HAD everything setup and working absolutely fine in that I could click the buy it now button, it would take me to the sandbox site and I could purchase. My SQLi database would be updated with the relevant data etc. However now I keep getting the following message from PayPal Sandbox as follows:
*Note URL: /webapps/shoppingcart/error?flowlogging_id=7be60528d708&code=EWP_SETTINGS
I get this every time I press the buy it now button, however prior to this, it was an intermittent issue for example 3/10 times I used the buy it now button it would present this error and 7/10 times process correctly.
My code for the button is as follows:
$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>";
}
?>
