@tap-payments/apple-pay-button 0.0.2-test → 0.0.4-test

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.
@@ -120,7 +120,7 @@ export var useApplePay = function (_a) {
120
120
  case 3:
121
121
  error_1 = _a.sent();
122
122
  console.error('error in onvalidatemerchant', error_1);
123
- session_1.completePayment({ status: 'STATUS_FAILURE' });
123
+ session_1.completePayment({ status: ApplePaySession.STATUS_FAILURE });
124
124
  throw error_1;
125
125
  case 4:
126
126
  setLoading(false);
@@ -147,7 +147,7 @@ export var useApplePay = function (_a) {
147
147
  case 2: return [4, (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(event.payment.token.paymentData))];
148
148
  case 3:
149
149
  _b.sent();
150
- session_1.completePayment({ status: 'STATUS_SUCCESS' });
150
+ session_1.completePayment({ status: ApplePaySession.STATUS_SUCCESS });
151
151
  return [3, 8];
152
152
  case 4: return [4, appService.tapTokenization(event.payment.token.paymentData, profileData.merchant)];
153
153
  case 5:
@@ -155,18 +155,18 @@ export var useApplePay = function (_a) {
155
155
  return [4, (onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(data))];
156
156
  case 6:
157
157
  _b.sent();
158
- session_1.completePayment({ status: 'STATUS_SUCCESS' });
158
+ session_1.completePayment({ status: ApplePaySession.STATUS_SUCCESS });
159
159
  return [3, 8];
160
160
  case 7:
161
161
  console.error('We only support AppleToken and TapToken for now');
162
162
  console.info('Completing payment with status: STATUS_FAILURE');
163
- session_1.completePayment({ status: 'STATUS_FAILURE' });
163
+ session_1.completePayment({ status: ApplePaySession.STATUS_FAILURE });
164
164
  _b.label = 8;
165
165
  case 8: return [3, 10];
166
166
  case 9:
167
167
  error_2 = _b.sent();
168
168
  console.error('error in onpaymentauthorized', error_2);
169
- session_1.completePayment({ status: 'STATUS_FAILURE' });
169
+ session_1.completePayment({ status: ApplePaySession.STATUS_FAILURE });
170
170
  throw error_2;
171
171
  case 10:
172
172
  setLoading(false);
@@ -174,8 +174,8 @@ export var useApplePay = function (_a) {
174
174
  }
175
175
  });
176
176
  }); };
177
- session_1.oncancel = function () {
178
- console.info('oncancel event');
177
+ session_1.oncancel = function (event) {
178
+ console.info('oncancel event', event);
179
179
  if (onCancel)
180
180
  onCancel();
181
181
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/apple-pay-button",
3
- "version": "0.0.2-test",
3
+ "version": "0.0.4-test",
4
4
  "description": "Apple Pay Button React Component",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",