PAYPALEXPRESS- tags retrieve individual fields from it.
Guide: PayPal Express Checkout
When the tags work
The tags are tied to Express Checkout. They return something in exactly two cases: while the buyer is in Express Checkout, and after a completed order that went through Express Checkout. In any other case, they are treated as an invalid tag, regardless of the template.ST-PayPalExpressCheckout_selected checks exactly this condition. Wrap your block with it, and it will appear on the page whenever the tags in it also have values.
The construction principle
There is no fixed list of tags. The shop system stores the response from PayPal as a list of field names and values and, when resolving a tag, simply searches for the name afterPAYPALEXPRESS-. Every field that PayPal returns is therefore accessible, even if it is not listed below.
A field name that the response does not contain is not an error. The single tag then outputs nothing and the range tag does not apply. PayPal only returns many fields under certain circumstances, so using a range tag is worthwhile for almost every field.
Upper and lower case in the field name do not matter. The uppercase spelling on this page follows PayPal’s spelling and makes it visible at a glance in the template that the value comes from outside.
The values are output HTML-encoded and have already been converted to the shop’s character set. The shop system replaces line breaks within a value with spaces, so that no field breaks the layout.
Buyer and transaction
PAYPALEXPRESS-CORRELATIONID is the identifier that PayPal support asks for when a process needs to be clarified. It therefore belongs in logging or in a comment in the source code of the confirmation page, not visibly on the page.Status values
PAYPALEXPRESS-PAYERSTATUS indicates whether PayPal has verified the buyer’s account.
PAYPALEXPRESS-BILLINGAGREEMENTACCEPTEDSTATUS concerns recurring payments.
PAYPALEXPRESS-CHECKOUTSTATUS indicates how far the payment has progressed.
The order amounts
The amounts are found under the name componentPAYMENTREQUEST_0_. The zero in it is the sequential number of the payment request, and in the shop system there is always exactly one.
The delivery address from PayPal
With Express Checkout, the delivery address comes from PayPal. It is also found underPAYMENTREQUEST_0_.
SHIPTOSTATE is usually empty in Germany and always filled in the United States. Wrap the line in a range tag, otherwise there will be an empty line in the middle of the block for German addresses.The verification status of the address
PAYPALEXPRESS-PAYMENTREQUEST_0_ADDRESSSTATUS indicates whether PayPal has verified the address.
PAYPALEXPRESS-PAYMENTREQUEST_0_ADDRESSNORMALIZATIONSTATUS concerns addresses in Brazil only.
The tags at a glance
The tags are permitted on all templates, but only return a value in Express Checkout and after an order completed through it.
Related topics
- Guide: PayPal Express Checkout
- Reference: ST- (Page states)
- Reference: PAY- (Displaying and selecting payment methods)
