@getopenpay/openpay-js 0.3.10 → 0.3.14-alpha.7c935e9
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/{Resource-BwnYhNnF.js → Resource-BRYzUqve.js} +2 -2
- package/dist/{SimpleSpanProcessor-CNeg-HkI.js → SimpleSpanProcessor-CdfYCCJi.js} +6 -6
- package/dist/{detect-resources-KmPgp1HM.js → detect-resources-BHszvR4t.js} +6 -6
- package/dist/{diag-api-CiDu2N_T.js → diag-api-_xbEFcQo.js} +1 -1
- package/dist/{index-CoA7_Px0.js → index-B0fCRkox.js} +5 -5
- package/dist/{index-BL71Q0n2.js → index-Bta_oiKs.js} +5 -5
- package/dist/{index-W7DtXaD3.js → index-CJN6X0el.js} +1 -1
- package/dist/{index-CPUf84ze.js → index-CXMVZneZ.js} +1 -1
- package/dist/{index-WtxD-sDh.js → index-DLSP5Typ.js} +1 -1
- package/dist/index-DfP3YYx1.js +5927 -0
- package/dist/{index-64iQVL2L.js → index-DurQKV_X.js} +4 -4
- package/dist/{index-G5eZcdPs.js → index-WSWj8BSQ.js} +4 -4
- package/dist/{index-BJAL6jzj.js → index-pEeDNfeA.js} +1 -1
- package/dist/{index-DzDwGl0K.js → index-ssTP1G36.js} +4 -4
- package/dist/index.d.ts +46 -13
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +18 -18
- package/dist/{metrics-api-DlqE-441.js → metrics-api-BmdmXQf4.js} +1 -1
- package/dist/{sdk-info-BT4XAByS.js → sdk-info-BKkfy_B_.js} +1 -1
- package/dist/{url-BQFdlass.js → url-DMJTnK7v.js} +1 -1
- package/dist/{utils-BWL93mjJ.js → utils-BeclJt1e.js} +3 -3
- package/dist/{utils-CylBTH09.js → utils-CJptw95A.js} +1 -1
- package/package.json +1 -1
- package/dist/index-CsHbuY7s.js +0 -5355
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as l } from "./Resource-
|
|
2
|
-
import { d as ee } from "./Resource-
|
|
3
|
-
import { d as v } from "./diag-api-
|
|
4
|
-
import { e as A, f as m, g as b, h as w, S as D } from "./sdk-info-
|
|
1
|
+
import { R as l } from "./Resource-BRYzUqve.js";
|
|
2
|
+
import { d as ee } from "./Resource-BRYzUqve.js";
|
|
3
|
+
import { d as v } from "./diag-api-_xbEFcQo.js";
|
|
4
|
+
import { e as A, f as m, g as b, h as w, S as D } from "./sdk-info-BKkfy_B_.js";
|
|
5
5
|
var T = (
|
|
6
6
|
/** @class */
|
|
7
7
|
function() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as u } from "./index-
|
|
2
|
-
import { B as c } from "./SimpleSpanProcessor-
|
|
3
|
-
import { A as g, b as x, a as S, C as b, F as w, I as P, N as C, P as T, R as O, d as M, S as A, e as E, c as R, T as N } from "./SimpleSpanProcessor-
|
|
4
|
-
import { P as F, a as j, b as k, g as I, c as W, h as U, n as X, p as z, s as D, d as G } from "./utils-
|
|
1
|
+
import { R as u } from "./index-DfP3YYx1.js";
|
|
2
|
+
import { B as c } from "./SimpleSpanProcessor-CdfYCCJi.js";
|
|
3
|
+
import { A as g, b as x, a as S, C as b, F as w, I as P, N as C, P as T, R as O, d as M, S as A, e as E, c as R, T as N } from "./SimpleSpanProcessor-CdfYCCJi.js";
|
|
4
|
+
import { P as F, a as j, b as k, g as I, c as W, h as U, n as X, p as z, s as D, d as G } from "./utils-CJptw95A.js";
|
|
5
5
|
var l = function(n, r) {
|
|
6
6
|
var e = typeof Symbol == "function" && n[Symbol.iterator];
|
|
7
7
|
if (!e) return n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as I, t as l, i as D, T as o, d as T, e as b } from "./index-
|
|
1
|
+
import { b as I, t as l, i as D, T as o, d as T, e as b } from "./index-DfP3YYx1.js";
|
|
2
2
|
var C = I("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
3
3
|
function A(r) {
|
|
4
4
|
return r.getValue(C) === !0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { z as de, p as T, r as _e, w as ye, j as ve, n as he, y as me, dJ as ge, h as Se, dK as Ae, l as Ee, q as Te, i as Pe, m as Re, o as Oe, t as be, u as Ce } from "./url-
|
|
2
|
-
import { b as k, t as O, i as Y, T as b, d as Ie, c as B } from "./index-
|
|
3
|
-
import { d as _ } from "./diag-api-
|
|
1
|
+
import { z as de, p as T, r as _e, w as ye, j as ve, n as he, y as me, dJ as ge, h as Se, dK as Ae, l as Ee, q as Te, i as Pe, m as Re, o as Oe, t as be, u as Ce } from "./url-DMJTnK7v.js";
|
|
2
|
+
import { b as k, t as O, i as Y, T as b, d as Ie, c as B } from "./index-DfP3YYx1.js";
|
|
3
|
+
import { d as _ } from "./diag-api-_xbEFcQo.js";
|
|
4
4
|
import { h as X, E as je } from "./ExportResult-Bo1QOwfo.js";
|
|
5
|
-
import { D as Me, j as Ne, br as we, bs as De, bt as Le, b as xe, T as Ge, bu as Be, h as Ve, i as Ue, bv as He } from "./sdk-info-
|
|
5
|
+
import { D as Me, j as Ne, br as we, bs as De, bt as Le, b as xe, T as Ge, bu as Be, h as Ve, i as Ue, bv as He } from "./sdk-info-BKkfy_B_.js";
|
|
6
6
|
import { _ as Ke } from "./utils-BGeftTvk.js";
|
|
7
7
|
var p;
|
|
8
8
|
(function(e) {
|
package/dist/index.d.ts
CHANGED
|
@@ -524,6 +524,12 @@ declare type LoopCryptoFlowCustomParams =
|
|
|
524
524
|
| {
|
|
525
525
|
customer: Omit<CustomerResponse, 'paymentMethods' | 'merchants' | 'dateCreated'>;
|
|
526
526
|
payin: PayInCompleteEvent;
|
|
527
|
+
mode: 'checkout';
|
|
528
|
+
success: true;
|
|
529
|
+
}
|
|
530
|
+
| {
|
|
531
|
+
customer: Omit<CustomerResponse, 'paymentMethods' | 'merchants' | 'dateCreated'>;
|
|
532
|
+
mode: 'setup';
|
|
527
533
|
success: true;
|
|
528
534
|
}
|
|
529
535
|
| {
|
|
@@ -537,6 +543,7 @@ declare type LoopCryptoFlowCustomParams =
|
|
|
537
543
|
declare type LoopCryptoWidgetProps = {
|
|
538
544
|
paymentUsdAmount: number;
|
|
539
545
|
suggestedAuthorizationUsdAmount: number;
|
|
546
|
+
minAuthorizationUsdAmount: number;
|
|
540
547
|
subscriptionRefId?: string;
|
|
541
548
|
customerRefId?: string;
|
|
542
549
|
invoiceRefId?: string;
|
|
@@ -684,6 +691,17 @@ declare const OjsFlows = {
|
|
|
684
691
|
init: initAuthnetGooglePayFlow,
|
|
685
692
|
run: runAuthnetGooglePayFlow,
|
|
686
693
|
},
|
|
694
|
+
|
|
695
|
+
adyenGooglePay: {
|
|
696
|
+
init: initAdyenGooglePayFlow,
|
|
697
|
+
run: runAdyenGooglePayFlow,
|
|
698
|
+
},
|
|
699
|
+
|
|
700
|
+
adyenApplePay: {
|
|
701
|
+
init: initAdyenApplePayFlow,
|
|
702
|
+
run: runAdyenApplePayFlow,
|
|
703
|
+
},
|
|
704
|
+
|
|
687
705
|
// 👉 Add more flows here
|
|
688
706
|
|
|
689
707
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -761,6 +779,14 @@ export declare class OpenPayForm {
|
|
|
761
779
|
publisher: LoadedOncePublisher<InitApplePayFlowResult>;
|
|
762
780
|
initialize: (initParams: InitOjsFlowParams) => Promise<void>;
|
|
763
781
|
};
|
|
782
|
+
readonly adyenGooglePay: {
|
|
783
|
+
publisher: LoadedOncePublisher<InitGooglePayFlowResult>;
|
|
784
|
+
initialize: (initParams: InitOjsFlowParams) => Promise<void>;
|
|
785
|
+
};
|
|
786
|
+
readonly adyenApplePay: {
|
|
787
|
+
publisher: LoadedOncePublisher<InitApplePayFlowResult>;
|
|
788
|
+
initialize: (initParams: InitOjsFlowParams) => Promise<void>;
|
|
789
|
+
};
|
|
764
790
|
};
|
|
765
791
|
private deviceToken;
|
|
766
792
|
private isSubmitting;
|
|
@@ -797,18 +823,6 @@ export declare class OpenPayForm {
|
|
|
797
823
|
private checkValidFormInstance;
|
|
798
824
|
getAvailablePaymentMethods: () => Promise<({
|
|
799
825
|
name: string;
|
|
800
|
-
} | {
|
|
801
|
-
processor: PaymentProcessor;
|
|
802
|
-
isAvailable: boolean;
|
|
803
|
-
isLoading: boolean;
|
|
804
|
-
startFlow: (customParams?: ApplePayFlowCustomParams) => Promise<void>;
|
|
805
|
-
name: string;
|
|
806
|
-
} | {
|
|
807
|
-
processor: PaymentProcessor;
|
|
808
|
-
isAvailable: boolean;
|
|
809
|
-
isLoading: boolean;
|
|
810
|
-
startFlow: (customParams?: GooglePayFlowCustomParams) => Promise<void>;
|
|
811
|
-
name: string;
|
|
812
826
|
} | {
|
|
813
827
|
isAvailable: true;
|
|
814
828
|
widgetProps: LoopCryptoWidgetProps;
|
|
@@ -817,6 +831,12 @@ export declare class OpenPayForm {
|
|
|
817
831
|
} | {
|
|
818
832
|
isAvailable: false;
|
|
819
833
|
name: string;
|
|
834
|
+
} | {
|
|
835
|
+
processor: PaymentProcessor;
|
|
836
|
+
isAvailable: boolean;
|
|
837
|
+
isLoading: boolean;
|
|
838
|
+
startFlow: (customParams?: ApplePayFlowCustomParams) => Promise<void>;
|
|
839
|
+
name: string;
|
|
820
840
|
} | {
|
|
821
841
|
processor: "stripe";
|
|
822
842
|
isAvailable: true;
|
|
@@ -836,6 +856,12 @@ export declare class OpenPayForm {
|
|
|
836
856
|
isAvailable: boolean;
|
|
837
857
|
startFlow: () => Promise<void>;
|
|
838
858
|
name: string;
|
|
859
|
+
} | {
|
|
860
|
+
processor: PaymentProcessor;
|
|
861
|
+
isAvailable: boolean;
|
|
862
|
+
isLoading: boolean;
|
|
863
|
+
startFlow: (customParams?: GooglePayFlowCustomParams) => Promise<void>;
|
|
864
|
+
name: string;
|
|
839
865
|
})[]>;
|
|
840
866
|
generalSubmit: <T extends SubmitMethod>(method: T, settings?: SubmitSettings<T>) => Promise<void>;
|
|
841
867
|
/**
|
|
@@ -855,10 +881,13 @@ export declare class OpenPayForm {
|
|
|
855
881
|
declare interface PayInCompleteEvent extends PayinResponse {}
|
|
856
882
|
|
|
857
883
|
declare enum PayInFailed {
|
|
884
|
+
// Create payment method
|
|
885
|
+
METHOD_CREATION_FAILED = 'methodCreationFailed',
|
|
858
886
|
INSUFFICIENT_BALANCE = 'insufficientBalance',
|
|
859
887
|
INSUFFICIENT_AUTHORIZATION = 'insufficientAuthorization',
|
|
860
888
|
SIGNED_MESSAGE_REQUIRED = 'signedMessageRequired',
|
|
861
889
|
CUSTOMER_CREATION_FAILED = 'customerCreationFailed',
|
|
890
|
+
// Create pay-in
|
|
862
891
|
PAYMENT_FAILED = 'paymentFailed',
|
|
863
892
|
TRANSACTION_FAILED = 'transactionFailed',
|
|
864
893
|
}
|
|
@@ -1067,7 +1096,7 @@ declare interface PaymentMethodTokenExchangeRate {
|
|
|
1067
1096
|
timestamp: number;
|
|
1068
1097
|
}
|
|
1069
1098
|
|
|
1070
|
-
declare const PaymentProcessor = z.enum(['stripe', 'airwallex', 'authorize_net']);
|
|
1099
|
+
declare const PaymentProcessor = z.enum(['stripe', 'airwallex', 'authorize_net', 'adyen']);
|
|
1071
1100
|
|
|
1072
1101
|
declare type PaymentProcessor = z.infer<typeof PaymentProcessor>;
|
|
1073
1102
|
|
|
@@ -1134,6 +1163,8 @@ declare type ProcessorSpecificSubmitSettings<T extends SubmitMethod = SubmitMeth
|
|
|
1134
1163
|
'airwallex-apple-pay': ApplePayFlowCustomParams;
|
|
1135
1164
|
'authorizenet-google-pay': GooglePayFlowCustomParams;
|
|
1136
1165
|
'authorizenet-apple-pay': ApplePayFlowCustomParams;
|
|
1166
|
+
'adyen-google-pay': GooglePayFlowCustomParams;
|
|
1167
|
+
'adyen-apple-pay': ApplePayFlowCustomParams;
|
|
1137
1168
|
'loop-crypto': LoopCryptoFlowCustomParams;
|
|
1138
1169
|
paypal: PaypalFlowCustomParams;
|
|
1139
1170
|
}[T];
|
|
@@ -1166,6 +1197,8 @@ export declare enum SubmitMethods {
|
|
|
1166
1197
|
airwallexApplePay = 'airwallex-apple-pay',
|
|
1167
1198
|
authorizenetGooglePay = 'authorizenet-google-pay',
|
|
1168
1199
|
authorizenetApplePay = 'authorizenet-apple-pay',
|
|
1200
|
+
adyenGooglePay = 'adyen-google-pay',
|
|
1201
|
+
adyenApplePay = 'adyen-apple-pay',
|
|
1169
1202
|
loopCrypto = 'loop-crypto',
|
|
1170
1203
|
paypal = 'paypal',
|
|
1171
1204
|
}
|
package/dist/index.es.js
CHANGED