shop.payment_providers.amazon_pay

Attributes

Classes

AmazonPay

Amazon Pay integration for the ViUR Shop.

Module Contents

shop.payment_providers.amazon_pay.logger
class shop.payment_providers.amazon_pay.AmazonPay(*, mws_access_key, mws_secret_key, merchant_id, client_id, client_secret, region='de', currency_code='EUR', sandbox=False, language='en', **kwargs)

Bases: shop.payment_providers.PaymentProviderAbstract

Amazon Pay integration for the ViUR Shop.

Handles the checkout process using Amazon Pay, including authorization and payment capture. Requires Amazon MWS credentials and configuration parameters.

Parameters:
  • mws_access_key (str) – Amazon MWS access key.

  • mws_secret_key (str) – Amazon MWS secret key.

  • merchant_id (str) – Amazon merchant ID.

  • client_id (str) – Amazon client ID.

  • client_secret (str) – Amazon client secret.

  • region (str) – Region code (default: ‘de’).

  • currency_code (str) – Currency code (default: ‘EUR’).

  • sandbox (bool) – Use sandbox environment (default: False).

  • language (str) – Language code (default: ‘en’).

  • kwargs (viur.shop.types.t.Any)

name: viur.shop.types.t.Final[str] = 'amazonpay'

Define the internal name of the payment provider

mws_access_key
mws_secret_key
merchant_id
client_id
client_secret
sandbox = False
language = 'en'
checkout(order_skel)
Parameters:

order_skel (viur.core.skeleton.SkeletonInstance)

Return type:

viur.shop.types.t.Any

get_checkout_start_data(order_skel)
Parameters:

order_skel (viur.core.skeleton.SkeletonInstance)

Return type:

viur.shop.types.t.Any

charge(order_skel, payment=None)
Parameters:
Return type:

tuple[viur.shop.types.SkeletonInstance_T[shop.skeletons.OrderSkel], viur.shop.types.t.Any]

check_payment_state(order_skel)

Check the payment state from the PaymentProvider API/service

Access OrderSkel.is_paid to get the payment state of an order.

Parameters:

order_skel (viur.core.skeleton.SkeletonInstance)

Return type:

tuple[bool, viur.shop.types.t.Any]

return_handler()

Frontend Endpoint where the might be redirected to by the payment provider during the payment flow

webhook()

API Endpoint (Webhook) to listen for events from payment provider

get_debug_information()

Provide information about the payment of an order.

Only for debugging purposes. It’s not an API endpoint.