@paystack/inline-js 2.22.1-dev.2 → 2.22.1-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -113,12 +113,13 @@ This method starts a new transaction on the checkout form.
|
|
|
113
113
|
|
|
114
114
|
### Configuration Options for Callbacks
|
|
115
115
|
|
|
116
|
-
| Function Name
|
|
117
|
-
|
|
|
118
|
-
| onError
|
|
119
|
-
| onCancel
|
|
120
|
-
| onLoad
|
|
121
|
-
| onSuccess
|
|
116
|
+
| Function Name | Description | Function Parameters | Function Parameter Definitions |
|
|
117
|
+
| -------------------------- | ----------------------------------------------------| ---------------------------------------------------------- | ------------------------------ |
|
|
118
|
+
| onError | Called when the transaction was not successfully loaded | `{ message: string }` | `message`: Message from API |
|
|
119
|
+
| onCancel | Called when the customer cancels the transaction | `undefined` | N/A |
|
|
120
|
+
| onLoad | Called when the transaction is successfully loaded and the customer can see the checkout form | `{ id: number, customer: Object, accessCode: string }` | `id`: Transaction ID from API <br> `customer`: Customer object from API <br> `accessCode`: Transaction access code |
|
|
121
|
+
| onSuccess | Called when the customer successfully completes a transaction | `{ id: number, reference: string, message: string }` | `id`: Transaction ID from API <br> `message`: Message from API <br> `reference`: Transaction reference |
|
|
122
|
+
|
|
122
123
|
|
|
123
124
|
|
|
124
125
|
|
|
@@ -186,12 +187,12 @@ This method resumes a transaction using the access code created on your server w
|
|
|
186
187
|
|
|
187
188
|
### Callback Definitions
|
|
188
189
|
|
|
189
|
-
| Function Name | Description | Callback Parameters |
|
|
190
|
-
| -------------------------- | ----------------------------------------------------| ---------------------------------------------------------- |
|
|
191
|
-
| onError | Called when the transaction was not successfully loaded | `{ message:
|
|
192
|
-
| onCancel | Called when the customer cancels the transaction |
|
|
193
|
-
| onLoad | Called when the transaction is successfully loaded and the customer can see the checkout form | `{ id:
|
|
194
|
-
| onSuccess | Called when the customer successfully completes a transaction | `{ id:
|
|
190
|
+
| Function Name | Description | Callback Parameters | Callback Parameter Definitions |
|
|
191
|
+
| -------------------------- | ----------------------------------------------------| ---------------------------------------------------------- | ------------------------------ |
|
|
192
|
+
| onError | Called when the transaction was not successfully loaded | `{ message: string }` | `message`: Message from API |
|
|
193
|
+
| onCancel | Called when the customer cancels the transaction | `undefined` | N/A |
|
|
194
|
+
| onLoad | Called when the transaction is successfully loaded and the customer can see the checkout form | `{ id: number, customer: Object, accessCode: string }` | `id`: Transaction ID from API <br> `customer`: Customer object from API <br> `accessCode`: Transaction access code |
|
|
195
|
+
| onSuccess | Called when the customer successfully completes a transaction | `{ id: number, reference: string, message: string }` | `id`: Transaction ID from API <br> `message`: Message from API <br> `reference`: Transaction reference |
|
|
195
196
|
|
|
196
197
|
## Method Response
|
|
197
198
|
|