@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.
@@ -40,6 +40,7 @@ export interface MerchantValidationRequestData {
40
40
  origin: string;
41
41
  merchantId: string;
42
42
  merchantName: string;
43
+ merchantIdentifier: string;
43
44
  }
44
45
  export interface MerchantResponse {
45
46
  id: string;
@@ -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: (isWebViewIntegration ? applePayPaymentMethodOptions === null || applePayPaymentMethodOptions === void 0 ? void 0 : applePayPaymentMethodOptions.identifier : merchant.identifier || merchant.id) ||
101
- profileData.merchant.id
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 () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/apple-pay-button",
3
- "version": "0.0.87-development",
3
+ "version": "0.0.89-development",
4
4
  "description": "Apple Pay Button React Component",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",