dynambee Posted September 15, 2019 Posted September 15, 2019 I'm doing a fair amount of PayPal transaction testing right now and have noticed that TB purchases (with the PayPal sandbox anyway) have no details. No information about the items purchased, the item prices, or the quantities. Also no item subtotal with shipping costs followed by a grand total. Only the total amount is sent from TB to PayPal with no additional information. Is there no way to send more information to PayPal when the customer makes payment for goods purchased on TB? Is this a limitation of the basic PayPal checkout or is it just something that hasn't been implemented on TB?
lesley Posted September 15, 2019 Posted September 15, 2019 It was actually something I removed sometime ago to make the module stable. I can't remember where the post on it is, on the forum, but it goes something like this. In thirty bees we use 6 digit decimal precision for prices. So if you have an item that is $10 and you have a 33% discount on it, the real price is $6.666666, which would come out to $6.67. But there are so many different rounding methods people use, should they be rounded per line or per item. Like if someone purchased 2 of those products should the price be rounded off the single products then added together? Or should it be added together and then rounded? Then you get deeper in the hole when you start applying currency conversions and taxes too. Basically the problem comes down to when you send products on an order over to paypal, paypal uses their own rounding system on those prices. If they come up with a 1 cent difference they will error out the transaction. Then that stops the customer from buying. Its a difficult system to work against, so the best fix was taking out the details. Then there is no chance for errors.
dynambee Posted September 15, 2019 Author Posted September 15, 2019 Thanks for the quick reply. This unfortunately creates rather a big problem for me. Due to the nature of my business (selling multiple different lines of products) my business name and website names have nothing in common. Business name might be Acme Inc while websites could be makeupdirect dot com, greatwatches dot com, photogear dot co dot uk. (I own none of those domains but they're good examples of my situation.) So 30+ days after their purchase my customers will see a charge on their credit card for "PayPal *ACME INC" and not know what it is. Then they log into their PayPal account to check on this mystery charge and will see just an amount with...no other details. If that was me I'd be mighty suspicious of that transaction, and for many people they won't think of any way to figure our what the transaction is. Incoming dispute... I suppose the best way around this would be to send actual numbers to PayPal rather than numbers with discounts. So instead of sending to PayPal $10 with 33% discount and letting PayPal do the rounding why not send the actual discounted amount to PayPal already rounded by the website? So send $6.66 or $6.67, depending on how the website rounds. Alternatively allow people to enable details being sent with the understanding that if they do so then website rounding must be set to match how PayPal rounds or there will be problems, or that percentage discounts can't be used due to rounding issues. There must be some sort of solution to this...?
dynambee Posted September 15, 2019 Author Posted September 15, 2019 (edited) - Edited September 15, 2019 by dynambee
lesley Posted September 15, 2019 Posted September 15, 2019 I don't think it had anything to do with that. Paypal is really weird about their fraud settings since they insure payments. If you want to reverse it on your local copy, just uncomment out these lines, https://github.com/thirtybees/paypal/blob/master/classes/PayPalRestApi.php#L419
dynambee Posted September 23, 2019 Author Posted September 23, 2019 On 9/15/2019 at 2:56 PM, lesley said: If you want to reverse it on your local copy, just uncomment out these lines, https://github.com/thirtybees/paypal/blob/master/classes/PayPalRestApi.php#L419 Starting to set up my production site and was editing those lines. I noticed something else that might be a bug: // Now we are going to handle the differences // if despite the gift wrapping costs, the remaining number is negative, we have applied some discounts // that couldn't be handled in a PayPal way. Therefore, we fill the `shipping_discount` field. if (round($remaining - $giftWithoutTax, 2) < 0) { $details[‘shipping_discount’] = number_format(abs($remaining - $giftWithoutTax), 2); } else { $details['handling_fee'] = round($remaining - $giftWithoutTax, 2); } The quotes around ‘shipping_discount’ seem like they would give PHP fits as they are curly quotes rather than straight quotes. This appears on line 404 of the PayPalRestApi.php file when opened from my newly installed TB setup.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now