我从中执行html checkout,返回成功/失败响应。我想将此响应传递回查看功能。
<html>
<body>
<button id="rzp-button">Authenticate</button>
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<script>
var options = {
"key": "test_key",
"subscription_id": "{{ sub_id }}",
"name": "My Billing Label",
"description": "Auth txn for sub_8seKGNhVEOwnjj",
"handler": function (response){
alert(response.razorpay_payment_id);
}
};
var rzp1 = new Razorpay(options);
document.getElementById('rzp-button').onclick = function(e){
rzp1.open();
}
</script>
</body>
</html>
我想我必须在里面写些东西
"handler": function (response){
alert(response.razorpay_payment_id);
}
返回带有响应的视图。有人可以帮我吗?谢谢。