Difference between revisions of "X-Cart:Amazon Pay (formerly Pay with Amazon)"

From X-Cart 4 Classic
Jump to: navigation, search
m
m (Getting started)
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{XC version|version=4.6.4|color=#FFB62F|comment={{{1|or above}}}}}
 
==Overview==
 
==Overview==
X-Cart's Pay with Amazon module provides an integration with Amazon Payments, a payment service that enables buyers to pay on your online store using the payment and shipping information already stored in their existing Amazon accounts. All the interaction of buyers with Amazon Payments takes place in embedded widgets, so that the buyers can complete the checkout process without ever leaving your website.
+
X-Cart's Amazon Pay (formerly Pay with Amazon) module provides an integration with Amazon Payments, a payment service that enables buyers to pay on your online store using the payment and shipping information already stored in their existing Amazon accounts. All the interaction of buyers with Amazon Payments takes place in embedded widgets, so that the buyers can complete the checkout process without ever leaving your website.
  
 
==System requirements and installation==
 
==System requirements and installation==
  
See [[X-Cart:Pay_with_Amazon_module_installation|Pay with Amazon module installation]].
+
Amazon Pay is available as a built-in module with X-Cart versions 4.6.4 and later. <br />
 +
For X-Cart versions 4.6.2 and 4.6.3, it may be obtained and installed separately. See [[X-Cart:Amazon_Pay_module_installation_(X-Cart_4.6.2_-_4.6.3)|X-Cart:Amazon Pay module installation (X-Cart 4.6.2 - 4.6.3)]].
  
 
==Getting started==
 
==Getting started==
  
# Register your Amazon Payments account.<br />Pay with Amazon is a new solution and is separate from the [[X-Cart:Amazon_Payments|Checkout by Amazon]] (CBA) solution. That means you’ll need to go through the registration process, even if you have an existing CBA account.<br />You can register for Amazon Payments using this link: [https://sellercentral.amazon.com/hz/me/sp/signup?solutionProviderOptions=mws-acc%3B&marketplaceId=AGWSWK15IEJJ7&solutionProviderToken=AAAAAQAAAAEAAAAQfpVQU5xLh2akayccfpDvHQAAAHBxwuqxsJNuB0RIC7O5G8WhzHOcCVrQdj2jj2lI0XFV7ANl7TAgQVke%2BEj%2Fp4yOoi7YI2r0BGAwgwx5tnxTD2K1K25xgDeKuwXrD79YFecvGLGlAAN%2FpYwMOuoL%2BiyD1926Yc27EmAFLxYJfWlnYwmS&solutionProviderId=A1PQFSSKP8TT2U Get started now >]<br /><br />
+
# Register your Amazon Payments account.<br />The new Amazon Pay solution is packed with enhanced features. To benefit from it, you’ll need to register for a new Amazon Payments account.<br />Sign up for FREE [https://payments.amazon.com/register?source=SPPD&&spId=A1PQFSSKP8TT2U here] if your business in based in the US, or [https://payments.amazon.co.uk/preregistration/lpa?LD=SPUKAP_EX_XCart16 here] if your business is based in the UK, Germany, Luxembourg, the Netherlands, Sweden, Portugal, Hungary or Denmark.<br /><br />
 
# Log in to Amazon's Seller Central at https://sellercentral.amazon.com to complete a few extra steps. If you’ve registered for multiple Amazon services, you’ll see a dropdown at the top of the page that lets you move between the different services.<br />[[File:Amazon_services.png|border|700px]]<br /><br />
 
# Log in to Amazon's Seller Central at https://sellercentral.amazon.com to complete a few extra steps. If you’ve registered for multiple Amazon services, you’ll see a dropdown at the top of the page that lets you move between the different services.<br />[[File:Amazon_services.png|border|700px]]<br /><br />
 
# Create a test account to use in Sandbox mode.<br />Select "Amazon Payments Advanced (Sandbox View)" from the drop-down box at the top of the screen. Under "Integration" -> "Test Accounts", you can create test accounts for use in Sandbox mode. Sandbox mode can be used to make test purchases without processing an actual payment.<br />[[File:Amazon_test_accounts.png|border|700px]]<br /><br />
 
# Create a test account to use in Sandbox mode.<br />Select "Amazon Payments Advanced (Sandbox View)" from the drop-down box at the top of the screen. Under "Integration" -> "Test Accounts", you can create test accounts for use in Sandbox mode. Sandbox mode can be used to make test purchases without processing an actual payment.<br />[[File:Amazon_test_accounts.png|border|700px]]<br /><br />
Line 23: Line 25:
 
#:* Accept the license agreement.
 
#:* Accept the license agreement.
 
#:* Your keys will be set up in your account, you can ignore the IDs you see on the final page.
 
#:* Your keys will be set up in your account, you can ignore the IDs you see on the final page.
#:* Go back to Seller Central (http://sellercentral.amazon.com) to the "MWS Access Key" page to see the keys you'll need to enter in X-Cart.
+
#:* Go back to Seller Central (http://sellercentral.amazon.com) to the "MWS Access Key" page to see the keys you'll need to enter in X-Cart.<br /><br />
# In a new browser tab or window, log in to the Admin interface of your X-Cart store. Copy the account keys from Seller Central and paste them into X-Cart on the Pay with Amazon module configuration page. Specify the rest of the settings (Operation mode, Currency, Capture mode) as required and save the configuration. We recommend setting the Operation mode to "Test" first, so you can create some orders in Sandbox mode and see how it works. For more info on the module configuration settings, see:
+
# In a new browser tab or window, log in to the Admin interface of your X-Cart store. Copy the account keys from Seller Central and paste them into X-Cart on the Amazon Pay module configuration page. Specify the rest of the settings (Operation mode, Currency, Capture mode) as required and save the configuration. We recommend setting the Operation mode to "Test" first, so you can create some orders in Sandbox mode and see how it works. For more info on the module configuration settings, see:
#* [[#Configuring the module|Pay with Amazon: Configuring the module]].
+
#* [[#Configuring the module|Amazon Pay: Configuring the module]].<br /><br />
# In Seller Central, configure your instant notification settings (IPN):<br />Under "Settings" -> "Integration Settings", enter your '''Merchant URL'''. The Sandbox and Production accounts each have separate values for this setting, so you must switch the view using the drop-down box at the top of the screen to set both. The URL you'll need to enter is <u>httрs://<YOUR_XCART_STORE>/payment/amazon_pa_ipn_recv.php</u> (HTTPS is required when you configure your IPN URL for the production account. HTTP is only allowed for testing since no private customer data is passed in test mode).<br />{{Note1|'''Note''': Recent web servers use a protocol called Server Name Indication (SNI) to support hosting of multiple sites on a single domain.  Unfortunately, Amazon Payments does not support the use of SNI for IPN destinations, so you may need to configure a default certificate to be used on your web server and use this certificate’s registered domain name in your configured IPN URL.  For example, if your site is configured with two secure virtual hosts, httрs://www.site.com and httрs://store.site.com, you should configure one of these certificates as the default to be returned if SNI is not supported.  The IPN URL must then be configured to match your default certificate.<br />Please refer to your web server’s documentation for how to configure default certificates.  On Apache web servers, this is commonly configured in a file included in your installation under /etc/httpd/conf.d/ called ssl.conf.}}<br />
+
# In Seller Central, configure your instant notification settings (IPN):<br />Under "Settings" -> "Integration Settings", enter your '''Merchant URL'''. The Sandbox and Production accounts each have separate values for this setting, so you must switch the view using the drop-down box at the top of the screen to set both. The URL you'll need to enter is <u>httрs://<YOUR_XCART_STORE>/payment/amazon_pa_ipn_recv.php</u> (HTTPS is required when you configure your IPN URL for the production account. HTTP is only allowed for testing since no private customer data is passed in test mode).<br /><br />
# If you wish to use your own graphics (company logo) in the pop-up window where buyers will sign in to Amazon Payments, upload the image in Seller Central (This is called "Pop-up Window Banner" under "Settings" -> "Integration Settings"). Banner images must be 520 pixels wide by 50 pixels tall, and they must have no animation. Image files should be in .jpg or .gif format.
+
# If you wish to use your own graphics (company logo) in the pop-up window where buyers will sign in to Amazon Payments, upload the image in Seller Central (This is called "Pop-up Window Banner" under "Settings" -> "Integration Settings"). Banner images must be 520 pixels wide by 50 pixels tall, and they must have no animation. Image files should be in .jpg or .gif format.<br /><br /><div id="Point9AppRegistration"></div>
# If you disabled the Pay with Amazon module in X-Cart after installation, enable (activate) it:<br />
+
# If using X-Cart version 4.7.7 or later, you will need to complete a few additional steps:<br />a) Go to в https://sellercentral.amazon.com/gp/homepage.html <br />b) Use the drop-down box at the top right-hand corner of the page to switch to ''Login with amazon''.<br />c) Create a new application: Click the button '''Register new application''', provide the required information about your application (Name, Description, Privacy Notice URL and Logo Image) and click '''Save''':<br />[[File:xc4_paywithamazon_registerapp1.png|600px|border]]<br /><br /> d) Choose to configure your application's Web Settings:<br />[[File:xc4_paywithamazon_registerapp2.png|600px|border]]<br /><br />You will need to enter the  '''Allowed JavaScript Origins''' and '''Allowed Return URLs''' URLs:<br />[[File:xc4_paywithamazon_registerapp3.png|600px|border]]<br /><br />The URLs for these fields can be obtained in the Amazon Pay module configuration section of your X-Cart store's Admin area - you simply need to copy and paste them. Click '''Edit''', add the URLs and save the changes.<br /><br />After your application has been created and configured, you will find your '''Client ID''' in the Web Settings section of your application details:<br />[[File:xc4_paywithamazon_registerapp4.png|600px|border]]<br /><br />Copy this value and paste it into the '''Client ID''' field of the Amazon Pay module configuration settings in your X-Cart store's Admin area ('Main page :: Payment methods' page > 'Amazon Pay' tab; see [[#Configuring the module | Amazon Pay: Configuring the module]].)<br /><br />
#* [[#Activating and deactivating the module|Pay with Amazon: Activating and deactivating the module]]
+
# If you disabled the Amazon Pay module in X-Cart after installation, enable (activate) it:<br />
 +
#* [[#Activating and deactivating the module|Amazon Pay: Activating and deactivating the module]]
 
# Test your setup in Sandbox mode. You can use the test account you set up earlier. We recommend trying out both your customer-facing checkout flow as well as order management to get a feel for how orders are processed.
 
# Test your setup in Sandbox mode. You can use the test account you set up earlier. We recommend trying out both your customer-facing checkout flow as well as order management to get a feel for how orders are processed.
# Once you’re ready to go live with your Pay with Amazon module, configure the module to production mode by setting its Operation mode to "Live" and you should be ready to go.
+
# Once you’re ready to go live with your Amazon Pay module, configure the module to production mode by setting its Operation mode to "Live" and you should be ready to go.
 
# Order Management<br />You manage orders entirely within X-Cart’s order management interface, as you would with a standard credit card payment gateway. There's no need to process the orders via Amazon's Seller Central website as with Checkout by Amazon.
 
# Order Management<br />You manage orders entirely within X-Cart’s order management interface, as you would with a standard credit card payment gateway. There's no need to process the orders via Amazon's Seller Central website as with Checkout by Amazon.
  
 
==Activating and deactivating the module==
 
==Activating and deactivating the module==
  
If the module Pay with Amazon is installed, but not active, you can enable (activate) it.
+
If the module Amazon Pay is installed, but not active, you can enable (activate) it.
  
 
'''To enable the module''':
 
'''To enable the module''':
  
 
# Go to the Modules section of your store's Admin area (Settings menu->Modules). This opens the list of your store's installed modules.
 
# Go to the Modules section of your store's Admin area (Settings menu->Modules). This opens the list of your store's installed modules.
# Locate the entry for the Pay with Amazon module and select the respective check box on the left.
+
# Locate the entry for the Amazon Pay module and select the respective check box on the left.
 
# Click '''Apply changes'''. The module will be enabled.
 
# Click '''Apply changes'''. The module will be enabled.
  
It is possible to temporarily disable (deactivate) the installed Pay with Amazon module. Deactivation stops the module from operation, but it does not remove any settings you made to the module configuration nor clear any data that was generated during the period that the module was in operation. If you wish to completely remove all the data related to using the module, you need to uninstall it. See [[Draft:X-Cart:Pay_with_Amazon_module_installation#Uninstallation|Pay with Amazon: Uninstallation]] for more info.
+
It is possible to temporarily disable (deactivate) the installed Amazon Pay module. Deactivation stops the module from operation, but it does not remove any settings you made to the module configuration nor clear any data that was generated during the period that the module was in operation. If you wish to completely remove all the data related to using the module, you need to uninstall it. See [[X-Cart:Amazon_Pay_module_installation#Uninstallation|Amazon Pay: Uninstallation]] for more info.
  
 
'''To disable the module''':
 
'''To disable the module''':
  
 
# Go to the Modules section of your store's Admin area (Settings menu->Modules).
 
# Go to the Modules section of your store's Admin area (Settings menu->Modules).
# Locate the entry for the Pay with Amazon module and unselect the respective check box on the left.
+
# Locate the entry for the Amazon Pay module and unselect the respective check box on the left.
 
# Click '''Apply changes'''. The module will be disabled.
 
# Click '''Apply changes'''. The module will be disabled.
  
Line 58: Line 61:
 
'''To configure the module''':
 
'''To configure the module''':
  
# Open to the module configuration section. Use one of the following methods:
+
# Open the module configuration section. Use one of the following methods:
#* In the Modules section of your store's Admin area (Settings menu->Modules), locate the entry for 'Pay with Amazon' module and click the Configure link next to it:<br />[[File:PwA_configure.png|border]]<br /><br />OR:<br />
+
#* In the Modules section of your store's Admin area (Settings menu->Modules), locate the entry for 'Amazon Pay' module and click the Configure link next to it:<br />[[File:PwA_configure.png|border]]<br /><br />OR:<br />
#* In the Payment methods section of your store's Admin area (Settings menu->Payment methods), click the 'Pay with Amazon' tab:<br />[[File:PwA_tab.png|border]]<br /><br />The Pay with Amazon module configuration section looks like the following:<br />[[File:PwA_settings1.png|border]]<br /><br />
+
#* In the Payment methods section of your store's Admin area (Settings menu->Payment methods), click the 'Amazon Pay' tab:<br />[[File:PwA_tab.png|border]]<br /><br />The Amazon Pay module configuration section looks similar to the following (The actual set of settings available on the page will differ depending on the version of X-Cart being used; the screenshot below corresponds to X-Cart version 4.7.7):<br />[[File:PwA_settings1.png|620px|border]]<br /><br />
 
# Adjust the module configuration settings:
 
# Adjust the module configuration settings:
 
#* '''Operation mode''': Use this to switch between the Sandbox and Production modes for the Amazon Payments Advanced integration.
 
#* '''Operation mode''': Use this to switch between the Sandbox and Production modes for the Amazon Payments Advanced integration.
Line 66: Line 69:
 
#* '''Access Key ID''': Enter your Access Key ID from your Seller Central account.
 
#* '''Access Key ID''': Enter your Access Key ID from your Seller Central account.
 
#* '''Secret Access Key''': Enter your Secret Access Key from your Seller Central account.
 
#* '''Secret Access Key''': Enter your Secret Access Key from your Seller Central account.
 +
#* '''Client ID''' (The field is available in X-Cart versions 4.7.7 and later): Enter your Client ID.
 +
#* '''Region''' (The field is available in X-Cart versions 4.7.7 and later): Enter the region of your Amazon Pay account.
 
#* '''Currency''': Select your currency.
 
#* '''Currency''': Select your currency.
 
#* '''Capture mode''': Specify the desired capture mode ("Authorization then capture" or "Immediate Charge"). The "Authorization then capture" mode means that, when your buyer submits their order on checkout, you only get an Authorization on the payment method they selected, but not charge the buyer until you fulfill the order. To actually charge the funds you have authorized, you need to manually capture the payment amount by clicking the '''Capture''' button on the details page of the respective order in your X-Cart store. "Immediate Charge" means that, when buyer submits their order on checkout, the payment is both Authorized and Captured at the same moment.<br />{{Note1|'''Note''': The Amazon Payments policy states that you charge your buyer when you fulfill their order. For physical goods, the order is considered fulfilled when the goods are shipped. For digital goods and services, the order is considered fulfilled when the goods or services are delivered to the buyer. If you want to charge your buyer before you ship, you must contact the Amazon Payments team for approval.}}
 
#* '''Capture mode''': Specify the desired capture mode ("Authorization then capture" or "Immediate Charge"). The "Authorization then capture" mode means that, when your buyer submits their order on checkout, you only get an Authorization on the payment method they selected, but not charge the buyer until you fulfill the order. To actually charge the funds you have authorized, you need to manually capture the payment amount by clicking the '''Capture''' button on the details page of the respective order in your X-Cart store. "Immediate Charge" means that, when buyer submits their order on checkout, the payment is both Authorized and Captured at the same moment.<br />{{Note1|'''Note''': The Amazon Payments policy states that you charge your buyer when you fulfill their order. For physical goods, the order is considered fulfilled when the goods are shipped. For digital goods and services, the order is considered fulfilled when the goods or services are delivered to the buyer. If you want to charge your buyer before you ship, you must contact the Amazon Payments team for approval.}}
 +
#* '''[https://pay.amazon.com/uk/developer/documentation/lpwa/201952140#documentation__content Type of authorization request]''' (The field is available in X-Cart versions 4.6.4 and later): Specify the type of request you wish to use. If ''Asynchronous'' is chosen, Amazon Pay will have to send a request to the Merchant URL before the order status can be set to ''Processed''. If ''Synchronous'' is chosen, the appropriate order status will be set straight away, without Amazon Pay sending requests to the Merchant URL.
 
# Click '''Apply changes'''.<br />This is it. Now your module has been configured.
 
# Click '''Apply changes'''.<br />This is it. Now your module has been configured.
  
 
==Customer experience==
 
==Customer experience==
In the Customer area of your X-Cart store, in all the locations from which buyers can initiate the checkout process using the standard X-Cart's '''Checkout''' button, the Pay with Amazon module adds another button: '''Pay with Amazon'''.
+
In the Customer area of your X-Cart store, in all the locations from which buyers can initiate the checkout process using the standard X-Cart's '''Checkout''' button, the Amazon Pay module adds another button: '''Amazon Pay'''.
  
 
Here's what it looks like on "Your cart" page:<br />
 
Here's what it looks like on "Your cart" page:<br />
Line 80: Line 86:
 
::[[File:PwA_add_to_cart.png|border]]<br /><br />
 
::[[File:PwA_add_to_cart.png|border]]<br /><br />
  
Once the '''Pay with Amazon''' button is clicked, a pop-up window titled "Amazon Payments: Sign In" is displayed where the buyer is asked for their Amazon Payments account email address and password:
+
Once the '''Amazon Pay''' button is clicked, a pop-up window titled "Amazon Payments: Sign In" is displayed where the buyer is asked for their Amazon Payments account email address and password:
 
::[[File:PwA_signin.png|border]]<br />
 
::[[File:PwA_signin.png|border]]<br />
 
(As you can see in the screenshot above, you can add your company logo in the buyer authentication pop-up window. This can be done by uploading your own banner image on the "Settings" -> "Integration Settings" page in Seller Central).
 
(As you can see in the screenshot above, you can add your company logo in the buyer authentication pop-up window. This can be done by uploading your own banner image on the "Settings" -> "Integration Settings" page in Seller Central).
Line 91: Line 97:
 
After selecting a shipping address and a payment method from their account, the buyer selects a shipping method. X-Cart uses the information provided by the customer to calculate the shipping cost and taxes. Then the buyer places the order using the '''Submit order''' button. This sends a payment request to Amazon.
 
After selecting a shipping address and a payment method from their account, the buyer selects a shipping method. X-Cart uses the information provided by the customer to calculate the shipping cost and taxes. Then the buyer places the order using the '''Submit order''' button. This sends a payment request to Amazon.
  
After submitting the order, the buyer sees X-Cart's standard order confirmation page ("Congratulations! Your order has been successfully placed") displaying the order invoice with all the required information (The payment method is shown as "Pay with Amazon", and the order status is "Queued").
+
After submitting the order, the buyer sees X-Cart's standard order confirmation page ("Congratulations! Your order has been successfully placed") displaying the order invoice with all the required information (The payment method is shown as "Amazon Pay", and the order status is "Queued").
  
 
In a few minutes, after Amazon processes the payment request, Amazon sends a notification, called an Instant Payment Notification (IPN), to notify your store about the final status of the request. As a result, the order status in your store is updated to one of the following:
 
In a few minutes, after Amazon processes the payment request, Amazon sends a notification, called an Instant Payment Notification (IPN), to notify your store about the final status of the request. As a result, the order status in your store is updated to one of the following:
Line 101: Line 107:
 
==Admin experience==
 
==Admin experience==
  
In your store's Admin area, orders that were placed by customers using Pay with Amazon can be identified by the name of the payment method specified in the order details  ("Pay with Amazon"). The order details page for such orders includes a section titled "Pay with Amazon available order actions". Depending on the order status, this section may include the following buttons:
+
In your store's Admin area, orders that were placed by customers using Amazon Pay can be identified by the name of the payment method specified in the order details  ("Amazon Pay"). The order details page for such orders includes a section titled "Amazon Pay available order actions". Depending on the order status, this section may include the following buttons:
 
:* '''Capture''' and '''Void''': These buttons are displayed when "Authorization then capture" mode is used, and the order is in the "Pre-Authorized" status. The '''Capture''' button allows you to collect payment from the buyer after the respective payment amount has been authorized. The '''Void''' button allows you to void the authorization.<br />[[File:PwA_order_details.png|border]]<br /><br />
 
:* '''Capture''' and '''Void''': These buttons are displayed when "Authorization then capture" mode is used, and the order is in the "Pre-Authorized" status. The '''Capture''' button allows you to collect payment from the buyer after the respective payment amount has been authorized. The '''Void''' button allows you to void the authorization.<br />[[File:PwA_order_details.png|border]]<br /><br />
 
:* '''Refund''': This button allows you to refund the payment if you already captured funds. It is displayed when the order is "Processed" or "Completed".<br />[[File:PwA_order_details1.png|border]]<br /><br />
 
:* '''Refund''': This button allows you to refund the payment if you already captured funds. It is displayed when the order is "Processed" or "Completed".<br />[[File:PwA_order_details1.png|border]]<br /><br />
:* '''Refresh status''': This button is displayed if Instant Payment Notification with the results of processing the payment on the side of Amazon Payments was not received by the store. This may be the case if IPN was not configured or was not working for some reason at the time of the transaction. The '''Refresh status''' button provides a workaround solution allowing you to obtain information on the current status of the payment in Amazon Payments and to synchronize the status of the order in X-Cart with it. When you click this button, your store sends a request to Amazon Payments; after a response from Amazon is received, the status of the order in X-Cart is updated appropriately, and the respective buttons for available order actions ("Capture" and "Void", or "Refund") get displayed in the "Pay with Amazon available order actions" section.<br />[[File:PwA_order_details2.png|border]]<br /><br />
+
:* '''Refresh status''': This button is displayed if Instant Payment Notification with the results of processing the payment on the side of Amazon Payments was not received by the store. This may be the case if IPN was not configured or was not working for some reason at the time of the transaction. The '''Refresh status''' button provides a workaround solution allowing you to obtain information on the current status of the payment in Amazon Payments and to synchronize the status of the order in X-Cart with it. When you click this button, your store sends a request to Amazon Payments; after a response from Amazon is received, the status of the order in X-Cart is updated appropriately, and the respective buttons for available order actions ("Capture" and "Void", or "Refund") get displayed in the "Amazon Pay available order actions" section.<br />[[File:PwA_order_details2.png|border]]<br /><br />
  
At the moment, X-Cart's Pay with Amazon integration supports Authorize, Capture, Void and Refund operations only for the sum equalling the original order amount. Changes to the original authorization amount, partial captures and partial refunds are not supported. In situations calling for transactions with amounts that are more or less than the original order amount, we recommended cancelling the original order and working with the customer to place the order again. For example, if, after receiving an order, you find out that some of the items in the order have gone out of stock and cannot be fulfilled, you should Void or Refund the transaction and ask the customer to re-submit the order.
+
At the moment, X-Cart's Amazon Pay integration supports Authorize, Capture, Void and Refund operations only for the sum equalling the original order amount. Changes to the original authorization amount, partial captures and partial refunds are not supported. In situations calling for transactions with amounts that are more or less than the original order amount, we recommended cancelling the original order and working with the customer to place the order again. For example, if, after receiving an order, you find out that some of the items in the order have gone out of stock and cannot be fulfilled, you should Void or Refund the transaction and ask the customer to re-submit the order.
 +
 
 +
 
 +
==Amazon Pay FAQ==
 +
'''Q: Is there a way to see detailed Amazon requests logs?'''
 +
 
 +
'''A:''' To enable debug mode, edit this file: '''modules/Amazon_Payments_Advanced/config.php''' and add the following code anywhere in that file: '''define('AMAZON_PA_DEBUG', 1);'''
 +
 
 +
After that, detailed Amazon requests and replies will be written into "var/log" folder
 +
<br />
 +
 
 +
<div id="PwANotWorking"></div>
 +
'''Q: After an upgrade, Amazon Pay no longer works. What could be wrong?'''
 +
 
 +
'''A:''' If you have upgraded to X-Cart version 4.7.7 or later, the problem is likely related to the change in our Amazon Pay integration. Starting with this version, your X-Cart store needs to have a Client ID to be able to interact with your Amazon account properly. To obtain a Client ID, you will need to create and set up a new Amazon application. Also, to ensure the proper functioning of Amazon Pay, you will need to configure a couple of additional settings in your Login with Amazon account. For details, see [[#Point9AppRegistration|point 9]] of the "Amazon Pay: Getting started" instructions above.
 
<br /><br />
 
<br /><br />
 
See also:
 
See also:

Latest revision as of 16:01, 20 March 2019

X-Cart 4.6.4or above

Overview

X-Cart's Amazon Pay (formerly Pay with Amazon) module provides an integration with Amazon Payments, a payment service that enables buyers to pay on your online store using the payment and shipping information already stored in their existing Amazon accounts. All the interaction of buyers with Amazon Payments takes place in embedded widgets, so that the buyers can complete the checkout process without ever leaving your website.

System requirements and installation

Amazon Pay is available as a built-in module with X-Cart versions 4.6.4 and later.
For X-Cart versions 4.6.2 and 4.6.3, it may be obtained and installed separately. See X-Cart:Amazon Pay module installation (X-Cart 4.6.2 - 4.6.3).

Getting started

  1. Register your Amazon Payments account.
    The new Amazon Pay solution is packed with enhanced features. To benefit from it, you’ll need to register for a new Amazon Payments account.
    Sign up for FREE here if your business in based in the US, or here if your business is based in the UK, Germany, Luxembourg, the Netherlands, Sweden, Portugal, Hungary or Denmark.

  2. Log in to Amazon's Seller Central at https://sellercentral.amazon.com to complete a few extra steps. If you’ve registered for multiple Amazon services, you’ll see a dropdown at the top of the page that lets you move between the different services.
    Amazon services.png

  3. Create a test account to use in Sandbox mode.
    Select "Amazon Payments Advanced (Sandbox View)" from the drop-down box at the top of the screen. Under "Integration" -> "Test Accounts", you can create test accounts for use in Sandbox mode. Sandbox mode can be used to make test purchases without processing an actual payment.
    Amazon test accounts.png

  4. Set up your account
    Select "Amazon Payments Advanced (Production View)" from the drop-down box at the top of the screen. You’ll need to complete a tax interview and set up your bank account, even if you’ve already done so for an existing account. You’ll see a message and links to complete these steps on your home page when you switch to the Production View.
    Amazon tax interview bank account.png

  5. Get your account keys (These will need to be entered in X-Cart):
    • Under "Settings" -> "Integration Settings":
    • Your Merchant ID
      Amazon merchant id.png

    • Under "Integration" -> "MWS Access Key":
    • Your Access Key ID
    • Your Secret Access Key
      Amazon secret keys.png

    • Note: If you do not see your keys, you'll need to create new ones, which you do by clicking the link under "Create MWS Account":
    • Log in using your Seller Central account.
    • Select the "I want to access my own Amazon seller account with MWS" option.
    • Accept the license agreement.
    • Your keys will be set up in your account, you can ignore the IDs you see on the final page.
    • Go back to Seller Central (http://sellercentral.amazon.com) to the "MWS Access Key" page to see the keys you'll need to enter in X-Cart.

  6. In a new browser tab or window, log in to the Admin interface of your X-Cart store. Copy the account keys from Seller Central and paste them into X-Cart on the Amazon Pay module configuration page. Specify the rest of the settings (Operation mode, Currency, Capture mode) as required and save the configuration. We recommend setting the Operation mode to "Test" first, so you can create some orders in Sandbox mode and see how it works. For more info on the module configuration settings, see:
  7. In Seller Central, configure your instant notification settings (IPN):
    Under "Settings" -> "Integration Settings", enter your Merchant URL. The Sandbox and Production accounts each have separate values for this setting, so you must switch the view using the drop-down box at the top of the screen to set both. The URL you'll need to enter is httрs://<YOUR_XCART_STORE>/payment/amazon_pa_ipn_recv.php (HTTPS is required when you configure your IPN URL for the production account. HTTP is only allowed for testing since no private customer data is passed in test mode).

  8. If you wish to use your own graphics (company logo) in the pop-up window where buyers will sign in to Amazon Payments, upload the image in Seller Central (This is called "Pop-up Window Banner" under "Settings" -> "Integration Settings"). Banner images must be 520 pixels wide by 50 pixels tall, and they must have no animation. Image files should be in .jpg or .gif format.

  9. If using X-Cart version 4.7.7 or later, you will need to complete a few additional steps:
    a) Go to в https://sellercentral.amazon.com/gp/homepage.html
    b) Use the drop-down box at the top right-hand corner of the page to switch to Login with amazon.
    c) Create a new application: Click the button Register new application, provide the required information about your application (Name, Description, Privacy Notice URL and Logo Image) and click Save:
    Xc4 paywithamazon registerapp1.png

    d) Choose to configure your application's Web Settings:
    Xc4 paywithamazon registerapp2.png

    You will need to enter the Allowed JavaScript Origins and Allowed Return URLs URLs:
    Xc4 paywithamazon registerapp3.png

    The URLs for these fields can be obtained in the Amazon Pay module configuration section of your X-Cart store's Admin area - you simply need to copy and paste them. Click Edit, add the URLs and save the changes.

    After your application has been created and configured, you will find your Client ID in the Web Settings section of your application details:
    Xc4 paywithamazon registerapp4.png

    Copy this value and paste it into the Client ID field of the Amazon Pay module configuration settings in your X-Cart store's Admin area ('Main page :: Payment methods' page > 'Amazon Pay' tab; see Amazon Pay: Configuring the module.)

  10. If you disabled the Amazon Pay module in X-Cart after installation, enable (activate) it:
  11. Test your setup in Sandbox mode. You can use the test account you set up earlier. We recommend trying out both your customer-facing checkout flow as well as order management to get a feel for how orders are processed.
  12. Once you’re ready to go live with your Amazon Pay module, configure the module to production mode by setting its Operation mode to "Live" and you should be ready to go.
  13. Order Management
    You manage orders entirely within X-Cart’s order management interface, as you would with a standard credit card payment gateway. There's no need to process the orders via Amazon's Seller Central website as with Checkout by Amazon.

Activating and deactivating the module

If the module Amazon Pay is installed, but not active, you can enable (activate) it.

To enable the module:

  1. Go to the Modules section of your store's Admin area (Settings menu->Modules). This opens the list of your store's installed modules.
  2. Locate the entry for the Amazon Pay module and select the respective check box on the left.
  3. Click Apply changes. The module will be enabled.

It is possible to temporarily disable (deactivate) the installed Amazon Pay module. Deactivation stops the module from operation, but it does not remove any settings you made to the module configuration nor clear any data that was generated during the period that the module was in operation. If you wish to completely remove all the data related to using the module, you need to uninstall it. See Amazon Pay: Uninstallation for more info.

To disable the module:

  1. Go to the Modules section of your store's Admin area (Settings menu->Modules).
  2. Locate the entry for the Amazon Pay module and unselect the respective check box on the left.
  3. Click Apply changes. The module will be disabled.

Configuring the module

After the module has been installed and enabled, it needs to be configured.

To configure the module:

  1. Open the module configuration section. Use one of the following methods:
    • In the Modules section of your store's Admin area (Settings menu->Modules), locate the entry for 'Amazon Pay' module and click the Configure link next to it:
      PwA configure.png

      OR:
    • In the Payment methods section of your store's Admin area (Settings menu->Payment methods), click the 'Amazon Pay' tab:
      PwA tab.png

      The Amazon Pay module configuration section looks similar to the following (The actual set of settings available on the page will differ depending on the version of X-Cart being used; the screenshot below corresponds to X-Cart version 4.7.7):
      PwA settings1.png

  2. Adjust the module configuration settings:
    • Operation mode: Use this to switch between the Sandbox and Production modes for the Amazon Payments Advanced integration.
    • Amazon Seller ID: Enter your Merchant ID from your Seller Central account.
    • Access Key ID: Enter your Access Key ID from your Seller Central account.
    • Secret Access Key: Enter your Secret Access Key from your Seller Central account.
    • Client ID (The field is available in X-Cart versions 4.7.7 and later): Enter your Client ID.
    • Region (The field is available in X-Cart versions 4.7.7 and later): Enter the region of your Amazon Pay account.
    • Currency: Select your currency.
    • Capture mode: Specify the desired capture mode ("Authorization then capture" or "Immediate Charge"). The "Authorization then capture" mode means that, when your buyer submits their order on checkout, you only get an Authorization on the payment method they selected, but not charge the buyer until you fulfill the order. To actually charge the funds you have authorized, you need to manually capture the payment amount by clicking the Capture button on the details page of the respective order in your X-Cart store. "Immediate Charge" means that, when buyer submits their order on checkout, the payment is both Authorized and Captured at the same moment.
      Note: The Amazon Payments policy states that you charge your buyer when you fulfill their order. For physical goods, the order is considered fulfilled when the goods are shipped. For digital goods and services, the order is considered fulfilled when the goods or services are delivered to the buyer. If you want to charge your buyer before you ship, you must contact the Amazon Payments team for approval.
    • Type of authorization request (The field is available in X-Cart versions 4.6.4 and later): Specify the type of request you wish to use. If Asynchronous is chosen, Amazon Pay will have to send a request to the Merchant URL before the order status can be set to Processed. If Synchronous is chosen, the appropriate order status will be set straight away, without Amazon Pay sending requests to the Merchant URL.
  3. Click Apply changes.
    This is it. Now your module has been configured.

Customer experience

In the Customer area of your X-Cart store, in all the locations from which buyers can initiate the checkout process using the standard X-Cart's Checkout button, the Amazon Pay module adds another button: Amazon Pay.

Here's what it looks like on "Your cart" page:

PwA cart.png

in the "Minicart" widget:

PwA minicart.png

and in the "Add to cart" popup:

PwA add to cart.png

Once the Amazon Pay button is clicked, a pop-up window titled "Amazon Payments: Sign In" is displayed where the buyer is asked for their Amazon Payments account email address and password:

PwA signin.png

(As you can see in the screenshot above, you can add your company logo in the buyer authentication pop-up window. This can be done by uploading your own banner image on the "Settings" -> "Integration Settings" page in Seller Central).

After the buyer successfully authenticates, they find themselves on a special checkout page in X-Cart which has two Amazon widgets embedded in it: the AddressBook widget (the "Address Book" section) where the buyer can select a shipping address from their Amazon Payments account or add a new one and the Wallet widget (the "Payment Method" section) where the buyer can select a payment method from their Amazon Payments account:

PwA checkout.png

Note that the buyer stays on your store's site throughout the checkout process, without ever being redirected to Amazon.

After selecting a shipping address and a payment method from their account, the buyer selects a shipping method. X-Cart uses the information provided by the customer to calculate the shipping cost and taxes. Then the buyer places the order using the Submit order button. This sends a payment request to Amazon.

After submitting the order, the buyer sees X-Cart's standard order confirmation page ("Congratulations! Your order has been successfully placed") displaying the order invoice with all the required information (The payment method is shown as "Amazon Pay", and the order status is "Queued").

In a few minutes, after Amazon processes the payment request, Amazon sends a notification, called an Instant Payment Notification (IPN), to notify your store about the final status of the request. As a result, the order status in your store is updated to one of the following:

  • "Pre-Authorized" (= successful authorization, possible in "Authorization then capture" capture mode);
  • "Processed" (= successful authorisation and capture, possible in "Immediate Charge" capture mode);
  • "Failed" (= transaction declined).

Appropriate order notifications are then sent to the email addresses of the buyer and the store's orders department in accordance with your store's "General settings :: Email notifications options" configuration. When the payment's status in Amazon Payments transitions as a part of the payment process (for example, when you capture a previously authorized amount or issue a refund), appropriate notifications are sent as well.

Admin experience

In your store's Admin area, orders that were placed by customers using Amazon Pay can be identified by the name of the payment method specified in the order details ("Amazon Pay"). The order details page for such orders includes a section titled "Amazon Pay available order actions". Depending on the order status, this section may include the following buttons:

  • Capture and Void: These buttons are displayed when "Authorization then capture" mode is used, and the order is in the "Pre-Authorized" status. The Capture button allows you to collect payment from the buyer after the respective payment amount has been authorized. The Void button allows you to void the authorization.
    PwA order details.png

  • Refund: This button allows you to refund the payment if you already captured funds. It is displayed when the order is "Processed" or "Completed".
    PwA order details1.png

  • Refresh status: This button is displayed if Instant Payment Notification with the results of processing the payment on the side of Amazon Payments was not received by the store. This may be the case if IPN was not configured or was not working for some reason at the time of the transaction. The Refresh status button provides a workaround solution allowing you to obtain information on the current status of the payment in Amazon Payments and to synchronize the status of the order in X-Cart with it. When you click this button, your store sends a request to Amazon Payments; after a response from Amazon is received, the status of the order in X-Cart is updated appropriately, and the respective buttons for available order actions ("Capture" and "Void", or "Refund") get displayed in the "Amazon Pay available order actions" section.
    PwA order details2.png

At the moment, X-Cart's Amazon Pay integration supports Authorize, Capture, Void and Refund operations only for the sum equalling the original order amount. Changes to the original authorization amount, partial captures and partial refunds are not supported. In situations calling for transactions with amounts that are more or less than the original order amount, we recommended cancelling the original order and working with the customer to place the order again. For example, if, after receiving an order, you find out that some of the items in the order have gone out of stock and cannot be fulfilled, you should Void or Refund the transaction and ask the customer to re-submit the order.


Amazon Pay FAQ

Q: Is there a way to see detailed Amazon requests logs?

A: To enable debug mode, edit this file: modules/Amazon_Payments_Advanced/config.php and add the following code anywhere in that file: define('AMAZON_PA_DEBUG', 1);

After that, detailed Amazon requests and replies will be written into "var/log" folder

Q: After an upgrade, Amazon Pay no longer works. What could be wrong?

A: If you have upgraded to X-Cart version 4.7.7 or later, the problem is likely related to the change in our Amazon Pay integration. Starting with this version, your X-Cart store needs to have a Client ID to be able to interact with your Amazon account properly. To obtain a Client ID, you will need to create and set up a new Amazon application. Also, to ensure the proper functioning of Amazon Pay, you will need to configure a couple of additional settings in your Login with Amazon account. For details, see point 9 of the "Amazon Pay: Getting started" instructions above.

See also: