Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the billing address country does not refresh the payment methods. #162

Open
VBQ-GuillaumeMOULIN opened this issue Nov 4, 2024 · 2 comments
Labels
enhancement Indicates new feature requests

Comments

@VBQ-GuillaumeMOULIN
Copy link

This request was sent to [email protected] 10 days ago. Having no response from her since, I am trying my luck here.

Is your feature request related to a problem? Please describe.
Several of the proposed payment methods are tied to the billing address country. (like Klarna, AliPay, EPS, ...)

My implementation partner did not find a way to trigger this refresh in the cartridge.
The feature is not present out-of-the-box in the cartridge.

We are using version 2.0.1.

Did they miss something and this feature is already available?
We should not be the only client with this need.

Describe the solution you'd like
On the checkout billing page, when the billing address country value changes, the payment methods are updated.

Describe alternatives you've considered
Custom code overriding the Adyen cartridge, but since this need should already be covered, we are awaiting for a return from Adyen first.

Additional context
Is there an easier approach to implementing such changes than overriding the cartridge?
My implementation partner team talked about a file within the Adyen package located in the node_modules directory.

@VBQ-GuillaumeMOULIN VBQ-GuillaumeMOULIN added the enhancement Indicates new feature requests label Nov 4, 2024
@olga-adyen
Copy link
Contributor

Hi @VBQ-GuillaumeMOULIN

Thank you very much for your valuable feedback.

The list of payment methods on the checkout page is populated based on the shopper’s locale and country code. As a result, changing the billing information alone does not trigger new parameters in the /paymentmethods call.

Currently, our team is focused on enhancing the stability and performance of our existing services. While we may not be able to address this request immediately, please know that we genuinely value your input and will consider it carefully.

In the meantime, you might consider extending the existing cartridge to adjust the /paymentmethods call, allowing it to reflect locale adjustments based on the billing address. You can refer to our customization guidelines for assistance with this approach.

Thank you again for your insights, and please don’t hesitate to reach out if there’s anything further we can support you with.

Best regards,

@pedrocerqueiraOSF
Copy link

Hi @olga-adyen,

I'm part of the partner team that is helping to deploy the package and I would like to please have your feedback on our solution.

Our problem is that we need to override some files in the Adyen package that are not exposed.
Here, we can see a list of all files that are possible to override:
https://github.com/Adyen/adyen-salesforce-headless-commerce-pwa/blob/main/packages/adyen-salesforce-pwa/lib/index.js

In addition to these files, in order to meet the requirements, we need to override more files.
Here are some examples of some files we need to override:

  • applePayExpress.jsx
  • adyen-checkout-context.jsx
    The problem here is that these files have imports from other files that are not exposed.

The solution we implemented is as follows: In the root of the PWA Kit project, we create a folder called vendors and place the original adyen-salesforce-pwa package - without any changes. And in these files, instead of using the original imports (as exists in the node_modules folder), we use the imports from the vendors folder.
For example:

`
(...)
import {
onPaymentsDetailsSuccess,
onPaymentsSuccess
} from '../../../vendors/adyen-salesforce-pwa/lib/contexts/helper'

export const AdyenCheckoutContext = React.createContext({})

const AdyenCheckoutProvider = ({
(...)
`

We thought to copy only the modified files and the files they import into our code structure directly but it would be really painful to update these files each time there is an upgrade of the adyen-salesforce-pwa package, that's why we chose this solution.

I would like to please understand your feedback on this solution and whether we can use it without any risk.
 
Thank you!
 
Best Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

3 participants