Download src/app/Http/Controllers/PaymentMethod/PayTm/script.js from pnacorp/xsender: direct link, hf CLI and curl.
- Browser
- Download file 798 Bytes
-
https://huggingface.co/pnacorp/xsender/resolve/main/src/app/Http/Controllers/PaymentMethod/PayTm/script.js
- Command line
-
hf download hf://pnacorp/xsender/src/app/Http/Controllers/PaymentMethod/PayTm/script.js
-
curl -L -o script.js https://huggingface.co/pnacorp/xsender/resolve/main/src/app/Http/Controllers/PaymentMethod/PayTm/script.js
798 Bytes
| function openJsCheckoutPopup(orderId, txnToken, amount) | |
| { | |
| var config = { | |
| "root": "", | |
| "flow": "DEFAULT", | |
| "data": { | |
| "orderId": orderId, | |
| "token": txnToken, | |
| "tokenType": "TXN_TOKEN", | |
| "amount": amount | |
| }, | |
| "merchant":{ | |
| "redirect": true | |
| }, | |
| "handler": { | |
| "notifyMerchant": function(eventName,data){ | |
| console.log("notifyMerchant handler function called"); | |
| console.log("eventName => ",eventName); | |
| console.log("data => ",data); | |
| } | |
| } | |
| }; | |
| if(window.Paytm && window.Paytm.CheckoutJS){ | |
| // initialze configuration using init method | |
| window.Paytm.CheckoutJS.init(config).then(function onSuccess() { | |
| // after successfully updating configuration, invoke checkoutjs | |
| window.Paytm.CheckoutJS.invoke(); | |
| }).catch(function onError(error){ | |
| console.log("error => ",error); | |
| }); | |
| } | |
| } |