PPC- tags provide the building blocks for this exchange: the credentials for the SDK address, the three return addresses, error evaluation, and everything related to the saved PayPal account.
Guide: PayPal Checkout
Does this payment method run via PayPal Checkout
Not only PayPal itself is connected via PayPal Checkout, but also credit card, direct debit, purchase on invoice, and other methods. Which of these a shop processes through it is determined by its configuration.PPC-UsePayPalCheckout answers the question for the currently selected payment method.
In Express Checkout, the positive range tag does not apply. There, no payment method has been selected yet, and the integration runs via its own states.
The range tag also does not apply if a saved PayPal account already exists for the buyer and they want to use it. In this case, the page no longer needs the PayPal buttons, because the payment runs without logging in again.
Embedding the PayPal SDK
You compose the address of the SDK script from several pieces of information. Each of them has its own tag.PPC-ClientID and PPC-MerchantID accept the payment method code as an argument. Without an argument, they use the currently selected payment method. If it does not belong to PayPal Checkout, the output remains empty.PPC-Sandbox applies if the payment method is currently running against PayPal’s test environment. This lets you display test notices that disappear automatically in live operation.
The return addresses
Depending on the outcome of the process, the SDK calls a different address. The shop system provides all four ready-made.The waiting page needs
PPC-PendingLink for itself. It reloads itself at intervals until PayPal has completed the process.Evaluating errors from PayPal
If PayPal rejects the process, the response contains an error code.PPC-PayPalErrorCode applies as a range tag if any code exists at all, and with a code in the argument only for exactly that code.
The outer range tag without an argument catches all other codes. Without it, the general notice would also appear if there is no error at all.
The code is found in PayPal’s response under
details.issue. Which codes can occur depends on the payment method and is described in PayPal’s documentation.Saving the PayPal account
A logged-in buyer can store their PayPal account in the shop and pay next time without logging in again.PPC-Vaulted and PPC-VaultedEmailAddress only apply as long as saving is enabled in the shop at all. If it is disabled, both remain silent, and the negative range tag shows the offer to save. Therefore, additionally hide this offer via the configuration if it should not apply in the shop.PPC-UserIDToken is not a passive value. The shop system retrieves the token from PayPal as soon as the tag is evaluated. Therefore, only place it where it is needed.On the order overview,
PPC-UserIDToken only returns a value if the buyer has checked the option to save. On the management page, it returns a value as long as no account has been saved yet.The management page for the saved account
ThePPCVaultManage template shows the buyer their saved account and lets them create or delete it. It has two states.
The raw responses from PayPal
Three tags output PayPal’s responses unchanged as JSON.PPC-OrderDetailsRawResponse is not only intended for troubleshooting. Via the JSON interface, you can retrieve individual values from it, for example the address provided by PayPal.Present in the shop system, not previously described
Ten morePPC- tags exist in the shop system but are not listed in the previous documentation. Nine of them belong to Google Pay and Apple Pay via PayPal Checkout.
These tags are only listed here so that they do not remain puzzling when reading other people’s templates. Before they count as a committed interface, they must be confirmed.
Tags with other prefixes on this topic
The feature spans several prefixes. The other tags are described under their respective prefix.- Express Checkout, buttons:
BT-PPCExpress,BT-PPCExpress_cancel, andBT-PPCExpress_reloadare described under BT- (Buttons) - Express Checkout, states:
ST-PPCExpressand the five variants_allowed,_cancel,_error,_locked, and_selectedare described under ST- (Page states) - Input fields and links:
WS-PPCSaveInVault_input,WS-PPCSaveInVault_checked,WS-PPCVaultManageLink, as well asWS-PPCExpressUseDeliveryAddressForBilling_inputand_checkedare described under WS- (General tags) - Message:
MSG-PPCVault_Notifyis described under MSG- (Messages)
The tags at a glance
All tags are permitted on all templates. The tags related to managing the saved account only return meaningful values on the
PPCVaultManage template.
Related topics
- Guide: PayPal Checkout
- Reference: PAY- (Displaying and selecting payment methods)
- Reference: EJD- (JSON interface)
- Materials: Payment method codes
