You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can also add custom text fields and dropdowns to your form.
89
+
90
+
For a text field:
91
+
```javascript
92
+
data-option0name="Coupon Number"
93
+
data-option0required="true"
94
+
```
95
+
96
+
For a dropdown:
97
+
```javascript
98
+
data-option0name="Size"
99
+
data-option0select0="Small"
100
+
data-option0select1="Medium"
101
+
data-option0select2="Large"
102
+
data-option0price0="8.00"
103
+
data-option0price1="10.00"
104
+
data-option0price2="12.00"
105
+
```
106
+
107
+
## Form validation
108
+
We can also handle form validation for you. To make a field required, add `data-optionNrequired="true"`. We support patterns, too. Add `data-optionNpattern`, e.g. `data-optionNpattern="alphaNumericRegex"`. Supported validators are: `alphaNumericRegex`, `alphaRegex`, and `numericRegex`.
117
109
118
110
## Callback notification
119
111
On completion of a transaction you can get a payment notification ([IPN](https://www.x.com/developers/paypal/documentation-tools/ipn/integration-guide/IPNIntro)) on a callback URL you specify using the `data-callback` attribute. An [IPN simulator](https://developer.paypal.com/webapps/developer/applications/ipn_simulator) is available on the sandbox.
0 commit comments