adding paypal fees

Phoca Cart - complex e-commerce extension
fw115
Phoca Member
Phoca Member
Posts: 41
Joined: 27 Mar 2017, 15:25

adding paypal fees

Post by fw115 »

Hi,

how can i add 1,9% paypal fees to the cart ?

let me say i have a total of 80 euros in the cart, how can i add the fees from paypal to it ?

thank you

using phoca cart 3.0.0 RC5

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: adding paypal fees

Post by Jan »

Hi, for now, there is only fixed amount cost for the payment method.

I am working now on new version, so I will take a look at it, to implement it.

This means, you will add percentage to the payment method, which then will be taken from total amount.

But there is a problem, this cannot be taken from total, as the payment cost is a prt of the total.

So the question is from which amount to take the percentage cost:

when from subtotal - there will be no tax, discount, coupon, etc.

Even if you set it from Total - Payment (total without payment method cost), it will be not the same like the percentage on the Paypal - as on Paypal the percentage is taken from total. But if payment fee is a part of total, this cannot be the same in the cart.

Jan
If you find Phoca extensions useful, please support the project
stefetrucki
Phoca Member
Phoca Member
Posts: 27
Joined: 11 Apr 2017, 10:54

Re: adding paypal fees

Post by stefetrucki »

that is not to hard in my opinion, because paypall fees are for eg 2% of the total price, than you have the final prize with fees as 102%

hope that helps

stef
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: adding paypal fees

Post by Jan »

The problem is the loop. If the total price includes the payment cost, it will be changed in loop:

If the total price including payment cost is 100 EUR and the cost of payment is 2%, this means:
2 EUR for Payment, but, if payment changes, then the total price changes too - from 100 to 102, then the 2% is:
2.04 for Payment, but, if payment changes, then the total price changes too - from 102 to 102.04 then the 2% is:
and and and ... the loop.

The the percentage must be taken from Total Price - Payment costs.

Jan
If you find Phoca extensions useful, please support the project
stefetrucki
Phoca Member
Phoca Member
Posts: 27
Joined: 11 Apr 2017, 10:54

Re: adding paypal fees

Post by stefetrucki »

I think you need to seperate total of order and final total

if you sum up the cart and it is 100€ you have it saved as $cart_sum
and you display final price including fees as $total (102€)

than you create a variable that only displays Paypal fee, which is 2€ that is only displayed as it needs to be in the cart, but not used for anything.

so you have no loop, because total order as nothing to do with final total

I hope you can follow my thoughts
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: adding paypal fees

Post by Jan »

In Phoca Cart there are different total items:

a) subtotal
b) subtotal - product discounts
c) subtotal - cart discount
d) subtotal - coupon
e) subtotal - rounding
f) subtotal + different VATs
g) subtotal + shipping + shipping VAT
h) subtotal + payment + payment VAT
=====================
total

So I think, the % should be set by g)

Jan
If you find Phoca extensions useful, please support the project
stefetrucki
Phoca Member
Phoca Member
Posts: 27
Joined: 11 Apr 2017, 10:54

Re: adding paypal fees

Post by stefetrucki »

right i totally agree
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: adding paypal fees

Post by Jan »

This was added to RC6 version, now I am working on RC7
If you find Phoca extensions useful, please support the project
Post Reply