-
Notifications
You must be signed in to change notification settings - Fork 76
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
PWA Studio Integration #1133
Comments
Hello again @ptylek ! Yes, comparing the GraphQL docs with the AP dev docs could be a little difficult, since the Amazon Pay module deals with the SDK directly so the developer doesn't have to. Instead, I would recommend having a look at the Frontend Customisation section of the module documentation, specifically the Notes on the Checkout Session API section and the example flow in Configurable URLs. You should be able to match most of the GraphQL queries/mutations pretty closely to the corresponding REST endpoints. Also bear in mind that there are more details you'll have to handle yourself on the frontend side, such as placing and rendering the Amazon Pay button and handling the redirects. See Add the Amazon Pay Button for details on adding the Amazon Pay script, and do note that the module will generate the button payload and signature for you. You'll also need to make sure that your site can handle the various responses from Amazon throughout a checkout session by properly defining the Configurable URLs in your module configuration, and placing appropriate logic there to obtain the checkoutSessionId, redirect to your checkout URL, complete the checkout session, etc. Please let us know if this helps, |
Hey @sgabhart22, thanks for your reply, this is helpful and probably the only solution for now. |
@ptylek I don't believe there is anything concretely planned as far as developing an Amazon Pay extension specifically for the Venia theme/PWA studio right now. There are so many different frontend options that a development team can choose with a headless Magento implementation that we initially chose to keep the GraphQL implementation generic, and available to be used with whatever frontend framework a merchant might have. If one of your goals is to display the AP button as a payment option, Lars Roettig has an excellent article on adding payment methods to the venia-ui checkoutPagePaymentTypes: https://larsroettig.dev/demystified-pwa-studio-checkout |
@sgabhart22 Thank you for your replies. It's really helpful 🙇🏻 |
Hey,
Are there any plans to extend and prepare more details about PWA Studio integration of this Magento 2 plugin? I found GraphQL API documentation but matching it together with Amazon Pay developer docs it's not as clear especially that the latter uses Amazon Pay SDK. Is the same functionality also prepared on the module so everything can be requested from Magento using GraphQL API?
I would be grateful for some more information in this matter.
Many thanks!
The text was updated successfully, but these errors were encountered: