Search code examples
paypal

Does PayPal mc_gross vary when paying with different currency


I'm confused about a simple thing regarding PayPal and IPN.

I'm planning to use IPN to send automated emails to customers on purchase.

Let's say I charge a fixed price 19.99€ for my app - as set in PayPal payment button.

What if the customer orders in US dollars - does "mc_gross" still contain the price in euros?

If not, how do I handle the situation below?

I mean I have to check the price in my IPN handler.

Here's some code (comments not by me):

/* CHECK THESE 4 THINGS BEFORE PROCESSING THE TRANSACTION, HANDLE THEM AS YOU WISH
1. Make sure that business email returned is your business email
2. Make sure that the transaction’s payment status is “completed”
3. Make sure there are no duplicate txn_id
4. Make sure the payment amount matches what you charge for items. (Defeat Price-Jacking) */

if ($_POST["payment_status"] == "Completed"
            && $_POST["item_name"] == "MyApp"
            && $_POST["mc_gross"] == "19.99") {
    ...
    ..
    .
}

Solution

  • Everything you receive is always the price in the currency specified for the transaction transaction (as part of the button or API call)

    If the transaction was in euros but the customer payed with any different currency, such as dollars, this will be invisible. The currency conversion is between them and PayPal only.