@tap-payments/apple-pay-button 0.0.87-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];
|
|
@@ -97,8 +98,8 @@ export var useApplePay = function (_a) {
|
|
|
97
98
|
merchantId: merchant.id || (profileData === null || profileData === void 0 ? void 0 : profileData.merchant.id),
|
|
98
99
|
merchantName: profileData.merchant.name,
|
|
99
100
|
validationUrl: '',
|
|
100
|
-
origin:
|
|
101
|
-
|
|
101
|
+
origin: window.location.hostname,
|
|
102
|
+
merchantIdentifier: (applePayPaymentMethodOptions === null || applePayPaymentMethodOptions === void 0 ? void 0 : applePayPaymentMethodOptions.identifier) || FALLBACK_MERCHANT_IDENTIFIER
|
|
102
103
|
};
|
|
103
104
|
}, [merchant, profileData === null || profileData === void 0 ? void 0 : profileData.merchant, isWebViewIntegration, applePayPaymentMethodOptions === null || applePayPaymentMethodOptions === void 0 ? void 0 : applePayPaymentMethodOptions.identifier]);
|
|
104
105
|
var initialize = function () { return __awaiter(void 0, void 0, void 0, function () {
|