Post by jrr » Fri Apr 02, 2021 8:57 am

Just noticed this - I'm using the OC "PayPal Commerce Platform" and it is not sending the shopping cart currency code to PayPal. I'm reading the log - sample here and it is showing the currency code as USD (the default for my store). The shopping cart currency is staying in CAD - it is just being paid in USD. And PayPal is being passed the funds in USD from the site - I just checked and the exchange rate is EXACTLY what my Currencies exchange rate is. And we all know that PayPal is not so generous with their exchange rate...

So, OC 3.0.3.6 is saying the shopping cart is in CAD but it is passing the USD equivelant to PayPal for payment. How to fix this?

Code: Select all

PayPal debug (Webhook): {"id":"WH-40E18234A4838824T-99H41909XF134161U","event_version":"1.0","create_time":"2021-04-01T20:42:03.060Z","resource_type":"capture","resource_version":"2.0","event_type":"PAYMENT.CAPTURE.COMPLETED","summary":"Payment completed for $ 35.2 USD","resource":{"id":"24N83890JC313621C","amount":{"currency_code":"USD","value":"35.20"},"final_capture":true,"seller_protection":{"status":"ELIGIBLE","dispute_categories":["ITEM_NOT_RECEIVED","UNAUTHORIZED_TRANSACTION"]},"seller_receivable_breakdown":{"gross_amount":{"currency_code":"USD","value":"35.20"},"paypal_fee":{"currency_code":"USD","value":"1.32"},"net_amount":{"currency_code":"USD","value":"33.88"}},"invoice_id":"4754","status":"COMPLETED","create_time":"2021-04-01T20:41:57Z","update_time":"2021-04-01T20:41:57Z","links":[{"href":"https:\/\/api.paypal.com\/v2\/payments\/captures\/24N83890JC313621C","rel":"self","method":"GET"},{"href":"https:\/\/api.paypal.com\/v2\/payments\/captures\/24N83890JC313621C\/refund","rel":"refund","method":"POST"},{"href":"https:\/\/api.paypal.com\/v2\/checkout\/orders\/21835881PP113251X","rel":"up","method":"GET"}]},"links":[{"href":"https:\/\/api.paypal.com\/v1\/notifications\/webhooks-events\/WH-40E18234A4838824T-99H41909XF134161U","rel":"self","method":"GET"},{"href":"https:\/\/api.paypal.com\/v1\/notifications\/webhooks-events\/WH-40E18234A4838824T-99H41909XF134161U\/resend","rel":"resend","method":"POST"}]}
I'm thinking it is time for the PayPal sandbox but wanted to first see if anyone else has this issue. I can't find anything in the system error messages that indicates the site is even thinking of warning about a PHP error when the customer transaction occurs.

Thanks!

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by straightlight » Fri Apr 02, 2021 10:48 pm

You could try to change:

Code: Select all

currency_code":"USD"
to:

Code: Select all

currency_code":"CAD"
In the PayPal Commerce Platform controllers.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by jrr » Sat Apr 03, 2021 3:03 am

straightlight wrote:
Fri Apr 02, 2021 10:48 pm
You could try to change:

Code: Select all

currency_code":"USD"
to:

Code: Select all

currency_code":"CAD"
In the PayPal Commerce Platform controllers.
Ah, but won't that make all PayPal transactions then proceed in CAD? Most of my clients use USD, but I want to allow folks in Europe, the UK, and Australia (who are my biggest customers after the USA) to be able to work in their own currency and to have PayPal also work in their currency so my clients don't have to pay the PayPal exchange rate when converting USD to whatever they are paying in.

In my previous system (oscMax) the PayPal transaction handler used whatever currencies I allowed in my system and this was the way I expect it to happen in OC. Am I mistaken in how OC and PayPal actually interact then? Seems simple to send the currency_code to PayPal for whatever currency the customer is working in.

Thanks!

jrr
Active Member

Posts

Joined
Mon Nov 20, 2017 1:48 pm

Post by straightlight » Sat Apr 03, 2021 5:01 am

jrr wrote:
Sat Apr 03, 2021 3:03 am
straightlight wrote:
Fri Apr 02, 2021 10:48 pm
You could try to change:

Code: Select all

currency_code":"USD"
to:

Code: Select all

currency_code":"CAD"
In the PayPal Commerce Platform controllers.
Ah, but won't that make all PayPal transactions then proceed in CAD? Most of my clients use USD, but I want to allow folks in Europe, the UK, and Australia (who are my biggest customers after the USA) to be able to work in their own currency and to have PayPal also work in their currency so my clients don't have to pay the PayPal exchange rate when converting USD to whatever they are paying in.

In my previous system (oscMax) the PayPal transaction handler used whatever currencies I allowed in my system and this was the way I expect it to happen in OC. Am I mistaken in how OC and PayPal actually interact then? Seems simple to send the currency_code to PayPal for whatever currency the customer is working in.

Thanks!
PayPal recent terms and agreement changes. With all simplicity, you could then make it work in the codes. If not, you could always create a new service request in the Commercial Support section of the forum to get this done as a custom job.

Besides, you are already covering such topic over here: viewtopic.php?f=198&t=223242 .

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 5 guests