Release Date: 2008-05-13
You can use the sample code in this SDK to make refund and settle API calls in conjunction with PayNow Widgets. Please read https://payments.amazon.com/s dui/sdui/business?sn=paynow/whatispaynow
|Software / Utility||Version or Other information||Available at|
|J2SE 5.0 JDK||version 5.0||http://java.sun.com/javase/downloads/index_jdk5.jsp|
- Extract the contents of amazon-fps-paynow-2008-05-01-java-library.zip to a folder. A directory named amazon
-fps-paynow-2008-05-01-java-library will be created. This folder will be referred to as <Library_Root> from this point onwards. This fol
der contains the the following sub-directories:
* src: This folder contains the code files for sample API calls to Amazon FPS, SettleSample.java and RefundSample.java.
* thirdparty: This folder contains the thirdparty jars needed to run the samples.
* lib: This folder contains the jar which is built out of the src folder.
* doc: This folder contains the Javadoc for the library used to call Amazon FPS Pay Now API in this sample.
- Before you make a Settle request, you should have already made successful reserve request using Amazon Payments Pay Now widget. Please use the transacti on-id returned by the reserve request with this Settle API call.
- Before you make Refund request, you should have already made successful Payment or Settle request using Amazon Payments Pay Now widget. Please use the t ransaction-id returned by the reserve request with this Refund API call.
- Update the Sample you want to run (<Library_Root>\src\com\amazonaws\fps\samples\*.java, SettleSample.java and RefundSample.java) with the
a. Your AWS Secret Key
b. Your AWS Access Key
c. The transaction ID (that you got using the Amazon Payments Pay Now Widget. )
d. Update the request parameters with appropriate values (you can refer to the commented code in SettleSample.java or RefundSample.java)
- Set an evironment variable Library_Root for the <Library_Root> defined as above. ( for e.g. in Linux run the following command $$ setenv Library_Root /home/john/work/fps/amazon-fps-paynow-2008-05-01-java-library )
Steps to Run the Sample
- Compile and Run the sample application by running runSample.sh for linux OR runSample.bat for windows.