Paypal fee to clear a certain amount.

  • Bob Leavitt
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 3 months ago #107503 by Bob Leavitt
Paypal fee to clear a certain amount. was created by Bob Leavitt
Paypal's processing fee is 2.9% + $.30. The question is how much should I charge in order to ensure that I receive the original product price from the transaction after the fee is deducted. 2.9% is charged against the entire amount of the transaction (including the fee that you add to the basic product price) before subtracting $.30. So clearly charging a fee of 2.9% + $.30 for the product is not enough to cover the actual amount that Paypal will deduct. In reading some online references, they suggest using a formula like this: x = (y + .3) / .971 where x is the fee you want to charge and y is the product price. I have tried this in manual calculations with my Paypal sandbox and it seems to work. Is there a way of doing this type of calculation in the Paypal extension? If not, do you have a suggestion for how to ensure that I include the correct fee to recover the product's price?

Please Log in or Create an account to join the conversation.

  • Bob Leavitt
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 3 months ago #107505 by Bob Leavitt
Replied by Bob Leavitt on topic Paypal fee to clear a certain amount.
This may help answer my own question. It looks like if I use 3% and $.31 (instead of 2.9% and $.30) I get close to the exact amount of the fee in order to recover the price of my product. It may be off a penny or two depending on the amount of the purchase. Is this what people commonly use, or maybe they set a slightly higher fee to ensure that they recover the product price?

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
8 years 3 months ago - 8 years 3 months ago #107510 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Paypal fee to clear a certain amount.
Hello Bob

Since this special rule is applied to PayPal only (while Events Booking support multiple payment gateways), I could not suggest any solution except modify code

For example, if you are using individual registration, look at the file components/com_eventbooking/helper/registration.php, find the method calculateIndividualRegistrationFees and this block of code inside the method:
Code:
if ($paymentType == 0 && $amount > 0 && $hasPaymentProcessingFee) { $fees['payment_processing_fee'] = round($paymentFeeAmount + $amount * $paymentFeePercent / 100, 2); $amount += $fees['payment_processing_fee']; }

Try to change it to:
Code:
if ($paymentType == 0 && $amount > 0 && $hasPaymentProcessingFee) { $fees['payment_processing_fee'] = round(($amount + 0.3)/0.971, 2); $amount += $fees['payment_processing_fee']; }
It should work as expected

Regards,

Tuan
Last edit: 8 years 3 months ago by Tuan Pham Ngoc.

Please Log in or Create an account to join the conversation.

  • Bob Leavitt
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 3 months ago #107528 by Bob Leavitt
Replied by Bob Leavitt on topic Paypal fee to clear a certain amount.
Thank you Tuan. For now I will try my solution (3% + $.31) rather than modify the code, but I will keep this in mind if my solution doesn't work. Our registration costs usually fall between $20 and $100 which should make my solution workable with only a few extra cents retained above the registration cost after Paypal deducts its fee. If our registration costs varied across a much larger range my solution would not work.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
8 years 3 months ago #107537 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Paypal fee to clear a certain amount.
OK Bob !

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc