|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
This section provides task-oriented descriptions of how to create Amazon Simple Pay buttons, and how to use and implement Amazon Flexible Payments Service (FPS) actions. For a description of Amazon FPS actions that are appropriate to use with Amazon Simple Pay, see the API Reference.
The following table explains how you can find the information you need in this guide.
|If you want to...||Relevant Sections|
Learn the basics of Amazon Simple Pay
|Learn how to create a signed button of any type||Creating Button Forms Dynamically|
|Modify the sample code to create a standard, donation, marketplace, or subscription button||Understanding the Amazon Simple Pay Button Samples|
Use the response and transaction content returned by your buttons and by Amazon Payments
Validate responses for the Return URL and Instant Payment Notification
Understand subscription button particulars
Use Amazon Flexible Payments Service actions available with Amazon Simple Pay
Use Instant Payment Notification (IPN)
Settle or refund money
Work with signatures
Get sample code for signing buttons, verifying return data, and generating a button request
Amazon FPS provides a seamless integration with web sites optimized for mobile devices. No special Amazon FPS coding is required. The software detects the client browser HTTP_USER_AGENT and routes the request along the appropriate CBUI pipeline. A separate pipeline is optimized for the mobile device experience.
For optimal security, your mobile application should make use of a full browser instance (not a browser embedded within an application). It should display the browser address bar to enable customers to confirm the URL.
The user CBUI experience is managed for you. You handle all Amazon FPS requests, return URLs, and IPN notifications regardless of which client browser the customer is using.
Amazon Simple Pay makes it easy to test your mobile client experience. For more information, see Simulating a Mobile Client.
The Amazon Simple Pay Getting Started Guide describes accessing the Amazon Payments business account sandbox and provides an overview of its features. For more information about the sandbox, go to https://payments-sandbox.amazon.com.
With the Amazon Payments developer sandbox you can test the more advanced features of your button applications.
You cannot port the code for the buttons you create in the sandbox to the production environment. When you are satisfied that your button works correctly in the sandbox, make careful notes and recreate it in the production environment. For best results, test the button again in the production environment.
The Amazon Payments developer sandbox enables you to try the following:
Use credit cards and bank accounts in your test transactions without any prior verification and without incurring charges.
Simulate certain errors, such as temporary declines, that could appear in a real transaction. This simulation can help you test the error handling capabilities in your application.
You can test the following user experiences in the sandbox:
View changes to the test account balance from test button operations you generate
Track the effects on your account balance of a series of transactions over time (you cannot, however adjust the sandbox dates, but you can track cumulative changes in your Account Activity Center).
View the transaction activity updates from test button operations you generate
The Amazon Simple Pay Getting Started Guide has instructions on testing basic button features using the Amazon Payments business sandbox.
You can easily test the CBUI pipeline that your customers experience when they use their mobile devices. Amazon Payments uses the value of the client browser's HTTP_USER_AGENT to route the request along the appropriate pipeline. If you set your development environment to report a value for HTTP_USER_AGENT reported by a mobile device, Amazon Payments will invoke the mobile pipeline.
For example, the following value simulates an Apple iPhone 3G version 2.1, with Safari 3.1.1:
Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/22.214.171.124 Mobile/5F136 Safari/525.20
You can easily test your signature creation code using any of the examples in Amazon Simple Pay Button Input Reference. Each example contains a signature calculated from the values in the rest of the example.
To test a signature
Copy any one of the HTML examples in Amazon Simple Pay Button Input Reference.
Remove the enclosing FORM element from your copy.
Remove the Signature field and the HTML comments from your copy.
Create a signature using the instructions in How to Generate a Signature
Compare the output from your signature creation code with the value you removed from the HTML example. They should be identical.
When using the Amazon Payments developer sandbox, you can use a test account for payment simulations.
To create a test account balance
Log in to http://payments-sandbox.amazon.com with your username and password.
On the Your Account tab, click Add a Bank Account in the Enhance your account area.
Provide following test information
Driver license: 123; WA
Add the bank account
On the Deposit tab, use the deposit form to add money to your account.
Click the Your Account tab. Your balance will be displayed.
In the Amazon Payments developer sandbox, you can force an error by placing certain decimal values in the amount. The following table details the values.
|Force Condition||Error Forced||Simulation|
|The amount includes a decimal value between .60 and .69||Temporary Decline||Occurs when a downstream process is not available.|
|The amount includes a decimal value between .70 and .89.||Payment Error||Insufficient funds|
If you want your test transaction to be a success, avoid using amount values which contain decimal values between .60 and .89. For example, the following amounts all force errors: 0.61, 123.6522, 1.79. The following amounts do not force an error: 0.16, 123.56, 8.97.