uCommerce comes with built-in support for Amazon FPS payments. This guide will help you to setup your installation to use Amazon FPS as payment.
To add a new payment method to uCommerce, go to the Commerce section in your Umbraco installation.
Navigate to “uCommerce => Settings => Orders => Payment Methods”. Right click on the node “Payment Methods” and click “Create”.
A box will appear. Here you can enter any name you like but it’s recommended to use “Amazon FPS” so you easily can find it again.
Now we have to configure the payment method. Click on the node with the name you have chosen. In the service dropdown list you choose “Amazon FPS” and select “Checkout” in the Pipeline dropdown list. Remember to give the service a “Display name” which you find in your language tab in the same window.
Amazon FPS does only support US Dollars at this point, so if USD doesn’t appear under the “Pricing” tab you have to follow the next step “Setting up US Dollars at currencies”. Otherwise click the save icon and skip the next step.
Right click the currencies leaf and click create. The ISO code for Australian dollars is “USD”. When you’re done, click the save icon.
To use the Amazon FPS with uCommerce you have to register first. Go to https://payments.amazon.com and go to the “Developer” tab in the top menu. Under the “Developer” tab click “Sign Up For Amazon FPS”. Create a new account or use an existing account if you already got one you wish to use.
Follow the instructions on the screen to complete the registration. When the registration is complete you receive a confirmation to the e-mail address you used for the registration.
Now we need to edit the Amazon.config file in order to match your environment. You will find the config file at “(root dir)\umbraco\UCommerce\Configuration\Amazon.config” where “root dir” is the location on your computer where umbraco is installed.
debug: Not used by this provider.
testMode: Indicates whether the Amazon FPS is using the Sandbox or production environment. If you want to test your payment service this setting MUST be set to “True” otherwise the Amazon FPS will be in production environment and will charge a customer.
debug=”True” – For sandbox environment
debug=”False” – For production environment
awsAccessKey: This key is used to identify the account. You can find this key here: http://aws.amazon.com/security-credentials. If you’re not logged in you will be asked to do so.
awsSecretKey: This key is used to create your signature and it’s important to keep this secret from people who is not in need of this. You can also find this key at the security credentials at amazon. Use the same link above.
acceptUrl: This is the page the customer will be redirected to after a payment has been authorized at Amazon. In the picture above there is an example how it can look like.
cancelUrl: This is the page the customer will be redirected to if the customers abandons payment at Amazon.
callbackUrl: this need to be configured. You need to know what id the payment method has in the database. Look at the next step to see how to find this id. The URL should be on the form of: http://(domain name)/(id)/PaymentProcessor.axd
To find your payment method id you need to make a query. One way to make this query is using SQL Mangement Studio. Connect to your SQL server. In SQL Management click “New Query” in the tools menu right under the file menu. Choose the database where you have your umbraco/uCommerce installed.
In the text editor in write the following:
SELECT * FROM ucommerce_paymentmethod WHERE Name = 'Amazon FPS'
The text between ‘’ is the name of the service you choose in step 1.1. Then press “F5” on your keyboard to execute the query. In the bottom of the text editor window a result window should appear.
The number which is in the column “PaymentMethodId” is the number you need in your Amazon.config file.
Amazon FPS sends notifications when a status on a transaction changes. That can be when a transation is changing from “Pending” to “Success”. To setup this you need to go to your account management. Navigate to https://payments.amazon.com in your browser. Click on “Your Account” tab and type in your login credentials.
In your control panel go to “Edit My Account Settings à Manage Developer and Seller Preferences”. In the textbox right for “URL for Instant Payment Notification” type in the url in the following format: http://(domain name)/(paymentmethodId)/PaymentProcessor.axd
Note: The URL you type in this field has to match the callbackUrl in the Amazon.config file or Amazons signature will be rejected and payments will not be available.
The Amazon FPS provider comes with the ability to do automatic acquire and cancel payments. In order to make this work you need to enable a pipeline task.
To enable auto acquire edit the “ToCompletedOrder” pipeline.
To enable auto void/refund edit the “ToCancelled” pipeline.
The pipeline configuration is found in /umbraco/ucommerce/pipelines.
Simply remove “<!-- “ and “-->” at the highlighted line. These are HTML comment sections.
The opinions expressed herein are my own personal opinions and do not represent
my employer's view in any way.