@depay/widgets 7.3.1 → 7.4.0
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 +18 -0
- package/dist/esm/index.bundle.js +2 -2
- package/dist/esm/index.js +24 -7
- package/dist/umd/index.bundle.js +2 -2
- package/dist/umd/index.js +24 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -418,6 +418,24 @@ DePayWidgets.Payment({
|
|
|
418
418
|
|
|
419
419
|
```
|
|
420
420
|
|
|
421
|
+
#### before (DePay Payments)
|
|
422
|
+
|
|
423
|
+
`before`
|
|
424
|
+
|
|
425
|
+
A function that will be called before the payment is handed over to the wallet.
|
|
426
|
+
|
|
427
|
+
Allows you to stop the payment if this methods returns false.
|
|
428
|
+
|
|
429
|
+
```javascript
|
|
430
|
+
DePayWidgets.Payment({
|
|
431
|
+
|
|
432
|
+
before: (payment)=> {
|
|
433
|
+
alert('Something went wrong')
|
|
434
|
+
return false // stops payment
|
|
435
|
+
}
|
|
436
|
+
})
|
|
437
|
+
```
|
|
438
|
+
|
|
421
439
|
#### sent (DePay Payments)
|
|
422
440
|
|
|
423
441
|
`sent`
|