@paypal/checkout-components 5.0.232 → 5.0.233
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/package.json
CHANGED
package/src/ui/buttons/props.js
CHANGED
|
@@ -350,6 +350,8 @@ export type ApplePayPaymentAuthorizationResult = {|
|
|
|
350
350
|
|
|
351
351
|
export type ApplePaySessionConfig = {|
|
|
352
352
|
begin : () => void,
|
|
353
|
+
abort : () => void,
|
|
354
|
+
oncancel : () => void,
|
|
353
355
|
addEventListener : (string, Function) => void,
|
|
354
356
|
// eslint-disable-next-line flowtype/no-weak-types
|
|
355
357
|
completeMerchantValidation : (validatedSession : any) => void,
|
package/src/zoid/buttons/util.js
CHANGED
|
@@ -192,11 +192,6 @@ export function applePaySession() : ?ApplePaySessionConfigRequest {
|
|
|
192
192
|
listeners.paymentauthorized({ payment });
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
-
// eslint-disable-next-line unicorn/prefer-add-event-listener
|
|
196
|
-
session.oncancel = () => {
|
|
197
|
-
listeners.cancel();
|
|
198
|
-
};
|
|
199
|
-
|
|
200
195
|
return {
|
|
201
196
|
addEventListener: (name, handler) => {
|
|
202
197
|
listeners[name] = handler;
|
|
@@ -218,7 +213,9 @@ export function applePaySession() : ?ApplePaySessionConfigRequest {
|
|
|
218
213
|
const newUpdate = convertErrorsFromUpdate(update);
|
|
219
214
|
session.completePayment(newUpdate);
|
|
220
215
|
},
|
|
221
|
-
begin: () => session.begin()
|
|
216
|
+
begin: () => session.begin(),
|
|
217
|
+
abort: () => session.abort(),
|
|
218
|
+
oncancel: () => session.oncancel()
|
|
222
219
|
};
|
|
223
220
|
};
|
|
224
221
|
} catch (e) {
|