Skip to main content
With the $wsPayPalCheckout module, you can use PayPal payment data dynamically in the frontend. It supports various payment methods such as PayPal Express Checkout, Google Pay, and Apple Pay. In this section, you will learn how to query the payment status and use the payment data for integration.

Module overview

Example / excerpt of $wsPayPalCheckout
JSON output
Note: ƒ() denotes a function. Variables and methods overview

Templates

The $wsPayPalCheckout module is typically used in the checkout area, in particular on the payment page and the order confirmation. The PayPal buttons can also be embedded on product pages or in the basket for express checkout.

Variables

$wsPayPalCheckout.integrationDate

Returns the integration date of the PayPal connection.

$wsPayPalCheckout.status

Returns the status of the PayPal payment (empty if no payment process is active).

$wsPayPalCheckout.paymentCanceled

Returns true if the customer canceled the payment.

$wsPayPalCheckout.paymentFailed

Returns true if a technical error occurred during the payment.

$wsPayPalCheckout.paymentDeclined

Returns true if the payment was declined by PayPal or the bank.

$wsPayPalCheckout.expressCheckout

Indicates whether PayPal Express Checkout is possible.

$wsPayPalCheckout.expressCheckoutGooglePay

Indicates whether Google Pay Express is possible.

$wsPayPalCheckout.expressCheckoutApplePay

Indicates whether Apple Pay Express is possible.

$wsPayPalCheckout.googlePay

Returns a map with Google Pay specific contents.

$wsPayPalCheckout.applePay

Returns a map with Apple Pay specific data.

Methods

$wsPayPalCheckout.loadData()

Loads all payment data for PayPal Checkout. Returns null if no active payment process exists. Signature
$wsPayPalCheckout.loadData(expressCheckout)
Return value
Map - Map with payment data, or null.
Parameters Example that loads the payment data.
By using the $wsPayPalCheckout.loadData() function, various variables are available to retrieve and output payment data. Below is an overview of which variables are available.

Payment data (return value of $wsPayPalCheckout.loadData())

First, it is necessary to assign the map with the payment data, as shown in the example above, to a local variable. This can then be used at various places in the template. JSON output of the variable
Variables overview General properties: Properties of Google Pay and Apple Pay Google Pay: Apple Pay:

Actions

No actions are available for $wsPayPalCheckout.