@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypal/checkout-components",
3
- "version": "5.0.232",
3
+ "version": "5.0.233",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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,
@@ -461,6 +461,12 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
461
461
  }
462
462
  },
463
463
 
464
+ paymentRequest: {
465
+ type: 'object',
466
+ queryParam: false,
467
+ required: false
468
+ },
469
+
464
470
  flow: {
465
471
  type: 'string',
466
472
  queryParam: true,
@@ -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) {