Skip to content

Instantly share code, notes, and snippets.

@dbrent-amazon
Created October 2, 2015 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbrent-amazon/7627926ee27f99b28207 to your computer and use it in GitHub Desktop.
Save dbrent-amazon/7627926ee27f99b28207 to your computer and use it in GitHub Desktop.
AuthorizeSimulation
from pay_with_amazon.client import PayWithAmazonClient
client = PayWithAmazonClient(
mws_access_key='YOUR_ACCESS_KEY',
mws_secret_key='YOUR_SECRET_KEY',
merchant_id='YOUR_MERCHANT_ID',
region='na',
currency_code='USD')
response = client.authorize(
amazon_order_reference_id='AMAZON_ORDER_REFERENCE_ID',
authorization_reference_id='MY_UNIQUE_AUTHORIZATION_ID',
amount='1.00',
seller_authorization_note='{"SandboxSimulation": {"State":"Declined", "ReasonCode":"InvalidPaymentMethod", "PaymentMethodUpdateTimeInMins":5}}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment