This is a simple Perl code sample to create a dynamic Amazon Payments Subscription widget
Prerequisites
- You must have an Amazon Payments Sandbox Business Account.
- You must have an Amazon Web Services developer account.
- You must use the same email address and password for your Amazon Payments Business Account and your Amazon Web Services developer account.
- You must have perl version 5.8 or later installed
- You will need the 'Digest::HMAC_SHA1' and 'MIME::Base64' perl modules. You can download them from here
Using the Sample
- Sign into your Amazon Web Services developer account and retrieve your Access Key ID and Secret Access Key from here.
- Replace the value of the ACCESS_KEY constant in the code sample with your Access Key ID
- Replace the value of the SECRET_KEY constant in the code sample with your Secret Access Key
- Run the code sample as a Perl application
- The code sample will output the HTML for the Subscription widget to the Console
- You can now integrate this code into your website
- Note: You cannot use your Amazon Payments Business Account as a buyer while testing your widgets. You should create a new Amazon Payments account which you can use as a buyer.