1

Hi I'm trying to work my php code with Paypal Sandbox. I've found a decent tutorial I think and have tested it out. The first part works fine but the problem happens when I try and retrieve values once the transaction is complete.

This is the website

http://www.phpgang.com/payment-system-with-paypal_249.html

The problem I have has been posted as a comment in the bottom of their page as well so I'll just copy it here.

"I always get the Payment failed in the success page. This is because $item_price and $item_currency are empty. They are empty because the page doesn’t get redirected from the paypal page in 10 seconds like the demo , you have to click return to store and this brings you back to success.php with out anything for $_REQUEST to retrieve instead of success.php?tx=83437E384950D&st=Completed&amt=10.00&cc=USD&cm=&item_number=1. Hope you can help Thanks"

Thanks and hopefully someone can help me solve the problem

Geth
  • 11
  • 2
  • This is probably not true: _They are empty because the page doesn’t get redirected from the paypal page in 10 seconds like the demo_ . Can you give us a more clear indication of what is going on? PayPal poses no limits on execution time, they might have a really high upper bound, but 10 seconds is not even close. – Halcyon Mar 04 '13 at 17:23
  • All I've done is follow that tutorial to the letter, I have no idea what the 10 second feature is I cant see that in the code they provide. – Geth Mar 04 '13 at 18:12

1 Answers1

0

That system is so easy bypassable

Look: http://demo.phpgang.com/payment_with_paypal/success.php?amt=10&cc=USD

You must verify the transaction with a PDT system (sending a request with curl for check the validity of the transaction with the returned details via $_GET), you can find here some useful code

https://www.x.com/payment-data-transfer-php-5.3

Sam
  • 2,950
  • 1
  • 18
  • 26