Page 1 of 2

How to add additional charges in PayPal?

Posted: 29 May 2019, 05:56
by Harpal Singh
I have added an additional setup charge for each product.
I am using PayPal and integrated successfully.
Now the problem is that I am unable to charge additional setup charge amount in Paypal.
Eg. I have order with PerItem price = $1.10 and Quantity=250 and Setup charges = $35
Total Amount would be calculated as : (1.10*250)+35 = 310 which is correct. and displaying correct also on detail page.
Image: https://prnt.sc/nuqmzi
When I proceed to Payment Page on Paypal it shows only (1.10*250) i.e $275.
Image: https://prnt.sc/nuqohz

I want to know how can I add additional charges in Paypal.

Re: How to add additional charges in PayPal?

Posted: 01 Jun 2019, 21:43
by aimeos
How did you configure the additional setup charge? You use the PayPalExpress payment service, don't you?

Re: How to add additional charges in PayPal?

Posted: 03 Jun 2019, 05:54
by Harpal Singh
aimeos wrote:How did you configure the additional setup charge? You use the PayPalExpress payment service, don't you?
Thanks for your reply.

I have taken a custom field in mshop_order_base_product as setup_charges and updating the same after checking out .
Thanks.

Re: How to add additional charges in PayPal?

Posted: 03 Jun 2019, 09:50
by aimeos
The field is unknown to the rest of the Aimeos code so this won't work if you don't adapt all code that should use the value from this field.

An easier solution would be to write a service provider decorator that adds the setup costs to the basket during checkout in either the delivery or payment selection step (if it's the only delivery option, the costs will be added immediately when adding a product by the Autofill basket plugin). You can add the costs not only as shipping or payment costs but also as delivery/payment related "product" line if you add the setup costs as delivery/payment price value instead of price costs.

Re: How to add additional charges in PayPal?

Posted: 03 Jun 2019, 10:38
by Harpal Singh
Hi,

Same issue I am facing with rebate prices.However rebate amount is being updated in mshop_order_base rebate column. But Rebate amount is not reflecting in paypal payment page.
Thanks.

Re: How to add additional charges in PayPal?

Posted: 03 Jun 2019, 17:28
by aimeos
Rebate values in the mshop_order_base table and mshop_order_base_product tables are only informations how much rebate have been granted. The prices already contain the rebate value.

Re: How to add additional charges in PayPal?

Posted: 05 Jun 2019, 06:29
by Harpal Singh
Is it possible to create a coupon for some products, to discount 40% on basket total?
If possible then how to add a single 40% discount coupon for multiple selected products?

How can I check if the coupon extension is installed?
I have added Coupon ABC in admin
Provider = PercentRebate
percentrebate.productcode = SSFLTEE(which is product code for the product on which coupon is applying)
percentrebate.rebate = 40 (as I want to give 40% rebate)
and added Code ABC
But when I have applied code ABC I Shows error message "Coupon code "ABC" is invalid or not available any more"
I have also used Provider as = PercentRebate,Required and required.productcode=SSFLTEE
But getting the same error message.

Re: How to add additional charges in PayPal?

Posted: 05 Jun 2019, 08:04
by aimeos
The SKU referenced in "percentrebate.productcode" must be the discount product which will be additionally added to the basket and will contain the rebate amount, e.g. -40$ (use SKU "demo-rebate" for this if the product is still available). It's not the product that must be in the basket so the coupon code can be applied (this is "required.productcode: SSFLTEE").

The correct configuration for "PercentRebate,Required" in provider would be:
percentrebate.productcode: demo-rebate
percentrebate.rebate: 40
required.productcode: SSFLTEE

Then, customers will get 40% rebate on the basket value if product with the SKU "SSFLTEE" is in their basket and they use the coupon code "ABC".

Re: How to add additional charges in PayPal?

Posted: 05 Jun 2019, 10:56
by Harpal Singh
HI,
Thanks again for your reply,

Ok I got it and followed the same. Somehow I got the discounted amount. But it shows an error on the top when coupon is applied.

Did you mean I have to add separate coupon for each product. With configuration code required.productcode: SSFLTEE? or is there any way to add a single coupon for same discount for some of the products.

Can I apply that coupon automatically when product is added in the basket?

Thanks
Harpal Singh

Re: How to add additional charges in PayPal?

Posted: 06 Jun 2019, 18:27
by aimeos
Coupon codes can't be applied automatically. If you want to grant discounts automatically, you have to implement a basket plugin for that: https://aimeos.org/docs/Developers/Libr ... et_plugins