Paypal and Shipping costs

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
hommler
Posts: 10
Joined: 18 Jul 2020, 21:29

Paypal and Shipping costs

Post by hommler » 22 Aug 2020, 15:14

Hi everybody,

I've got a problem with shipping costs. My product has a price of 1,29 € and tax rate 5.00%. The shipping costs for example with DHL are 5,9 € (in field Shipping/Payment costs of the DHL service) and tax rate 5.00%.

When I order the product after the checkout I get the error from PaypalExpress:
"Invalid Shipping total."

I can't find out what the problem might be. When I set the DHL price to zero, I can order the product.

I thank you for any hint. Where can I get Debug information from the paypal Service?

Thank you very much.
Ralf

hommler
Posts: 10
Joined: 18 Jul 2020, 21:29

Re: Paypal and Shipping costs

Post by hommler » 24 Aug 2020, 21:43

Hi everybody,

this is the value output (debug) from PaypalExpress.php. Thanks for any hint.

["L_PAYMENTREQUEST_0_QTY0"]=>
int(1)
["L_PAYMENTREQUEST_0_AMT0"]=>
string(4) "1.29"
["L_SHIPPINGOPTIONAMOUNT0"]=>
string(4) "0.00"
["L_SHIPPINGOPTIONLABEL0"]=>
string(8) "demo-dhl"
["L_SHIPPINGOPTIONNAME0"]=>
string(3) "DHL"
["L_SHIPPINGOPTIONISDEFAULT0"]=>
string(4) "true"
["MAXAMT"]=>
float(7.2)
["PAYMENTREQUEST_0_AMT"]=>
string(4) "7.19"
["PAYMENTREQUEST_0_ITEMAMT"]=>
string(4) "1.29"
["PAYMENTREQUEST_0_SHIPPINGAMT"]=>
string(4) "5.90"
["PAYMENTREQUEST_0_INSURANCEAMT"]=>
string(4) "0.00"
["PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED"]=>
string(5) "false"
["PAYMENTREQUEST_0_SHIPDISCAMT"]=>
string(4) "0.00"
["PAYMENTREQUEST_0_CURRENCYCODE"]=>
string(3) "EUR"
["PAYMENTREQUEST_0_PAYMENTACTION"]=>
string(4) "Sale"

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Paypal and Shipping costs

Post by aimeos » 25 Aug 2020, 07:34

L_SHIPPINGOPTIONAMOUNT0 is 0 in your case.
Which version of Aimeos do you use?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

hommler
Posts: 10
Joined: 18 Jul 2020, 21:29

Re: Paypal and Shipping costs

Post by hommler » 25 Aug 2020, 08:26

Hi,

I use 19.10.6. Should L_SHIPPINGOPTIONAMOUNT0 be 5.90 too?

Thanks a lot for your help.

Ralf

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Paypal and Shipping costs

Post by aimeos » 25 Aug 2020, 08:55

Yes, that's required so the calculation at PayPals side will succeed. Did you disable to "paypalexpress.service" configuration in the Service panel of the admin backend?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

hommler
Posts: 10
Joined: 18 Jul 2020, 21:29

Re: Paypal and Shipping costs

Post by hommler » 25 Aug 2020, 09:09

When I disable paypalexpress.service in backend service panel I get the following error message:

PayPal Express: "Transaction refused because of an invalid argument. See additional error messages for details."

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Paypal and Shipping costs

Post by aimeos » 25 Aug 2020, 09:22

Can you change

Code: Select all

$deliveryCosts
to

Code: Select all

$service->getPrice()->getCosts()
in https://github.com/aimeos/aimeos-core/b ... s.php#L715 and see if it works? There seems to be an undefined variable.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

hommler
Posts: 10
Joined: 18 Jul 2020, 21:29

Re: Paypal and Shipping costs

Post by hommler » 25 Aug 2020, 09:41

Yesss - thank you very much. Changing this value resolved the problem.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Paypal and Shipping costs

Post by aimeos » 25 Aug 2020, 09:50

Great! Can you create a pull request on https://github.com/aimeos/aimeos-core for the fix?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

hommler
Posts: 10
Joined: 18 Jul 2020, 21:29

Re: Paypal and Shipping costs

Post by hommler » 25 Aug 2020, 10:01

Yes, I'll try it :-)

Post Reply