Class: Paypal

Zenterac. Paypal

new Paypal(merchant, productName, session)

For easy Paypal payments
Parameters:
Name Type Description
merchant string Merchant email or ID
productName string Product name
session Zenterac.Session A session is required (May use player.session)

Members

amount :number

Merchant email or ID

<readonly> completed :bool

true if the transaction has been authorized and completed

currency :string

Currency code (USD, CAD, EUR, GBP, ...)

merchant :string

Merchant email or ID

product :string

Product name

quantity :number

Merchant email or ID

sandbox :boolean

If true, will be in sandbox mode (for test payments), else in production mode

session :Zenterac.Session

The session

shipping :number

Shipping cost

tax :number

Tax amount

token :string

Unique id of transaction

type :string

Transaction type (purchase, donation) *NOT SUPPORTED YET*

Methods

<static> Retrieve(productName, retrieveCB)

Retrieve transaction done in previous session
Parameters:
Name Type Description
productName string the transaction to retrieve
retrieveCB function callback when the transaction is retrieve, first param is the paypal object, second is true if the transaction succeed

submit()

Redirect user to Paypal and proceed to checkout