Jump to content

PayPal


Recommended Posts


This is a nice write up you have. However your logic for the code you give is faulty. Specifically


elseif ($_POST['payment_status'] != 'Completed')

Should be changed to

elseif ($_POST['payment_status'] != 'Completed' && (!Configuration::get('PAYPAL_SANDBOX') || $_POST['payment_status'] != 'Pending'))


That elseif resolves to:

completed AND sandboxed

OR

completed AND pending

Also the bracketed OR will only be evaluated IFF the part before the && is true.

maybe you meant :

elseif ($_POST['payment_status'] != 'Completed' || (!Configuration::get('PAYPAL_SANDBOX') && $_POST['payment_status'] != 'Pending'))
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...