@tap-payments/apple-pay-button 0.0.1-test → 0.0.3-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.
package/build/constants/index.js
CHANGED
|
@@ -98,11 +98,6 @@ export var useApplePay = function (_a) {
|
|
|
98
98
|
});
|
|
99
99
|
console.info("Creating ApplePaySession with version: ".concat(ApplePayVersion, " and request: ").concat(JSON.stringify(request)));
|
|
100
100
|
session_1 = new ApplePaySession(ApplePayVersion, request);
|
|
101
|
-
session_1.oncancel = function () {
|
|
102
|
-
console.info('oncancel event');
|
|
103
|
-
if (onCancel)
|
|
104
|
-
onCancel();
|
|
105
|
-
};
|
|
106
101
|
session_1.onvalidatemerchant = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
107
102
|
var merchantSession, error_1;
|
|
108
103
|
return __generator(this, function (_a) {
|
|
@@ -110,7 +105,6 @@ export var useApplePay = function (_a) {
|
|
|
110
105
|
case 0:
|
|
111
106
|
console.info('Creating merchant session and validating merchant session');
|
|
112
107
|
console.info('onvalidatemerchant event', event);
|
|
113
|
-
setLoading(true);
|
|
114
108
|
_a.label = 1;
|
|
115
109
|
case 1:
|
|
116
110
|
_a.trys.push([1, 3, , 4]);
|
|
@@ -127,9 +121,7 @@ export var useApplePay = function (_a) {
|
|
|
127
121
|
console.error('error in onvalidatemerchant', error_1);
|
|
128
122
|
session_1.completePayment({ status: 'STATUS_FAILURE' });
|
|
129
123
|
throw error_1;
|
|
130
|
-
case 4:
|
|
131
|
-
setLoading(false);
|
|
132
|
-
return [2];
|
|
124
|
+
case 4: return [2];
|
|
133
125
|
}
|
|
134
126
|
});
|
|
135
127
|
}); };
|
|
@@ -138,7 +130,6 @@ export var useApplePay = function (_a) {
|
|
|
138
130
|
return __generator(this, function (_b) {
|
|
139
131
|
switch (_b.label) {
|
|
140
132
|
case 0:
|
|
141
|
-
setLoading(true);
|
|
142
133
|
console.info('onpaymentauthorized event', event);
|
|
143
134
|
_b.label = 1;
|
|
144
135
|
case 1:
|
|
@@ -173,12 +164,15 @@ export var useApplePay = function (_a) {
|
|
|
173
164
|
console.error('error in onpaymentauthorized', error_2);
|
|
174
165
|
session_1.completePayment({ status: 'STATUS_FAILURE' });
|
|
175
166
|
throw error_2;
|
|
176
|
-
case 10:
|
|
177
|
-
setLoading(false);
|
|
178
|
-
return [2];
|
|
167
|
+
case 10: return [2];
|
|
179
168
|
}
|
|
180
169
|
});
|
|
181
170
|
}); };
|
|
171
|
+
session_1.oncancel = function () {
|
|
172
|
+
console.info('oncancel event');
|
|
173
|
+
if (onCancel)
|
|
174
|
+
onCancel();
|
|
175
|
+
};
|
|
182
176
|
session_1.begin();
|
|
183
177
|
}
|
|
184
178
|
catch (e) {
|
package/build/index.js
CHANGED