@tamkeen_dev/cashpay
Version:
iframe_cashpay. A plugin to add payments Cash E-wallet to your application.
26 lines (20 loc) • 1.32 kB
HTML
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><title>CashPayButton</title><style>/*style for CashPayButton*/
iframe {
border: 0px ;
}</style></head><body><cashpaybutton onclickcashpaybutton="onClickCashPayButton" lang="en"></cashpaybutton><script>//You must use function onClickCashPayButton and return iframeURL
async function onClickCashPayButton() {
var iframeURL = ""; //iframeURL returned from Response CreateOrder
//Documentation https://documenter.getpostman.com/view/17550185/2s93XzwN9o
if (iframeURL) {
// console.log("iframeURL", iframeURL);
//You must return iframeURL to display iframe_cashpay
return iframeURL;
}
};
//Function callback onConfirmPayment
function onConfirmPayment(data) {
//After Confirmatin from CashPayButton.
//Here use CheckOrderStatus to check order status.
//Documentation https://documenter.getpostman.com/view/17550185/2s93XzwN9o
console.log("paymentData2", data);
};</script><script src="index.js"></script></body></html>