Skip to content

Commit 8c8db97

Browse files
committed
readme updated
1 parent 575d204 commit 8c8db97

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,23 @@ Before using application do add another dependent cordova plugin
2020
[cordova-plugin-inappbrowser](https://www.npmjs.com/package/cordova-plugin-inappbrowser)
2121

2222
```
23+
// Init Payment
2324
CustomPayment.startPayment({
2425
url: 'YOUR_PAYMENT_REDIRECT_URL',
2526
callbackErrorURL: 'YOUR_PAYMENT_FAILURE_URL',
2627
callbackSuccessURL: 'YOUR_PAYMENT_SUCCESS_URL'
2728
})
29+
30+
// Return Payment Response Event
31+
window.addEventListener('paymentmessage', this.paymentCallBack)
32+
33+
function paymentCallBack(e) {
34+
if(typeof e.detail != 'undefined') {
35+
console.debug(e.detail.data, 'paramsparams1')
36+
} else {
37+
console.debug(e, 'other paramsparamsparams')
38+
}
39+
}
2840
```
2941

3042
### All Params

0 commit comments

Comments
 (0)