diff --git a/src/main/resources/templates/user/razor-pay.html b/src/main/resources/templates/user/razor-pay.html index 7721060..4a78233 100644 --- a/src/main/resources/templates/user/razor-pay.html +++ b/src/main/resources/templates/user/razor-pay.html @@ -1,15 +1,15 @@
@@ -31,8 +31,8 @@ console.log(response); if (response.status == "created") { let options = { - "key": "[[${keyId}]]", - //"key": "rzp_test_tDkHFEqWXmuEi8", // Enter the Key ID generated from the Dashboard + // "key": "[[${keyId}]]", + "key": "rzp_test_tDkHFEqWXmuEi8", // Enter the Key ID generated from the Dashboard "amount": response.amount, // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise "currency": "INR", "name": "Greater Chennai Corporation", @@ -47,31 +47,31 @@ console.log(response.razorpay_signature); console.log("payment success"); //alert("congrates !payment successfull"); - + //updatePaymentInServer(response.razorpay_payment_id, response.razorpay_order_id, "paid", id, amt); Swal.fire({ - title: "Payment Successful 🎉", - text: "Congratulations! Payment completed successfully.", - icon: "success", - confirmButtonText: "OK" -}).then((result) => { + title: "Payment Successful 🎉", + text: "Congratulations! Payment completed successfully.", + icon: "success", + confirmButtonText: "OK" + }).then((result) => { + + if (result.isConfirmed) { + $('#pageLoader').show(); + - if (result.isConfirmed) { - $('#pageLoader').show(); - - - updatePaymentInServer( - response.razorpay_payment_id, - response.razorpay_order_id, - "paid", - id, - amt - ); + updatePaymentInServer( + response.razorpay_payment_id, + response.razorpay_order_id, + "paid", + id, + amt + ); - } + } -}); + }); }, "prefill": { "name": "",