@w3payments/adapters 1.1.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.
@@ -0,0 +1,29 @@
1
+ import { VendorAdapter, PaymentConfig, PaymentMethodService, PaymentIntent, CheckoutSession, PaymentResult } from '@w3payments/common';
2
+
3
+ declare class MeshPayAdapter implements VendorAdapter {
4
+ readonly id = "meshpay";
5
+ readonly name = "MeshPay";
6
+ private config?;
7
+ private environment;
8
+ private initialized;
9
+ constructor(environment?: string);
10
+ initialize(config: PaymentConfig): Promise<void>;
11
+ registerOnrampMethods(paymentMethodService: PaymentMethodService): void;
12
+ private mapExchanges;
13
+ private mapWallets;
14
+ private getIntegrationsData;
15
+ private getNetworksData;
16
+ createCheckoutSession(intent: PaymentIntent): Promise<CheckoutSession>;
17
+ /**
18
+ * Get network ID from network name
19
+ */
20
+ private getNetworkIdFromName;
21
+ private generateLinkToken;
22
+ /**
23
+ * Open MeshPay checkout using their Web Link SDK
24
+ */
25
+ openCheckout(session: CheckoutSession): Promise<PaymentResult>;
26
+ getPaymentStatus(_sessionId: string): Promise<PaymentResult>;
27
+ }
28
+
29
+ export { MeshPayAdapter };
@@ -0,0 +1,29 @@
1
+ import { VendorAdapter, PaymentConfig, PaymentMethodService, PaymentIntent, CheckoutSession, PaymentResult } from '@w3payments/common';
2
+
3
+ declare class MeshPayAdapter implements VendorAdapter {
4
+ readonly id = "meshpay";
5
+ readonly name = "MeshPay";
6
+ private config?;
7
+ private environment;
8
+ private initialized;
9
+ constructor(environment?: string);
10
+ initialize(config: PaymentConfig): Promise<void>;
11
+ registerOnrampMethods(paymentMethodService: PaymentMethodService): void;
12
+ private mapExchanges;
13
+ private mapWallets;
14
+ private getIntegrationsData;
15
+ private getNetworksData;
16
+ createCheckoutSession(intent: PaymentIntent): Promise<CheckoutSession>;
17
+ /**
18
+ * Get network ID from network name
19
+ */
20
+ private getNetworkIdFromName;
21
+ private generateLinkToken;
22
+ /**
23
+ * Open MeshPay checkout using their Web Link SDK
24
+ */
25
+ openCheckout(session: CheckoutSession): Promise<PaymentResult>;
26
+ getPaymentStatus(_sessionId: string): Promise<PaymentResult>;
27
+ }
28
+
29
+ export { MeshPayAdapter };