@tap-payments/apple-pay-button 0.0.87-development → 0.0.88-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;
@@ -93,12 +93,16 @@ export var useApplePay = function (_a) {
93
93
  var merchantValidationRequestData = useMemo(function () {
94
94
  if (!profileData)
95
95
  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;
96
100
  return {
97
101
  merchantId: merchant.id || (profileData === null || profileData === void 0 ? void 0 : profileData.merchant.id),
98
102
  merchantName: profileData.merchant.name,
99
103
  validationUrl: '',
100
- origin: (isWebViewIntegration ? applePayPaymentMethodOptions === null || applePayPaymentMethodOptions === void 0 ? void 0 : applePayPaymentMethodOptions.identifier : merchant.identifier || merchant.id) ||
101
- profileData.merchant.id
104
+ origin: window.location.hostname,
105
+ merchantIdentifier: merchantIdentifier
102
106
  };
103
107
  }, [merchant, profileData === null || profileData === void 0 ? void 0 : profileData.merchant, isWebViewIntegration, applePayPaymentMethodOptions === null || applePayPaymentMethodOptions === void 0 ? void 0 : applePayPaymentMethodOptions.identifier]);
104
108
  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.88-development",
4
4
  "description": "Apple Pay Button React Component",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",