@quintype/components 3.8.9-stripe-up-downgrade.4 → 3.8.9-stripe-up-downgrade.6
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/cjs/index.js
CHANGED
|
@@ -5847,7 +5847,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5847
5847
|
switchType = get__default["default"](options, ['switchType']);
|
|
5848
5848
|
|
|
5849
5849
|
if (!(intent === 'switch')) {
|
|
5850
|
-
_context12.next =
|
|
5850
|
+
_context12.next = 19;
|
|
5851
5851
|
break;
|
|
5852
5852
|
}
|
|
5853
5853
|
|
|
@@ -5858,16 +5858,15 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5858
5858
|
_yield$awaitHelper12 = _context12.sent;
|
|
5859
5859
|
error = _yield$awaitHelper12.error;
|
|
5860
5860
|
switchPaymentOptions = _yield$awaitHelper12.data;
|
|
5861
|
-
console.log("------- initStripePayment 111--------->", options === null || options === void 0 ? void 0 : options.successUrl, options === null || options === void 0 ? void 0 : options.cancelUrl, JSON.stringify(paymentObject));
|
|
5862
5861
|
|
|
5863
5862
|
if (!error) {
|
|
5864
|
-
_context12.next =
|
|
5863
|
+
_context12.next = 17;
|
|
5865
5864
|
break;
|
|
5866
5865
|
}
|
|
5867
5866
|
|
|
5868
5867
|
throw new Error("payment options fetch failed");
|
|
5869
5868
|
|
|
5870
|
-
case
|
|
5869
|
+
case 17:
|
|
5871
5870
|
payload = _objectSpread(_objectSpread({}, paymentObject), {}, {
|
|
5872
5871
|
switch_type: switchType,
|
|
5873
5872
|
subscription_plan_id: options === null || options === void 0 ? void 0 : (_options$selectedPlan = options.selectedPlan) === null || _options$selectedPlan === void 0 ? void 0 : _options$selectedPlan.id,
|
|
@@ -5877,15 +5876,14 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5877
5876
|
cancel_url: options === null || options === void 0 ? void 0 : options.cancelUrl
|
|
5878
5877
|
}
|
|
5879
5878
|
});
|
|
5880
|
-
console.log("PAYLOAD----------", JSON.stringify(paymentObject));
|
|
5881
5879
|
return _context12.abrupt("return", switchPaymentOptions.stripe.proceed(payload));
|
|
5882
5880
|
|
|
5883
|
-
case
|
|
5881
|
+
case 19:
|
|
5884
5882
|
return _context12.abrupt("return", paymentOptions.stripe ? paymentOptions.stripe.proceed(paymentObject) : Promise.reject({
|
|
5885
5883
|
message: 'Payment option is loading...'
|
|
5886
5884
|
}));
|
|
5887
5885
|
|
|
5888
|
-
case
|
|
5886
|
+
case 20:
|
|
5889
5887
|
case "end":
|
|
5890
5888
|
return _context12.stop();
|
|
5891
5889
|
}
|
|
@@ -773,7 +773,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
773
773
|
switchType = get(options, ['switchType']);
|
|
774
774
|
|
|
775
775
|
if (!(intent === 'switch')) {
|
|
776
|
-
_context12.next =
|
|
776
|
+
_context12.next = 19;
|
|
777
777
|
break;
|
|
778
778
|
}
|
|
779
779
|
|
|
@@ -784,16 +784,15 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
784
784
|
_yield$awaitHelper12 = _context12.sent;
|
|
785
785
|
error = _yield$awaitHelper12.error;
|
|
786
786
|
switchPaymentOptions = _yield$awaitHelper12.data;
|
|
787
|
-
console.log("------- initStripePayment 111--------->", options === null || options === void 0 ? void 0 : options.successUrl, options === null || options === void 0 ? void 0 : options.cancelUrl, JSON.stringify(paymentObject));
|
|
788
787
|
|
|
789
788
|
if (!error) {
|
|
790
|
-
_context12.next =
|
|
789
|
+
_context12.next = 17;
|
|
791
790
|
break;
|
|
792
791
|
}
|
|
793
792
|
|
|
794
793
|
throw new Error("payment options fetch failed");
|
|
795
794
|
|
|
796
|
-
case
|
|
795
|
+
case 17:
|
|
797
796
|
payload = _objectSpread(_objectSpread({}, paymentObject), {}, {
|
|
798
797
|
switch_type: switchType,
|
|
799
798
|
subscription_plan_id: options === null || options === void 0 ? void 0 : (_options$selectedPlan = options.selectedPlan) === null || _options$selectedPlan === void 0 ? void 0 : _options$selectedPlan.id,
|
|
@@ -803,15 +802,14 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
803
802
|
cancel_url: options === null || options === void 0 ? void 0 : options.cancelUrl
|
|
804
803
|
}
|
|
805
804
|
});
|
|
806
|
-
console.log("PAYLOAD----------", JSON.stringify(paymentObject));
|
|
807
805
|
return _context12.abrupt("return", switchPaymentOptions.stripe.proceed(payload));
|
|
808
806
|
|
|
809
|
-
case
|
|
807
|
+
case 19:
|
|
810
808
|
return _context12.abrupt("return", paymentOptions.stripe ? paymentOptions.stripe.proceed(paymentObject) : Promise.reject({
|
|
811
809
|
message: 'Payment option is loading...'
|
|
812
810
|
}));
|
|
813
811
|
|
|
814
|
-
case
|
|
812
|
+
case 20:
|
|
815
813
|
case "end":
|
|
816
814
|
return _context12.stop();
|
|
817
815
|
}
|
package/package.json
CHANGED