I have an issue with IPN usage with the Paypal payments plugin.
Here is an email that the Paypal plug in generates.
Open Journal Systems has encountered unusual activity relating to PayPal
payment support for the journal -------------------------. This activity
may need further investigation or manual intervention.
This email was generated by Open Journal Systems’ PayPal plugin.
After my own research, I found out that the Granted and Queued amount must be equal.
would not having the additional 0’s be the cause? Could it be that Paypal charging tax that is causing the issue?
or is there other information missing above?
Thanks
PS: I have already tested and got working the IPN system with a sandbox paypal account.
This seems to be the source file that does the comparison.
I don’t completely understand the source yet, does it include or update the amount from paypal after tax is applied?
One solution could be to rewrite the code to pull the tax amount from a database and update the variable with that information, if it is not already supplied.
Hmm, I’m afraid I’m not particularly certain how PayPal is supposed to handle taxes – I would expect them to be either handled fully by PayPal, or fully by the client application. It looks like in this case it’s divided between the two. We use PayPal in a Canadian context ourselves, and taxes aren’t divided out like this. Is there a particular kind of tax in your jurisdiction that might explain this?
Just to be sure this isn’t a rabbit hole, is there some other change that might explain it, beyond taxes?
Regards,
Alec Smecher
Public Knowledge Project Team
Well, I solved the tax issue by modifying the paypal plugin to specify no tax in the post back to paypal (The paypal account is set to auto apply state sales tax). So for article sales, we would take the taxes out from the current sale amount manually.
Other issues with the granter user account popped up afterward, but the plugin generated different errors, so it seems the tax was it’s own issue. One solution could be to change the comparison field to compare only the pretax amount, but I suppose that would just open up a potential exploit if it was hacked (I assume a hacker could then send false communications specifying a higher tax amount).
I don’t know the exact laws on US states sales tax, but I think its based on the location of the company selling online.
I basically just added the line ‘tax’ => 0 and added a comma at the end of the previous line.
This will force paypal to not charge tax to the order when the IPN is sent to OJS. What I meant above is that if paypal doesn’t automatically take out tax from the order amount, you will need to do the accounting for that yourself.
The file is located in “web-root/plugins/paymethod/paypal”.
For us, it is better to have the taxes added when purchase is made via PayPal. It is also easy to see purchases made by buyers in your state. The amount will always be the same. I think subtracting that after the sale would take a much longer time.
Ideally, it would be great if buyers that buy and are charged a sales tax do not generate this warning which prevents them from downloading the article.
Would someone be able to try this change and report back?
Currently the amount is verified by checking the IPN variable called mc_gross – this is the gross transaction amount. Rather, we should probably be using auth_amount – the authorized amount. (Details here.)
To make this change in OJS 2.x, edit plugins/paymethod/paypal/PayPalPlugin.inc.php. Look for mc_gross, which should appear in this line: