@getopenpay/openpay-js 0.2.36 → 0.3.0

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/dist/index.d.ts CHANGED
@@ -634,6 +634,12 @@ declare const OjsFlows = {
634
634
  run: runPockytPaypalFlow,
635
635
  },
636
636
 
637
+ // PayPal
638
+ paypal: {
639
+ init: initPaypalFlow,
640
+ run: runPaypalFlow,
641
+ },
642
+
637
643
  // Airwallex
638
644
  airwallexGooglePay: {
639
645
  init: initAirwallexGooglePayFlow,
@@ -721,6 +727,14 @@ export declare class OpenPayForm {
721
727
  publisher: LoadedOncePublisher<InitLoopCryptoFlowSuccess>;
722
728
  initialize: (initParams: InitOjsFlowParams) => Promise<void>;
723
729
  };
730
+ readonly paypal: {
731
+ publisher: LoadedOncePublisher<{
732
+ isLoading: boolean;
733
+ isAvailable: boolean;
734
+ startFlow: () => Promise<void>;
735
+ }>;
736
+ initialize: (initParams: InitOjsFlowParams) => Promise<void>;
737
+ };
724
738
  readonly authorizeNetGooglePay: {
725
739
  publisher: LoadedOncePublisher<InitGooglePayFlowResult>;
726
740
  initialize: (initParams: InitOjsFlowParams) => Promise<void>;
@@ -776,6 +790,14 @@ export declare class OpenPayForm {
776
790
  isLoading: boolean;
777
791
  startFlow: (customParams?: GooglePayFlowCustomParams) => Promise<void>;
778
792
  name: string;
793
+ } | {
794
+ isAvailable: true;
795
+ widgetProps: LoopCryptoWidgetProps;
796
+ initLoopConnectProps: LoopConnectConfig;
797
+ name: string;
798
+ } | {
799
+ isAvailable: false;
800
+ name: string;
779
801
  } | {
780
802
  processor: "stripe";
781
803
  isAvailable: true;
@@ -791,12 +813,9 @@ export declare class OpenPayForm {
791
813
  controller: StripeLinkController;
792
814
  name: string;
793
815
  } | {
794
- isAvailable: false;
795
- name: string;
796
- } | {
797
- isAvailable: true;
798
- widgetProps: LoopCryptoWidgetProps;
799
- initLoopConnectProps: LoopConnectConfig;
816
+ isLoading: boolean;
817
+ isAvailable: boolean;
818
+ startFlow: () => Promise<void>;
800
819
  name: string;
801
820
  })[] | undefined;
802
821
  generalSubmit: <T extends SubmitMethod>(method: T, settings?: SubmitSettings<T>) => Promise<void> | undefined;
@@ -1092,6 +1111,7 @@ declare type ProcessorSpecificSubmitSettings<T extends SubmitMethod = SubmitMeth
1092
1111
  'authorizenet-google-pay': GooglePayFlowCustomParams;
1093
1112
  'authorizenet-apple-pay': ApplePayFlowCustomParams;
1094
1113
  'loop-crypto': LoopCryptoFlowCustomParams;
1114
+ paypal: { useRedirectFlow?: boolean };
1095
1115
  }[T];
1096
1116
 
1097
1117
  declare type PRStatuses = Record<PaymentRequestProvider, PaymentRequestStatus>;
@@ -1123,6 +1143,7 @@ export declare enum SubmitMethods {
1123
1143
  authorizenetGooglePay = 'authorizenet-google-pay',
1124
1144
  authorizenetApplePay = 'authorizenet-apple-pay',
1125
1145
  loopCrypto = 'loop-crypto',
1146
+ paypal = 'paypal',
1126
1147
  }
1127
1148
 
1128
1149
  export declare type SubmitSettings<T extends SubmitMethod = SubmitMethod> = ProcessorSpecificSubmitSettings<T> &