This extension is under the active development even though Adobe dropped the support for Magento 1.x e-commerce platform (Jul 1st, 2020). Creativestyle will provide the necessary updates and support for this extension as long as this extension will be used by the active Amazon Pay merchants.
Order & payment workflow
The Login and Pay with Amazon extension follows the standard Magento order and payment workflow, and thus processing Pay with Amazon payments doesn't differ significantly from other payment methods available in Magento, making it easy to handle. The most important difference, comparing to the standard Magento orders, is delayed access to the billing address, which is backfilled later in the synchronization process after the successful authorization.
All Amazon payment objects (OrderReference, Authorize, Capture and Refund) are reflected in corresponding payment transactions in Magento, which are connected with appropriate document entities provided by the Magento, (invoices for captures, credit memos for refunds).
Pay with Amazon button
The Pay with Amazon button appears in several places in the shop:
- on the shopping cart page,
- in the 1st step of the default One Page Checkout,
- in the sidebar cart widget.
You can also place the Pay with Amazon button in any place you like by including following statement in the template file:
<?php echo Mage::helper('amazonpayments')->getPayWithAmazonButton(); ?>
Pressing the Pay with Amazon button launches the Amazon Payments authentication window, where the customer is asked for his Amazon account e-mail address and password.
After a successful login the customer is redirected to the Amazon checkout page in your shop.
Placing an order
The Pay with Amazon checkout form consists of 4 steps arranged within a single page (unlike Magento default checkout, which uses accordion for showing and hiding particular steps of the checkout). These steps are: shipping address (handled by Amazon's address book widget), payment method (handled by Amazon's wallet widget), shipping method and order review (handled by default Magento checkout templates). All fields in the form (shipping address, payment method and shipping method) are pre-filled, which means that in very basic scenario customer can finish the checkout with just one click. Unfortunately, pre-filling doesn't apply to the terms and conditions checkbox (if used at all) and can raise the number of required clicks, which, however, doesn't affect the easiness and user-friendliness of the Pay with Amazon payment method.
The value selected in each checkout step is saved in a separate AJAX call. When the checkout form shows up for the first time, depending on the internet connection speed and the web-server's response time, it may take up to few seconds until Place order button gets active and can be clicked by the customer.
After selecting the desired shipping address, payment method, shipping method and pressing Place order button (preceded by accepting terms and conditions if needed), the customer is redirected to the success page. Pay with Amazon uses the default Magento success page, which means there's no need to add any tracking scripts or additional page layout elements that you use in default Magento checkout and want also use in Amazon checkout, all features implemented additionally on the Magento success page shall also appear on Amazon checkout success page.
The created order will be transferred to Amazon and will appear in your Magento admin in Pending (by default) or Processing (if you are using :ref:`synchronous authorization <configuration-authorization-processing-mode>`) state.
You may notice in the Magento admin that the billing address may be incorrect at this point (as mentioned in the introduction to this chapter). That's true if the billing differs from the shipping data. The only available payment object at the time of placing order is the OrderReference, which, unfortunately, doesn't provide billing data and thus shipping address must be used to meet Magento requirements concerning order data. The billing address will be updated as soon as authorization is confirmed by Amazon Payments. Keep also in mind that the billing address is available only for the sellers that provided a valid VAT number in Amazon Seller Central.
Amazon Pay extension supports multicurrency payments on the website level. Website is the top level organizational unit in Magento, it may share customer accounts, shipping and payment methods. To offer multicurrency support that is provided by Amazon Pay service in your Magento shop, you have to create a separate website for each currency you plan to offer in your shop, with the selected currency set as a base currency in Magento settings.
By default the base currency is set globally in Magento, to make it available on the website level, please go to :menuselection:`System --> Configuration --> Catalog --> Catalog --> Price --> Catalog Price Scope` and set its value to Website.
Next go to :menuselection:`System --> Configuration --> General --> Currency Setup --> Currency Options --> Base Currency` and set its value to the selected currency for each of the websites you created previously to offer multicurrency support for your customers. The website configuration scope can be changed by selecting appropriate entry in the Current Configuration Scope dropdown list in the top right corner of the configuration page.
Please note, that multicurrency support in the extension doesn't use Display Currency setting, which may be set on the store view level. Display currency is used just for the storefront presentation purposes and doesn’t play any role in further order post-processing, because all transactions are processed using base currency. Such a behavior is implemented in Magento core classes and Amazon Pay extension do not break this rule.
An authorization can be requested after the order data is successfully transferred to Amazon. Depending on the value you've selected for :ref:`configuration-payment-action` option it can be processed in several ways. For Authorize and Authorize & capture actions it will be requested automatically as soon as order is placed in your shop and successfully transferred to Amazon. The requested authorization will be therefore either confirmed or declined by Amazon either via IPN message or via data polling, see :ref:`workflow-synchronizing-order-data` to get more details. The order, for which a payment authorization has been confirmed changes its state to Processing, an order email confirmation is sent to the customer (if not disabled in the extension settings, see :ref:`configuration-order-confirmation`) and you can start the fulfilment process.
Never dispatch ordered items before the authorization is confirmed. Only the confirmed authorization guarantees that you will be able to capture the order amount (if you capture within 7 days).
In case you ship ordered items after 30 days or more you have to select Manual authorization as a payment action. It will stop Magento from requesting an authorization automatically and let you make an authorization request manually from the Magento admin at any suitable time. To manually invoke an authorization, login to the Magento admin, open the order you want authorize payment for and click the Authorize payment button placed in the top buttons rows.
Next post-request processing (authorization confirmation or decline) is processed in the same way as in automatic authorization (through polling or IPN).
If the authorization is declined by Amazon due to problem with the payment method selected, your customer will be informed about this case via e-mail and requested to visit the Amazon Payments web site. The customer can on this page update the payment method by following the instructions on the web page. The e-mail sent to the customer can be adjusted according to the :ref:`customization-email-templates` section. After the successful payment method update, Amazon will notify Magento about the new authorization status and payment will get back on the track (via polling or IPN).
In case the authorization has been declined due to any other reason then problems with the selected payment method, the notification email will be sent to shop administrator and appropriate action must be undertaken according to the Amazon Payments Integration Guide.
Capturing the payment amount
After a successful authorization, you can capture funds against the authorization. The capture, similar to the authorization, can be requested in two modes: manual and automatic. By default you should capture the order amount at the moment you ship the ordered items by creating an invoice. You are only allowed to enable automatic capture if you sell digital goods or you ship items the same day they are ordered. Moreover you have to be white-listed by Amazon Payments. Contact Amazon Payments if you want to use this option.
:ref:`configuration-payment-action` option in the extension settings allows to switch between manual and automatic capture mode. For Manual authorization & Authorization actions the capture is triggerd by creating manually an invoice for the order in the Magento admin. For Authorize & capture action, the capture is requested automatically as soon as authorization is confirmed by Amazon Payments.
To capture the order amount, you must create an invoice first. To create an invoice, login to the Magento admin, open the order for which you want to capture the amount and click the Invoice button located in the top buttons rows. Please make sure that the order you want to process has been successfully authorized, which basically means that it is in Processing state.
After clicking the Invoice button, a new invoice form will appear with most of the crucial data (like products quantity) already filled in. You can adjust some invoice fields if needed. At this point you can create a shipment as well, by checking Create Shipment checkbox and adding a tracking number if needed. Before submitting the form, please make absolutely sure that Amount selectbox is set to Capture online and press Submit Invoice button. A new invoice and a new shipment (if checked Create Shipment checkbox) will be created for the order and the capture request is sent to Amazon Payments.
To collect the funds that were authorized, you must capture the amount within 30 days of a successful authorization (two days in Sandbox mode). We strongly recommend that you capture funds within seven days of authorization to reduce the likelihood of declines (within 7 days the a successful captures is guaranteed). In case your fulfilment process exceeds 30 days, consider using the Manual authorization as payment action in the configuration and authorize the payment later in any suitable time (typically in the week before the shipping) before the shipping.
Partial captures are not supported by the extension at this moment.
The capture status, similar to authorizations, will be updated either via IPN message or via data polling, see :ref:`workflow-synchronizing-order-data` for more details.
In this mode the capture is requested automatically after the successful authorization. Also the invoice that covers all ordered items is created automatically. Post-request processing (capture status synchronization) is carried the same way as in capture invoked manually from Magento backend.
Refunding order items
The order, which payment has been captured for, can be refunded either fully or partially. Refunds are made against the invoices and thus having a paid invoice assigned to the order is a necessary condition that has to be met to refund any order item. Refunds in Magento are recorded as credit memos, so for requesting a refund with Amazon Payments you should create a credit memo first. To create a credit memo login to the Magento admin, open the order you want refund, click Invoices tab on the right, select an invoice you want to refund and click on it.
A preview of the selected invoice will appear. Make sure that you are on the single invoice preview page and click the Credit Memo button.
A new credit memo form will appear with most of the crucial data (like products quantity to be refunded) already filled in. If you want to refund the invoice partially (i.e. only a part of the invoiced items) adjust the product quantities to be refunded (set 0 for items that shall not be refunded) and click Update Qty's button to update refund totals. You can also set the refunded items back to stock by checking Return to Stock checkbox. Next choose if you want to refund shipping costs or apply any refunds adjustment and fill in the appropriate fields. Next before submitting the credit memo form, double check that you have Refund button available and click it. A credit memo will be created and a refund will be requested with Amazon Payments. Its status will be updated either via IPN or data polling, depending on the update method selected in the extension settings.
For the successful refund (recorded in Magento and requested (!) with Amazon Payments) always use Refund button available on the new credit memo form invoked from the single invoice preview page. If you click Credit Memo button directly on the order page you will be redirected to the new credit memo form with Refund offline button only, which admittedly will record credit memo in Magento, but surely won't call refund request at Amazon Payments gateway. If in any case you will get a credit memo with Refund offline button only then surely something had to go wrong and you should stop the refund process immediately and start it from the beginning following the above guideline.
Cancelling an order
For a variety of reasons it sometimes becomes necessary to cancel an order. To cancel an order and notify Amazon about the payment cancellation:
- Please make sure the amount of the order you want to cancel hasn't been captured yet,
- Go to :menuselection:`Sales --> Orders` and select the order that you would like to cancel by clicking the Edit button on its respective row,
- Click Cancel in order page to remove this order.
Synchronizing order data
.. todo:: Synchronizing order data