@bigbinary/neeto-payments-frontend 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -9178,6 +9178,9 @@ var RazorpayPaymentButton = function RazorpayPaymentButton(_ref) {
9178
9178
  };
9179
9179
  var handleSuccess = function handleSuccess(_ref3) {
9180
9180
  var payment = _ref3.payment;
9181
+ if ((payment === null || payment === void 0 ? void 0 : payment.status) === "successful") {
9182
+ return onSuccessfulPayment();
9183
+ }
9181
9184
  var save = isCardPreservable ? 1 : 0;
9182
9185
  var options = {
9183
9186
  save: save,
@@ -9194,7 +9197,7 @@ var RazorpayPaymentButton = function RazorpayPaymentButton(_ref) {
9194
9197
  },
9195
9198
  handler: handlePayment
9196
9199
  };
9197
- openRazorpayCheckout(ramda.mergeDeepLeft(RAZORPAY_PAYMENT_BUTTON_OPTIONS, options));
9200
+ return openRazorpayCheckout(ramda.mergeDeepLeft(RAZORPAY_PAYMENT_BUTTON_OPTIONS, options));
9198
9201
  };
9199
9202
  var _useCreateRazorpayPay = useCreateRazorpayPayment({
9200
9203
  onSuccess: handleSuccess