|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
This section explains how to use the Java version of the
VerifySignature API. If you want to use one of the other sample libraries, they are set up nearly identically to the Java sample. To see file locations for the VerifySignature sample for your preferred language, see Locations of the VerifySignatureSample Files in Other Libraries.
To use the sample, do the following
Using the VerifySignature Sample
Set up your programming environment so that the program will compile without warnings or errors. For the Java sample, this includes ensuring that the files and sub folders in the
Your Secret Access Key is a secret, which only you and Amazon should know. It is important to keep it confidential to protect your account. Store it securely. Never include it in your requests to the Amazon Flexible Payments Service (Amazon FPS), and never email it to anyone. Do not share it outside your organization, even if an inquiry appears to come from Amazon Web Services (AWS) or Amazon.com. No one who legitimately represents Amazon will ever ask you for your Secret Access Key.
To get your credentials, see Getting an AWS Account in the Amazon Simple Pay Getting Started Guide.
In the same file, if you want to target the sandbox, change the
VerifySignatureRequest fpsRequest = new VerifySignatureRequest(); // @TODO: set request parameters here // invokeVerifySignature(service, fpsRequest);
In the same file, remove the comment on
Save the file. For information on the parameters to
Compile and run the sample.
The program copies to standard out a representation of the
VerifySignature Action Response ======================================= VerifySignatureResponse VerifySignatureResult True VerificationStatus Success ResponseMetadata RequestId bda6-4f5f-b37b-1a146b9a-b9e45c3012a5:0
For information on the XML document returned by
In addition to simple API invocation, the samples provide you the following advanced options:
The ability to simulate a mock Amazon FPS service and get responses without a live connection.
Specifying a proxy host and port, through
Setting the endpoint, through