Amazon Pay - Rendering a "Pay with Amazon" Button on the Cart Page
Usually the checkout page includes information for the buyer to review, items in the cart, prices, total price information and some other order related details.
From this page, the buyer can proceed to checkout by clicking a related GUI element (for example hyperlink or button).
Amazon Pay provides its own GUI element, a button which renders by Amazon Javascript code snippet and looks as follows:
If the buyer is a registered Amazon customer, clicking the button prompts to enter their Amazon login and password.
If correct, Amazon creates an order reference and passes it to the shop.
Using this reference and Amazon Pay credentials it is possible to run Amazon Pay API queries.
To insert the Amazon Pay button in your shop, add the following widget on your page::
{{ render(path('amazonpay_paybutton')) }}
Configuration is used from your current settings profile.
Results:
If everything was done properly, the clickable button will be displayed and by clicking it, the user will see a popup window with Amazon prompt to login.
The Popup looks as follows:
See also:
- Get a general idea about Amazon Pay
- Configure Amazon Pay API
- Configure Amazon Pay
- Obtaining Amazon Order Reference and Shipping Addresses details
- Learn how Amazon Pay Refund works
- Learn how Amazon Pay Sandbox Simulations work
- Learn about Amazon Pay state machine for synchronous and asynchronous flows
- Learn about OMS commands
- Check out Amazon Pay example email notifications
- Check support of bundled products with Amazon
Last review date: Sep 16, 2019