beakersoft
beakersoft

Reputation: 2356

Checking Amounts From The Paypal IPN

I am writing a ipn handling php script, and i would like to check the customer has paid the correct amount for the product they have just purchased.

The problem i have is i'm not sure the best way to check if the payment is made in different currencies. We charge in pounds sterling, and hold our prices as pound sterling, but if someone pays in US dollars $10 obviously is not the same as £10.

Does the IPN base all its transactions in one currency (dollars i would assume) i should use as my base instead of pounds sterling, or am i going to have to do some sort of conversion?

Cheers Luke

Upvotes: 1

Views: 711

Answers (2)

ali nouman
ali nouman

Reputation: 245

$payment_currency = $_POST['mc_currency'];

Through this you can verify the currency for referece https://cms.paypal.com/cms_content/US/en_US/files/developer/IPN_PHP_41.txt

Upvotes: 0

Robert
Robert

Reputation: 19356

IPN 'mc_gross' is returned in the currency you charged the buyer for. Whichever currency the buyer finally paid doesn't matter.

Upvotes: 1

Related Questions