@tap-payments/apple-pay-button 0.0.84-development → 0.0.85-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.
@@ -109,7 +109,7 @@ export interface ApplePayButtonProps {
109
109
  onReady?: () => void;
110
110
  metaData?: MetaData;
111
111
  debug?: boolean;
112
- integration?: 'sdk' | 'iframe';
112
+ integration?: 'sdk' | 'iframe' | 'webview';
113
113
  headers?: {
114
114
  mdn: string;
115
115
  application: string;
@@ -76,7 +76,7 @@ export declare const useApplePay: ({ buttonProps }: UsaApplePayProps) => {
76
76
  onReady?: (() => void) | undefined;
77
77
  metaData?: MetaData | undefined;
78
78
  debug?: boolean | undefined;
79
- integration?: "iframe" | "sdk" | undefined;
79
+ integration?: "iframe" | "sdk" | "webview" | undefined;
80
80
  headers?: {
81
81
  mdn: string;
82
82
  application: string;
@@ -77,8 +77,9 @@ export var useApplePay = function (_a) {
77
77
  var _k = useState(false), loading = _k[0], setLoading = _k[1];
78
78
  var _l = useState(false), isRounded = _l[0], setIsRounded = _l[1];
79
79
  var mappedProps = __assign(__assign({}, buttonProps), { interface: mappingInterface(buttonProps.interface) });
80
- var interfaceObj = mappedProps.interface, merchant = mappedProps.merchant, customer = mappedProps.customer, acceptance = mappedProps.acceptance, scope = mappedProps.scope, debug = mappedProps.debug, onError = mappedProps.onError, onSuccess = mappedProps.onSuccess, onCancel = mappedProps.onCancel, onReady = mappedProps.onReady, metaData = mappedProps.metaData, headers = mappedProps.headers, operator = mappedProps.operator, order = mappedProps.order, onOrderCreated = mappedProps.onOrderCreated, transaction = mappedProps.transaction, post = mappedProps.post, redirect = mappedProps.redirect;
81
- var isIframeIntegration = buttonProps.integration === 'iframe';
80
+ var interfaceObj = mappedProps.interface, merchant = mappedProps.merchant, customer = mappedProps.customer, acceptance = mappedProps.acceptance, scope = mappedProps.scope, debug = mappedProps.debug, onError = mappedProps.onError, onSuccess = mappedProps.onSuccess, onCancel = mappedProps.onCancel, onReady = mappedProps.onReady, metaData = mappedProps.metaData, headers = mappedProps.headers, operator = mappedProps.operator, order = mappedProps.order, onOrderCreated = mappedProps.onOrderCreated, transaction = mappedProps.transaction, post = mappedProps.post, redirect = mappedProps.redirect, integration = mappedProps.integration;
81
+ var isIframeIntegration = integration === 'iframe';
82
+ var isWebViewIntegration = integration === 'webview';
82
83
  useMerchantApplePay({
83
84
  isIframeIntegration: isIframeIntegration,
84
85
  onError: onError,
@@ -233,7 +234,8 @@ export var useApplePay = function (_a) {
233
234
  if (debug) {
234
235
  console.info("creating merchant session for merchantData: ".concat(JSON.stringify(profileData.merchant), " and validationURL: ").concat(event.validationURL, " and merchant.domain: ").concat(window.location.hostname));
235
236
  }
236
- return [4, appService.appleSession(__assign(__assign({}, profileData.merchant), { id: merchant.id || profileData.merchant.id }), event.validationURL, window.location.hostname, merchant.identifier || merchant.id || profileData.merchant.id)];
237
+ return [4, appService.appleSession(__assign(__assign({}, profileData.merchant), { id: merchant.id || profileData.merchant.id }), event.validationURL, window.location.hostname, (isWebViewIntegration ? applePayPaymentMethodOptions === null || applePayPaymentMethodOptions === void 0 ? void 0 : applePayPaymentMethodOptions.identifier : merchant.identifier || merchant.id) ||
238
+ profileData.merchant.id)];
237
239
  case 2:
238
240
  merchantSession = _a.sent();
239
241
  if (debug)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/apple-pay-button",
3
- "version": "0.0.84-development",
3
+ "version": "0.0.85-development",
4
4
  "description": "Apple Pay Button React Component",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",