Using Placeholders in the Payment Form
For some fields it is possible to provide placeholders for the payment form manually using the header `X-AltaPay-Vars`
You will have to encode the values in JSON and then encode the JSON in base64
The available fields with this method are Card Number, Cardholder Name, Expiry Month and Expiry Year (See table below)
Step 1: Construct a JSON array:
{ "cardHolderNamePlaceholder":"Cardholder's Name", "cardHolderEmailPlaceholder":"emailPlaceholderhere", "cardNumPlaceholder":"Card Number", "eyearPlaceholder":"Year", "emonthPlaceholder":"Month", "cvcPlaceholder":"CVC" }
Step 2: Convert it to base64:
ewoiY2FyZEhvbGRlck5hbWVQbGFjZWhvbGRlciI6IkNhcmRob2xkZXIncyBOYW1lIiwKImNhcmROdW1QbGFjZWhvbGRlciI6IkNhcmQgTnVtYmVyIiwKImV5ZWFyUGxhY2Vob2xkZXIiOiJZZWFyIiwKImVtb250aFBsYWNlaG9sZGVyIjoiTW9udGgiLAoiY3ZjUGxhY2Vob2xkZXIiOiJDVkMiCn0=
Step 3: Pass it as header variable <X-AltaPay-Vars> when requesting the payment form:
https://gateway.altapaysecure.com/eCommerce/API/requestForm?pid=someId
And the form will be pre-filled with placeholders:
Available fields for <X-AltaPay-Vars>
Parameter |
Values |
---|---|
cardNumPlaceholder |
String |
cvcPlaceholder |
String |
cardHolderNamePlaceholder |
String |
cardHolderEmailPlaceholder |
String |
emonthPlaceholder (Only available if date input is text) |
String |
eyearPlaceholder (Only available if date input is text) |
String |