@tap-payments/apple-pay-button 0.0.88-development → 0.0.89-development
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.
|
@@ -53,6 +53,7 @@ import { useMerchantApplePay } from './useMerchantApplePay';
|
|
|
53
53
|
import { getApplePayPaymentMethod, getDefaultThemeMode } from '../utils';
|
|
54
54
|
import appService, { getAxiosGlobalHeaders, setAxiosGlobalHeaders } from '../api';
|
|
55
55
|
import { areAllTheObjectStringValuesValid, ChargeCode, mappingInterface, Scope } from '@tap-payments/acceptance-sdk';
|
|
56
|
+
var FALLBACK_MERCHANT_IDENTIFIER = 'merchant.tap.gosell';
|
|
56
57
|
export var useApplePay = function (_a) {
|
|
57
58
|
var buttonProps = _a.buttonProps;
|
|
58
59
|
var _b = useState(), applePayRequestData = _b[0], setApplePayRequestData = _b[1];
|
|
@@ -93,16 +94,12 @@ export var useApplePay = function (_a) {
|
|
|
93
94
|
var merchantValidationRequestData = useMemo(function () {
|
|
94
95
|
if (!profileData)
|
|
95
96
|
return null;
|
|
96
|
-
var merchantIdentifierByIntegration = isWebViewIntegration
|
|
97
|
-
? applePayPaymentMethodOptions === null || applePayPaymentMethodOptions === void 0 ? void 0 : applePayPaymentMethodOptions.identifier
|
|
98
|
-
: merchant.identifier || merchant.id;
|
|
99
|
-
var merchantIdentifier = merchantIdentifierByIntegration || profileData.merchant.id;
|
|
100
97
|
return {
|
|
101
98
|
merchantId: merchant.id || (profileData === null || profileData === void 0 ? void 0 : profileData.merchant.id),
|
|
102
99
|
merchantName: profileData.merchant.name,
|
|
103
100
|
validationUrl: '',
|
|
104
101
|
origin: window.location.hostname,
|
|
105
|
-
merchantIdentifier:
|
|
102
|
+
merchantIdentifier: (applePayPaymentMethodOptions === null || applePayPaymentMethodOptions === void 0 ? void 0 : applePayPaymentMethodOptions.identifier) || FALLBACK_MERCHANT_IDENTIFIER
|
|
106
103
|
};
|
|
107
104
|
}, [merchant, profileData === null || profileData === void 0 ? void 0 : profileData.merchant, isWebViewIntegration, applePayPaymentMethodOptions === null || applePayPaymentMethodOptions === void 0 ? void 0 : applePayPaymentMethodOptions.identifier]);
|
|
108
105
|
var initialize = function () { return __awaiter(void 0, void 0, void 0, function () {
|