@salesgenterp/ui-components 0.4.207 → 0.4.209
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.js +21 -10
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +21 -10
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3934,6 +3934,7 @@ var Step3 = function Step3(_ref) {
|
|
|
3934
3934
|
var _store$, _selectedMethod$name, _styles$button2;
|
|
3935
3935
|
var apiEndPoint = _ref.apiEndPoint,
|
|
3936
3936
|
token = _ref.token,
|
|
3937
|
+
authoriseDotNet = _ref.authoriseDotNet,
|
|
3937
3938
|
handleBack = _ref.handleBack,
|
|
3938
3939
|
_handleNext = _ref.handleNext,
|
|
3939
3940
|
setPaymentDetails = _ref.setPaymentDetails,
|
|
@@ -3962,7 +3963,7 @@ var Step3 = function Step3(_ref) {
|
|
|
3962
3963
|
var _useState5 = React.useState(),
|
|
3963
3964
|
selectCardValue = _useState5[0],
|
|
3964
3965
|
setSelectCardValue = _useState5[1];
|
|
3965
|
-
var _useState6 = React.useState(false),
|
|
3966
|
+
var _useState6 = React.useState(authoriseDotNet ? true : false),
|
|
3966
3967
|
addNewCard = _useState6[0],
|
|
3967
3968
|
setAddNewCard = _useState6[1];
|
|
3968
3969
|
var isCard = selectedMethod === null || selectedMethod === void 0 ? void 0 : (_selectedMethod$name = selectedMethod.name) === null || _selectedMethod$name === void 0 ? void 0 : _selectedMethod$name.toLowerCase().includes('card');
|
|
@@ -3988,15 +3989,23 @@ var Step3 = function Step3(_ref) {
|
|
|
3988
3989
|
})();
|
|
3989
3990
|
}, []);
|
|
3990
3991
|
var getCreditCardList = function getCreditCardList(customerId) {
|
|
3991
|
-
|
|
3992
|
-
return Promise.resolve(
|
|
3993
|
-
apiEndPoint
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
3992
|
+
try {
|
|
3993
|
+
return Promise.resolve(function () {
|
|
3994
|
+
if (apiEndPoint && token && authoriseDotNet) {
|
|
3995
|
+
return _catch(function () {
|
|
3996
|
+
return Promise.resolve(API({
|
|
3997
|
+
apiEndPoint: apiEndPoint,
|
|
3998
|
+
token: token,
|
|
3999
|
+
url: "/authoriseDotNet/customerProfile?customerId=" + customerId
|
|
4000
|
+
}));
|
|
4001
|
+
}, function () {
|
|
4002
|
+
return {};
|
|
4003
|
+
});
|
|
4004
|
+
}
|
|
4005
|
+
}());
|
|
4006
|
+
} catch (e) {
|
|
4007
|
+
return Promise.reject(e);
|
|
4008
|
+
}
|
|
4000
4009
|
};
|
|
4001
4010
|
var cardIcon = function cardIcon(type) {
|
|
4002
4011
|
switch (type) {
|
|
@@ -4396,6 +4405,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
4396
4405
|
var _styles$scroll, _styles$scroll2, _styles$checkoutSumma, _styles$checkoutSumma2;
|
|
4397
4406
|
var apiEndPoint = _ref.apiEndPoint,
|
|
4398
4407
|
token = _ref.token,
|
|
4408
|
+
authoriseDotNet = _ref.authoriseDotNet,
|
|
4399
4409
|
storeDetails = _ref.storeDetails,
|
|
4400
4410
|
currStep = _ref.currStep,
|
|
4401
4411
|
styles = _ref.styles,
|
|
@@ -4564,6 +4574,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
4564
4574
|
}
|
|
4565
4575
|
}, /*#__PURE__*/React__default.createElement(Step3, {
|
|
4566
4576
|
apiEndPoint: apiEndPoint,
|
|
4577
|
+
authoriseDotNet: authoriseDotNet,
|
|
4567
4578
|
token: token,
|
|
4568
4579
|
store: userStores,
|
|
4569
4580
|
shippingMethod: shippingMethod,
|