Paymentsense-DevSupport / magento2-paymentsense-module

Paymentsense Module for Magento 2 Open Source (Community Edition)
GNU General Public License v3.0
3 stars 2 forks source link

Added use_base_currency option for Hosted payment method #1

Closed johnorourke closed 5 years ago

johnorourke commented 5 years ago

Hi, we wanted to be able to run a Magento store with multiple currencies, but take payment in the base currency for situations where the merchant has only one currency account.

When using an alternative currency, Magento displays "You will be charged x.xx" in the checkout totals block, giving the base currency amount, but the underlying core code seems to request payment from the payment method class in the alternative currency (tested on Magento 2.3.1)

Magento config for currency states that transactions will be made in the base currency of the store. This pull request adds a new config option to enable that behaviour, but only for the Hosted method - if there's enough interest, we can add it for the other methods.

(Zendesk ticket #1752579 )

ghost commented 5 years ago

Hi,

We understand that this code adds a functionality meeting your specific needs, but unfortunately we do not find it of use for the typical user at this time and I am closing this pull request.

After reviewing your code I would like to make a comment that I believe might be of help to you:

I saw that the base currency is used only in the initial transaction, while the cross-reference transactions use the currency of the order. This will produce situations like the following one:

  1. Given the order currency is EUR, the base currency is GBP and the "Use website base currency?" checkbox is checked, the plug-in will send the transaction to the gateway in GBP. That is ok.

  2. The cross-reference transactions referring to the above initial transaction will be still in EUR. For example, if a refund is performed, the plugin will send a REFUND transaction in EUR. Technically this would work (as of this moment) as the Paymentsense gateway will ignore the currency of the cross-reference transaction forcing it to GBP, but conceptually this is not ok and may stop working as expected at any time. The correct way to send cross-reference transactions is to specify the correct currency, which is mandatory for all transactions except VOID. This would require changing the currency of the cross-reference transactions too.

The above is for your information. Please do not send further pull requests to the repositories of the official Paymentsense plugins as we do not consider pull requests. If you want, feel free clone the repository instead.

For issues or feature requests, please email us at devsupport@paymentsense.com.

Thanks!

johnorourke commented 5 years ago

Many thanks for your feedback, that's really helpful! John

On Tue, 13 Aug 2019 at 12:38, alexk-ps notifications@github.com wrote:

Hi,

We understand that this code adds a functionality meeting your specific needs, but unfortunately we do not find it of use for the typical user at this time and I am closing this pull request.

After reviewing your code I would like to make a comment that I believe might be of help to you:

I saw that the base currency is used only in the initial transaction, while the cross-reference transactions use the currency of the order. This will produce situations like the following one:

1.

Given the order currency is EUR, the base currency is GBP and the "Use website base currency?" checkbox is checked, the plug-in will send the transaction to the gateway in GBP. That is ok. 2.

The cross-reference transactions referring to the above initial transaction will be still in EUR. For example, if a refund is performed, the plugin will send a REFUND transaction in EUR. Technically this would work (as of this moment) as the Paymentsense gateway will ignore the currency of the cross-reference transaction forcing it to GBP, but conceptually this is not ok and may stop working as expected at any time. The correct way to send cross-reference transactions is to specify the correct currency, which is mandatory for all transactions except VOID. This would require changing the currency of the cross-reference transactions too.

The above is for your information. Please do not send further pull requests to the repositories of the official Paymentsense plugins as we do not consider pull requests. If you want, feel free clone the repository instead.

For issues or feature requests, please email us at devsupport@paymentsense.com

Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Paymentsense-DevSupport/magento2-paymentsense-module/pull/1?email_source=notifications&email_token=AAPJIRUXRAZWQ7NCRLBFROLQEKMK7A5CNFSM4IJUTH5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4FMLHA#issuecomment-520799644, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPJIRR4KISKQ2PBQV6IIB3QEKMK7ANCNFSM4IJUTH5A .