1

Sorry for the longwinded title, but that pretty much sums up my issue here. I am using PayPal IPN to verify incoming payments against prices in my database. I am only selling one item at a time, no cart, and there is no shipping cost. Tax is only charged if the buyer is from one area.

All prices are stored in my database as XX.XX without any tax. When PayPal sends back data via IPN I thought I could use mc_gross to compare with my database prices but I have found two possible issues:

  1. If the buyer pays with non-usd funds, I read that mc_gross will not equal the price I sent to PayPal in the first place and therefore will not matchup with my database, is this true?

  2. If the buyer is within the taxable area, and tax is added to his total at PayPal.com will this be reflected in mc_gross? I found conflicting info in the PayPal docs and online about whether or not mc_gross includes tax price.

4

2 回答 2

2

If the buyer pays with non-usd funds, I read that mc_gross will not equal the price I sent to PayPal in the first place and therefore will not matchup with my database, is this true?

You should be verifying how you are processing the payment in the first place, lock down the fund type or store an item id using the custom variable

If the buyer is within the taxable area, and tax is added to his total at PayPal.com will this be reflected in mc_gross? I found conflicting info in the PayPal docs and online about whether or not mc_gross includes tax price.

mc_gross is the total amount paid so yes tax is included, you should be verifying what product was purchased using some sort of id not by the amount paid

于 2013-02-27T00:56:13.367 回答
2

If the buyer is within the taxable area, and tax is added to his total at PayPal.com will this be reflected in mc_gross? I found conflicting info in the PayPal docs and online about whether or not mc_gross includes tax price.

As David Nguyen says mc_gross is the total amount paid so yes tax is included. but, you must use mc_gross to compare with your database prices to secure the transaction.

if you like to get the real price without the tax all you have to do is to check if the posted variable "tax" is numeric and if so decrease it from the posted variable "mc_gross".

e.g.
mc_gross = 142.68
tax = 19.68
mc_gross - tax = 123

your database amount need to be 123. If not there is a security error because the user change the price and bypass the system.

by the way you must also check the currency, create a post back and more, click here for more details

于 2013-12-17T09:38:50.803 回答