Module reahl.paypalsupport

Support for payment via PayPal.

PayPalButtonsPanel

class reahl.paypalsupport.paypalsupport.PayPalButtonsPanel(view, css_id, order, credentials, currency)

A Widget containing various buttons supplied by PayPal. Clicking on one of these invokes the payment process at PayPal.

Parameters

Note

the currency of the PayPalButtonsPanel has to correspond with the currency used in the json_string of the PayPalOrder.

get_js(context=None)

Override this method if your Widget needs JavaScript to be activated on the browser side.

PayPalOrder

class reahl.paypalsupport.paypalsupport.PayPalOrder(**kwargs)

A PayPalOrder is a proxy of an order created on PayPal via its API.

Create a PayPalOrder to keep track of the process of creating and finalising a matching order on PayPal.

Parameters

json_string – Json string based on the PayPal specification for orders.

paypal_id

The ID of the corresponding order on PayPal.

status

If not None, the status of this order on PayPal’s side.

json_string

The json specification of how to create this order on PayPal

PayPalClientCredentials

class reahl.paypalsupport.paypalsupport.PayPalClientCredentials(paypal_client_id, paypal_client_secret, sandboxed)

Credentials needed to log into PayPal via API.

Parameters
  • paypal_client_id – The PayPal API client id of a merchant account.

  • paypal_client_secret – The PayPal API client secret of a merchant account.

  • sandboxed – If True, these credentials are for the sandbox environment, otherwise they are for the live environment.