Amazon Simple Pay: Java Library for "Settle\Refund" APIs and REST

Sample Code & Libraries>Java>Amazon Simple Pay: Java Library for "Settle\Refund" APIs and REST
Community Contributed Software

  • Amazon Web Services provides links to these packages as a convenience for our customers, but software not authored by an "@AWS" account has not been reviewed or screened by AWS.
  • Please review this software to ensure it meets your needs before using it.

You can use the sample code in this SDK to make refund and settle API calls in conjunction with Amazon Simple Pay.

Details

Submitted By: Abhay@AWS
AWS Products Used: Amazon FPS
Language(s): Java
License: Apache License 2.0
Created On: May 13, 2008 4:24 PM GMT
Last Updated: September 13, 2010 6:23 PM GMT
Download

Release Date: 2008-05-13

Summary

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

Prerequisites

Software / Utility Version or Other information Available at
J2SE 5.0 JDK version 5.0 http://java.sun.com/javase/downloads/index_jdk5.jsp

Setup

  • 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.

Configuration

  • Update the Sample you want to run (<Library_Root>\src\com\amazonaws\fps\samples\*.java, SettleSample.java and RefundSample.java) with the following details:
    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.
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.