spaark-payapi-sdk 1.0.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/LICENSE +21 -0
- package/README.md +354 -0
- package/dist/index.d.mts +505 -0
- package/dist/index.d.ts +505 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -0
- package/dist/react-pjDvSSJA.d.mts +164 -0
- package/dist/react-pjDvSSJA.d.ts +164 -0
- package/dist/react.d.mts +2 -0
- package/dist/react.d.ts +2 -0
- package/dist/react.js +7 -0
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +7 -0
- package/dist/react.mjs.map +1 -0
- package/package.json +97 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
type Correspondent = 'MTN_MOMO_CMR' | 'ORANGE_CMR' | 'MTN_MOMO_COG' | 'AIRTEL_COG' | 'MTN_MOMO_GAB' | 'AIRTEL_GAB';
|
|
4
|
+
declare const CORRESPONDENTS: readonly ["MTN_MOMO_CMR", "ORANGE_CMR", "MTN_MOMO_COG", "AIRTEL_COG", "MTN_MOMO_GAB", "AIRTEL_GAB"];
|
|
5
|
+
type CorrespondentFeature = 'deposit' | 'payout' | 'refund';
|
|
6
|
+
interface CorrespondentInfo {
|
|
7
|
+
correspondent: Correspondent;
|
|
8
|
+
name: string;
|
|
9
|
+
country: string;
|
|
10
|
+
countryCode: string;
|
|
11
|
+
currency: string;
|
|
12
|
+
features: CorrespondentFeature[];
|
|
13
|
+
phoneRegex: RegExp;
|
|
14
|
+
}
|
|
15
|
+
declare const CORRESPONDENT_INFO: Record<Correspondent, CorrespondentInfo>;
|
|
16
|
+
interface TransactionLimits {
|
|
17
|
+
minDeposit: number;
|
|
18
|
+
maxDeposit: number;
|
|
19
|
+
minPayout: number;
|
|
20
|
+
maxPayout: number;
|
|
21
|
+
currency: string;
|
|
22
|
+
dailyLimit?: number;
|
|
23
|
+
monthlyLimit?: number;
|
|
24
|
+
}
|
|
25
|
+
declare const DEFAULT_LIMITS: Record<Correspondent, TransactionLimits>;
|
|
26
|
+
|
|
27
|
+
type TransactionStatus = 'ACCEPTED' | 'PENDING' | 'ENQUEUED' | 'PROCESSING' | 'IN_RECONCILIATION' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'EXPIRED' | 'REJECTED' | 'DUPLICATE_IGNORED';
|
|
28
|
+
type Currency = 'XAF' | 'XOF' | 'USD' | 'RWF' | 'GHS' | 'KES' | 'TZS' | 'UGX' | 'ZMW';
|
|
29
|
+
interface MMOAccount {
|
|
30
|
+
type: 'MMO';
|
|
31
|
+
accountDetails: {
|
|
32
|
+
phoneNumber: string;
|
|
33
|
+
provider: Correspondent;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
interface FinancialAddress {
|
|
37
|
+
type: 'MSISDN';
|
|
38
|
+
address: {
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
interface DepositRequest {
|
|
43
|
+
amount: number;
|
|
44
|
+
currency: Currency;
|
|
45
|
+
provider: Correspondent;
|
|
46
|
+
phoneNumber: string;
|
|
47
|
+
transactionId: string;
|
|
48
|
+
preAuthorisationCode?: string;
|
|
49
|
+
clientReferenceId?: string;
|
|
50
|
+
customerMessage?: string;
|
|
51
|
+
metadata?: Array<Record<string, unknown>>;
|
|
52
|
+
}
|
|
53
|
+
interface DepositResponse {
|
|
54
|
+
depositId: string;
|
|
55
|
+
status: TransactionStatus;
|
|
56
|
+
created: string;
|
|
57
|
+
nextStep?: 'FINAL_STATUS' | 'REDIRECT' | 'PRE_AUTHORISATION';
|
|
58
|
+
redirectUrl?: string;
|
|
59
|
+
}
|
|
60
|
+
interface PayoutRequest {
|
|
61
|
+
amount: number;
|
|
62
|
+
currency: Currency;
|
|
63
|
+
provider: Correspondent;
|
|
64
|
+
phoneNumber: string;
|
|
65
|
+
transactionId: string;
|
|
66
|
+
clientReferenceId?: string;
|
|
67
|
+
customerMessage?: string;
|
|
68
|
+
metadata?: Array<Record<string, unknown>>;
|
|
69
|
+
}
|
|
70
|
+
interface PayoutResponse {
|
|
71
|
+
payoutId: string;
|
|
72
|
+
status: TransactionStatus;
|
|
73
|
+
created: string;
|
|
74
|
+
}
|
|
75
|
+
interface PaymentPageRequest {
|
|
76
|
+
depositId: string;
|
|
77
|
+
returnUrl: string;
|
|
78
|
+
phoneNumber?: string;
|
|
79
|
+
amountDetails?: {
|
|
80
|
+
amount: number;
|
|
81
|
+
currency: Currency;
|
|
82
|
+
};
|
|
83
|
+
language?: 'EN' | 'FR';
|
|
84
|
+
country?: string;
|
|
85
|
+
reason?: string;
|
|
86
|
+
customerMessage?: string;
|
|
87
|
+
metadata?: Array<Record<string, unknown> & {
|
|
88
|
+
isPII?: boolean;
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
91
|
+
interface PaymentPageResponse {
|
|
92
|
+
redirectUrl: string;
|
|
93
|
+
}
|
|
94
|
+
interface RefundRequest {
|
|
95
|
+
depositId: string;
|
|
96
|
+
amount: number;
|
|
97
|
+
transactionId: string;
|
|
98
|
+
}
|
|
99
|
+
interface RefundResponse {
|
|
100
|
+
refundId: string;
|
|
101
|
+
depositId: string;
|
|
102
|
+
status: TransactionStatus;
|
|
103
|
+
amount: number;
|
|
104
|
+
created: string;
|
|
105
|
+
}
|
|
106
|
+
interface TransactionStatusResponse {
|
|
107
|
+
depositId?: string;
|
|
108
|
+
payoutId?: string;
|
|
109
|
+
status: TransactionStatus;
|
|
110
|
+
amount: string;
|
|
111
|
+
currency: string;
|
|
112
|
+
country: string;
|
|
113
|
+
payer?: MMOAccount;
|
|
114
|
+
recipient?: MMOAccount;
|
|
115
|
+
created: string;
|
|
116
|
+
customerMessage?: string;
|
|
117
|
+
clientReferenceId?: string;
|
|
118
|
+
providerTransactionId?: string;
|
|
119
|
+
failureReason?: {
|
|
120
|
+
failureCode: DepositFailureCode | PayoutFailureCode;
|
|
121
|
+
failureMessage?: string;
|
|
122
|
+
};
|
|
123
|
+
metadata?: Record<string, string>;
|
|
124
|
+
}
|
|
125
|
+
type DepositFailureCode = 'PAYER_NOT_FOUND' | 'PAYMENT_NOT_APPROVED' | 'PAYER_LIMIT_REACHED' | 'PAYMENT_IN_PROGRESS' | 'INSUFFICIENT_BALANCE' | 'WALLET_LIMIT_REACHED' | 'UNSPECIFIED_FAILURE' | 'UNKNOWN_ERROR';
|
|
126
|
+
type PayoutFailureCode = 'PAWAPAY_WALLET_OUT_OF_FUNDS' | 'RECIPIENT_NOT_FOUND' | 'WALLET_LIMIT_REACHED' | 'MANUALLY_CANCELLED' | 'UNSPECIFIED_FAILURE' | 'UNKNOWN_ERROR';
|
|
127
|
+
interface ActionResponse {
|
|
128
|
+
depositId?: string;
|
|
129
|
+
payoutId?: string;
|
|
130
|
+
status: 'ACCEPTED' | 'REJECTED';
|
|
131
|
+
failureReason?: {
|
|
132
|
+
failureCode: 'NOT_FOUND' | 'INVALID_STATE';
|
|
133
|
+
failureMessage?: string;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
interface PollOptions {
|
|
137
|
+
interval?: number;
|
|
138
|
+
maxAttempts?: number;
|
|
139
|
+
onStatusChange?: (status: TransactionStatus) => void;
|
|
140
|
+
}
|
|
141
|
+
interface TransactionFilters {
|
|
142
|
+
from?: string;
|
|
143
|
+
to?: string;
|
|
144
|
+
status?: TransactionStatus;
|
|
145
|
+
provider?: Correspondent;
|
|
146
|
+
limit?: number;
|
|
147
|
+
offset?: number;
|
|
148
|
+
}
|
|
149
|
+
type FailureReason = 'INSUFFICIENT_FUNDS' | 'RECIPIENT_NOT_FOUND' | 'TRANSACTION_LIMIT_EXCEEDED' | 'INVALID_PHONE_NUMBER' | 'OPERATOR_ERROR' | 'TIMEOUT' | 'DUPLICATE_TRANSACTION' | 'REFUND_NOT_ALLOWED' | 'AMOUNT_TOO_LOW' | 'AMOUNT_TOO_HIGH' | 'SERVICE_UNAVAILABLE';
|
|
150
|
+
|
|
151
|
+
interface PawapayTestDashboardProps {
|
|
152
|
+
apiKey?: string;
|
|
153
|
+
environment?: 'sandbox' | 'production';
|
|
154
|
+
className?: string;
|
|
155
|
+
demoMode?: boolean;
|
|
156
|
+
/** Base path for API routes (e.g., '/api/pawapay'). When set, requests go through your server instead of directly to Pawapay. */
|
|
157
|
+
apiBasePath?: string;
|
|
158
|
+
onDepositComplete?: (response: DepositResponse) => void;
|
|
159
|
+
onPayoutComplete?: (response: PayoutResponse) => void;
|
|
160
|
+
onError?: (error: Error) => void;
|
|
161
|
+
}
|
|
162
|
+
declare function PawapayTestDashboard({ apiKey: initialApiKey, environment: initialEnvironment, className, demoMode: initialDemoMode, apiBasePath, onDepositComplete, onPayoutComplete, onError, }: PawapayTestDashboardProps): react_jsx_runtime.JSX.Element;
|
|
163
|
+
|
|
164
|
+
export { type ActionResponse as A, type Currency as C, type DepositRequest as D, type FailureReason as F, type MMOAccount as M, type PayoutRequest as P, type RefundRequest as R, type TransactionStatusResponse as T, type DepositResponse as a, type PayoutResponse as b, type PaymentPageRequest as c, type PaymentPageResponse as d, type RefundResponse as e, type PollOptions as f, type TransactionFilters as g, type Correspondent as h, type TransactionLimits as i, type CorrespondentInfo as j, CORRESPONDENTS as k, CORRESPONDENT_INFO as l, type CorrespondentFeature as m, DEFAULT_LIMITS as n, type DepositFailureCode as o, type FinancialAddress as p, PawapayTestDashboard as q, type PawapayTestDashboardProps as r, type PayoutFailureCode as s, type TransactionStatus as t };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
type Correspondent = 'MTN_MOMO_CMR' | 'ORANGE_CMR' | 'MTN_MOMO_COG' | 'AIRTEL_COG' | 'MTN_MOMO_GAB' | 'AIRTEL_GAB';
|
|
4
|
+
declare const CORRESPONDENTS: readonly ["MTN_MOMO_CMR", "ORANGE_CMR", "MTN_MOMO_COG", "AIRTEL_COG", "MTN_MOMO_GAB", "AIRTEL_GAB"];
|
|
5
|
+
type CorrespondentFeature = 'deposit' | 'payout' | 'refund';
|
|
6
|
+
interface CorrespondentInfo {
|
|
7
|
+
correspondent: Correspondent;
|
|
8
|
+
name: string;
|
|
9
|
+
country: string;
|
|
10
|
+
countryCode: string;
|
|
11
|
+
currency: string;
|
|
12
|
+
features: CorrespondentFeature[];
|
|
13
|
+
phoneRegex: RegExp;
|
|
14
|
+
}
|
|
15
|
+
declare const CORRESPONDENT_INFO: Record<Correspondent, CorrespondentInfo>;
|
|
16
|
+
interface TransactionLimits {
|
|
17
|
+
minDeposit: number;
|
|
18
|
+
maxDeposit: number;
|
|
19
|
+
minPayout: number;
|
|
20
|
+
maxPayout: number;
|
|
21
|
+
currency: string;
|
|
22
|
+
dailyLimit?: number;
|
|
23
|
+
monthlyLimit?: number;
|
|
24
|
+
}
|
|
25
|
+
declare const DEFAULT_LIMITS: Record<Correspondent, TransactionLimits>;
|
|
26
|
+
|
|
27
|
+
type TransactionStatus = 'ACCEPTED' | 'PENDING' | 'ENQUEUED' | 'PROCESSING' | 'IN_RECONCILIATION' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'EXPIRED' | 'REJECTED' | 'DUPLICATE_IGNORED';
|
|
28
|
+
type Currency = 'XAF' | 'XOF' | 'USD' | 'RWF' | 'GHS' | 'KES' | 'TZS' | 'UGX' | 'ZMW';
|
|
29
|
+
interface MMOAccount {
|
|
30
|
+
type: 'MMO';
|
|
31
|
+
accountDetails: {
|
|
32
|
+
phoneNumber: string;
|
|
33
|
+
provider: Correspondent;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
interface FinancialAddress {
|
|
37
|
+
type: 'MSISDN';
|
|
38
|
+
address: {
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
interface DepositRequest {
|
|
43
|
+
amount: number;
|
|
44
|
+
currency: Currency;
|
|
45
|
+
provider: Correspondent;
|
|
46
|
+
phoneNumber: string;
|
|
47
|
+
transactionId: string;
|
|
48
|
+
preAuthorisationCode?: string;
|
|
49
|
+
clientReferenceId?: string;
|
|
50
|
+
customerMessage?: string;
|
|
51
|
+
metadata?: Array<Record<string, unknown>>;
|
|
52
|
+
}
|
|
53
|
+
interface DepositResponse {
|
|
54
|
+
depositId: string;
|
|
55
|
+
status: TransactionStatus;
|
|
56
|
+
created: string;
|
|
57
|
+
nextStep?: 'FINAL_STATUS' | 'REDIRECT' | 'PRE_AUTHORISATION';
|
|
58
|
+
redirectUrl?: string;
|
|
59
|
+
}
|
|
60
|
+
interface PayoutRequest {
|
|
61
|
+
amount: number;
|
|
62
|
+
currency: Currency;
|
|
63
|
+
provider: Correspondent;
|
|
64
|
+
phoneNumber: string;
|
|
65
|
+
transactionId: string;
|
|
66
|
+
clientReferenceId?: string;
|
|
67
|
+
customerMessage?: string;
|
|
68
|
+
metadata?: Array<Record<string, unknown>>;
|
|
69
|
+
}
|
|
70
|
+
interface PayoutResponse {
|
|
71
|
+
payoutId: string;
|
|
72
|
+
status: TransactionStatus;
|
|
73
|
+
created: string;
|
|
74
|
+
}
|
|
75
|
+
interface PaymentPageRequest {
|
|
76
|
+
depositId: string;
|
|
77
|
+
returnUrl: string;
|
|
78
|
+
phoneNumber?: string;
|
|
79
|
+
amountDetails?: {
|
|
80
|
+
amount: number;
|
|
81
|
+
currency: Currency;
|
|
82
|
+
};
|
|
83
|
+
language?: 'EN' | 'FR';
|
|
84
|
+
country?: string;
|
|
85
|
+
reason?: string;
|
|
86
|
+
customerMessage?: string;
|
|
87
|
+
metadata?: Array<Record<string, unknown> & {
|
|
88
|
+
isPII?: boolean;
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
91
|
+
interface PaymentPageResponse {
|
|
92
|
+
redirectUrl: string;
|
|
93
|
+
}
|
|
94
|
+
interface RefundRequest {
|
|
95
|
+
depositId: string;
|
|
96
|
+
amount: number;
|
|
97
|
+
transactionId: string;
|
|
98
|
+
}
|
|
99
|
+
interface RefundResponse {
|
|
100
|
+
refundId: string;
|
|
101
|
+
depositId: string;
|
|
102
|
+
status: TransactionStatus;
|
|
103
|
+
amount: number;
|
|
104
|
+
created: string;
|
|
105
|
+
}
|
|
106
|
+
interface TransactionStatusResponse {
|
|
107
|
+
depositId?: string;
|
|
108
|
+
payoutId?: string;
|
|
109
|
+
status: TransactionStatus;
|
|
110
|
+
amount: string;
|
|
111
|
+
currency: string;
|
|
112
|
+
country: string;
|
|
113
|
+
payer?: MMOAccount;
|
|
114
|
+
recipient?: MMOAccount;
|
|
115
|
+
created: string;
|
|
116
|
+
customerMessage?: string;
|
|
117
|
+
clientReferenceId?: string;
|
|
118
|
+
providerTransactionId?: string;
|
|
119
|
+
failureReason?: {
|
|
120
|
+
failureCode: DepositFailureCode | PayoutFailureCode;
|
|
121
|
+
failureMessage?: string;
|
|
122
|
+
};
|
|
123
|
+
metadata?: Record<string, string>;
|
|
124
|
+
}
|
|
125
|
+
type DepositFailureCode = 'PAYER_NOT_FOUND' | 'PAYMENT_NOT_APPROVED' | 'PAYER_LIMIT_REACHED' | 'PAYMENT_IN_PROGRESS' | 'INSUFFICIENT_BALANCE' | 'WALLET_LIMIT_REACHED' | 'UNSPECIFIED_FAILURE' | 'UNKNOWN_ERROR';
|
|
126
|
+
type PayoutFailureCode = 'PAWAPAY_WALLET_OUT_OF_FUNDS' | 'RECIPIENT_NOT_FOUND' | 'WALLET_LIMIT_REACHED' | 'MANUALLY_CANCELLED' | 'UNSPECIFIED_FAILURE' | 'UNKNOWN_ERROR';
|
|
127
|
+
interface ActionResponse {
|
|
128
|
+
depositId?: string;
|
|
129
|
+
payoutId?: string;
|
|
130
|
+
status: 'ACCEPTED' | 'REJECTED';
|
|
131
|
+
failureReason?: {
|
|
132
|
+
failureCode: 'NOT_FOUND' | 'INVALID_STATE';
|
|
133
|
+
failureMessage?: string;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
interface PollOptions {
|
|
137
|
+
interval?: number;
|
|
138
|
+
maxAttempts?: number;
|
|
139
|
+
onStatusChange?: (status: TransactionStatus) => void;
|
|
140
|
+
}
|
|
141
|
+
interface TransactionFilters {
|
|
142
|
+
from?: string;
|
|
143
|
+
to?: string;
|
|
144
|
+
status?: TransactionStatus;
|
|
145
|
+
provider?: Correspondent;
|
|
146
|
+
limit?: number;
|
|
147
|
+
offset?: number;
|
|
148
|
+
}
|
|
149
|
+
type FailureReason = 'INSUFFICIENT_FUNDS' | 'RECIPIENT_NOT_FOUND' | 'TRANSACTION_LIMIT_EXCEEDED' | 'INVALID_PHONE_NUMBER' | 'OPERATOR_ERROR' | 'TIMEOUT' | 'DUPLICATE_TRANSACTION' | 'REFUND_NOT_ALLOWED' | 'AMOUNT_TOO_LOW' | 'AMOUNT_TOO_HIGH' | 'SERVICE_UNAVAILABLE';
|
|
150
|
+
|
|
151
|
+
interface PawapayTestDashboardProps {
|
|
152
|
+
apiKey?: string;
|
|
153
|
+
environment?: 'sandbox' | 'production';
|
|
154
|
+
className?: string;
|
|
155
|
+
demoMode?: boolean;
|
|
156
|
+
/** Base path for API routes (e.g., '/api/pawapay'). When set, requests go through your server instead of directly to Pawapay. */
|
|
157
|
+
apiBasePath?: string;
|
|
158
|
+
onDepositComplete?: (response: DepositResponse) => void;
|
|
159
|
+
onPayoutComplete?: (response: PayoutResponse) => void;
|
|
160
|
+
onError?: (error: Error) => void;
|
|
161
|
+
}
|
|
162
|
+
declare function PawapayTestDashboard({ apiKey: initialApiKey, environment: initialEnvironment, className, demoMode: initialDemoMode, apiBasePath, onDepositComplete, onPayoutComplete, onError, }: PawapayTestDashboardProps): react_jsx_runtime.JSX.Element;
|
|
163
|
+
|
|
164
|
+
export { type ActionResponse as A, type Currency as C, type DepositRequest as D, type FailureReason as F, type MMOAccount as M, type PayoutRequest as P, type RefundRequest as R, type TransactionStatusResponse as T, type DepositResponse as a, type PayoutResponse as b, type PaymentPageRequest as c, type PaymentPageResponse as d, type RefundResponse as e, type PollOptions as f, type TransactionFilters as g, type Correspondent as h, type TransactionLimits as i, type CorrespondentInfo as j, CORRESPONDENTS as k, CORRESPONDENT_INFO as l, type CorrespondentFeature as m, DEFAULT_LIMITS as n, type DepositFailureCode as o, type FinancialAddress as p, PawapayTestDashboard as q, type PawapayTestDashboardProps as r, type PayoutFailureCode as s, type TransactionStatus as t };
|
package/dist/react.d.mts
ADDED
package/dist/react.d.ts
ADDED
package/dist/react.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),jsxRuntime=require('react/jsx-runtime');var ue=d=>({depositId:d,status:"ACCEPTED",created:new Date().toISOString(),nextStep:"FINAL_STATUS"}),me=d=>({payoutId:d,status:"ACCEPTED",created:new Date().toISOString()}),pe=d=>({depositId:d,status:["COMPLETED","ACCEPTED","PROCESSING","ENQUEUED"][Math.floor(Math.random()*4)],created:new Date(Date.now()-6e4).toISOString(),amount:"5000",currency:"XAF",country:"CMR",payer:{type:"MMO",accountDetails:{phoneNumber:"237670000000",provider:"MTN_MOMO_CMR"}}}),be=()=>[{country:"CMR",providers:[{provider:"MTN_MOMO_CMR",operationTypes:[{operationType:"DEPOSIT",status:"OPERATIONAL"},{operationType:"PAYOUT",status:"OPERATIONAL"}]},{provider:"ORANGE_CMR",operationTypes:[{operationType:"DEPOSIT",status:"OPERATIONAL"},{operationType:"PAYOUT",status:"DELAYED"}]}]}],ge=d=>({country:"CMR",provider:d.startsWith("23767")?"MTN_MOMO_CMR":"ORANGE_CMR",phoneNumber:d.replace(/\D/g,"")}),fe=()=>({companyName:"Demo Company",signatureConfiguration:{signedRequestsOnly:false,signedCallbacks:true},countries:[{country:"CMR",displayName:{en:"Cameroon",fr:"Cameroun"},prefix:"237",flag:"https://cdn.pawapay.io/flags/cmr.svg",providers:[{provider:"MTN_MOMO_CMR",displayName:"MTN Mobile Money",nameDisplayedToCustomer:"MTN MoMo",currencies:[{currency:"XAF",displayName:"CFA Franc",operationTypes:{DEPOSIT:{minAmount:"100",maxAmount:"1000000",status:"OPERATIONAL"},PAYOUT:{minAmount:"100",maxAmount:"500000",status:"OPERATIONAL"}}}]}]}]}),xe=()=>({balances:[{country:"CMR",currency:"XAF",balance:"1250000.00"},{country:"COG",currency:"XAF",balance:"450000.00"},{country:"GAB",currency:"XAF",balance:"780000.00"}]}),ve=()=>[{id:"key-001",key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."}],y=(d=800)=>new Promise(N=>setTimeout(N,d+Math.random()*400)),R=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,d=>{let N=Math.random()*16|0;return (d==="x"?N:N&3|8).toString(16)}),B=[{value:"MTN_MOMO_CMR",label:"MTN Mobile Money",country:"Cameroun"},{value:"ORANGE_CMR",label:"Orange Money",country:"Cameroun"},{value:"MTN_MOMO_COG",label:"MTN Mobile Money",country:"Congo"},{value:"AIRTEL_COG",label:"Airtel Money",country:"Congo"},{value:"MTN_MOMO_GAB",label:"MTN Mobile Money",country:"Gabon"},{value:"AIRTEL_GAB",label:"Airtel Money",country:"Gabon"}],X=[{value:"XAF",label:"XAF (CFA Franc BEAC)"},{value:"XOF",label:"XOF (CFA Franc BCEAO)"},{value:"GHS",label:"GHS (Ghana Cedi)"},{value:"KES",label:"KES (Kenyan Shilling)"},{value:"RWF",label:"RWF (Rwandan Franc)"},{value:"TZS",label:"TZS (Tanzanian Shilling)"},{value:"UGX",label:"UGX (Ugandan Shilling)"},{value:"ZMW",label:"ZMW (Zambian Kwacha)"}];function ye({apiKey:d="",environment:N="sandbox",className:A="",demoMode:L=false,apiBasePath:u="/api/pawapay",onDepositComplete:F,onPayoutComplete:W,onError:m}){let[s,V]=react.useState(d),[c,_]=react.useState(N),[Z,O]=react.useState(!!d||L),[n,G]=react.useState(L),[f,M]=react.useState("deposit"),[x,S]=react.useState("237670000000"),[k,K]=react.useState("5000"),[C,z]=react.useState("XAF"),[w,$]=react.useState("MTN_MOMO_CMR"),[P,Q]=react.useState("Test Payment"),[v,E]=react.useState(""),[I,U]=react.useState([]),[p,l]=react.useState("idle"),a=react.useCallback((e,r,i,h)=>{let ce={id:R(),operation:e,status:r,response:i,error:h,timestamp:new Date().toLocaleTimeString()};U(de=>[ce,...de].slice(0,20));},[]),Y=react.useCallback(()=>{if(!s.trim()){a("Configuration","error",void 0,"API Key is required");return}O(true),G(false),a("Configuration","success",{environment:c,configured:true,apiBasePath:u});},[s,c,u,a]),q=react.useCallback(()=>{G(true),O(true),a("Configuration","success",{mode:"demo",message:"Demo mode activated - responses are simulated"});},[a]),ee=react.useCallback(async()=>{if(!(!s&&!n)){l("loading");try{let e=R();E(e);let r;if(n)await y(),r=ue(e);else {let i=await fetch(`${u}/deposit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,environment:c,amount:parseFloat(k),currency:C,provider:w,phoneNumber:x,customerMessage:P.slice(0,22),transactionId:e})}),h=await i.json();if(!i.ok)throw new Error(h.error||"Deposit failed");r=h;}l("success"),a("Deposit","success",r),F?.(r);}catch(e){l("error");let r=e instanceof Error?e.message:"Deposit failed";a("Deposit","error",void 0,r),m?.(e instanceof Error?e:new Error(r));}}},[s,u,c,n,k,C,w,x,P,a,F,m]),te=react.useCallback(async()=>{if(!(!s&&!n)){l("loading");try{let e=R();E(e);let r;if(n)await y(),r=me(e);else {let i=await fetch(`${u}/payout`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,environment:c,amount:parseFloat(k),currency:C,provider:w,phoneNumber:x,transactionId:e})}),h=await i.json();if(!i.ok)throw new Error(h.error||"Payout failed");r=h;}l("success"),a("Payout","success",r),W?.(r);}catch(e){l("error");let r=e instanceof Error?e.message:"Payout failed";a("Payout","error",void 0,r),m?.(e instanceof Error?e:new Error(r));}}},[s,u,c,n,k,C,w,x,a,W,m]),oe=react.useCallback(async()=>{if(!s&&!n||!v){a("Check Status","error",void 0,"No transaction ID");return}l("loading");try{let e;if(n)await y(),e=pe(v);else {let r=await fetch(`${u}/status`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,environment:c,transactionId:v})}),i=await r.json();if(!r.ok)throw new Error(i.error||"Status check failed");e=i;}l("success"),a("Check Status","success",e);}catch(e){l("error");let r=e instanceof Error?e.message:"Status check failed";a("Check Status","error",void 0,r),m?.(e instanceof Error?e:new Error(r));}},[s,u,c,n,v,a,m]),re=react.useCallback(async()=>{if(!(!s&&!n)){l("loading");try{let e;if(n)await y(),e=be();else {let r=await fetch(`${u}/availability`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,environment:c})}),i=await r.json();if(!r.ok)throw new Error(i.error||"Availability check failed");e=i;}l("success"),a("Provider Availability","success",e);}catch(e){l("error");let r=e instanceof Error?e.message:"Availability check failed";a("Provider Availability","error",void 0,r),m?.(e instanceof Error?e:new Error(r));}}},[s,u,c,n,a,m]),ae=react.useCallback(async()=>{if(!(!s&&!n)){l("loading");try{let e;if(n)await y(),e=ge(x);else {let r=await fetch(`${u}/predict-provider`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,environment:c,phoneNumber:x})}),i=await r.json();if(!r.ok)throw new Error(i.error||"Prediction failed");e=i;}l("success"),a("Predict Provider","success",e);}catch(e){l("error");let r=e instanceof Error?e.message:"Prediction failed";a("Predict Provider","error",void 0,r),m?.(e instanceof Error?e:new Error(r));}}},[s,u,c,n,x,a,m]),se=react.useCallback(async()=>{if(!(!s&&!n)){l("loading");try{let e;if(n)await y(),e=fe();else {let r=await fetch(`${u}/active-config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,environment:c})}),i=await r.json();if(!r.ok)throw new Error(i.error||"Failed to get config");e=i;}l("success"),a("Active Configuration","success",e);}catch(e){l("error");let r=e instanceof Error?e.message:"Failed to get config";a("Active Configuration","error",void 0,r),m?.(e instanceof Error?e:new Error(r));}}},[s,u,c,n,a,m]),ne=react.useCallback(async()=>{if(!(!s&&!n)){l("loading");try{let e;if(n)await y(),e=ve();else {let r=await fetch(`${u}/public-keys`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,environment:c})}),i=await r.json();if(!r.ok)throw new Error(i.error||"Failed to get public keys");e=i;}l("success"),a("Public Keys","success",e);}catch(e){l("error");let r=e instanceof Error?e.message:"Failed to get public keys";a("Public Keys","error",void 0,r),m?.(e instanceof Error?e:new Error(r));}}},[s,u,c,n,a,m]),ie=react.useCallback(async()=>{if(!(!s&&!n)){l("loading");try{let e;if(n)await y(),e=xe();else {let r=await fetch(`${u}/wallet-balances`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:s,environment:c})}),i=await r.json();if(!r.ok)throw new Error(i.error||"Failed to get balances");e=i;}l("success"),a("Wallet Balances","success",e);}catch(e){l("error");let r=e instanceof Error?e.message:"Failed to get balances";a("Wallet Balances","error",void 0,r),m?.(e instanceof Error?e:new Error(r));}}},[s,u,c,n,a,m]),le=react.useCallback(e=>{navigator.clipboard.writeText(e);},[]);return Z?jsxRuntime.jsxs("div",{className:`space-y-6 ${A}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"SDK Test Console"}),n&&jsxRuntime.jsx("span",{className:"px-2 py-0.5 text-xs font-medium bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-200",children:"DEMO"})]}),jsxRuntime.jsx("p",{className:"text-muted-foreground mt-1",children:n?"Mode d\xE9mo - Les r\xE9ponses sont simul\xE9es":`Test Pawapay SDK operations in ${c} mode`})]}),jsxRuntime.jsxs("button",{onClick:()=>O(false),className:"h-8 px-3 text-xs font-medium border border-border bg-background hover:bg-muted transition-colors flex items-center gap-2",children:[jsxRuntime.jsx(D,{}),"Reconfigure"]})]}),jsxRuntime.jsxs("div",{className:"grid lg:grid-cols-3 gap-6",children:[jsxRuntime.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-1 bg-muted p-1",children:[jsxRuntime.jsxs("button",{onClick:()=>M("deposit"),className:`flex-1 min-w-[80px] h-8 px-3 text-xs font-medium transition-colors flex items-center justify-center gap-1.5 ${f==="deposit"?"bg-background text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[jsxRuntime.jsx(H,{}),"Deposit"]}),jsxRuntime.jsxs("button",{onClick:()=>M("payout"),className:`flex-1 min-w-[80px] h-8 px-3 text-xs font-medium transition-colors flex items-center justify-center gap-1.5 ${f==="payout"?"bg-background text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[jsxRuntime.jsx(he,{}),"Payout"]}),jsxRuntime.jsxs("button",{onClick:()=>M("status"),className:`flex-1 min-w-[80px] h-8 px-3 text-xs font-medium transition-colors flex items-center justify-center gap-1.5 ${f==="status"?"bg-background text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[jsxRuntime.jsx(J,{}),"Status"]}),jsxRuntime.jsxs("button",{onClick:()=>M("toolkit"),className:`flex-1 min-w-[80px] h-8 px-3 text-xs font-medium transition-colors flex items-center justify-center gap-1.5 ${f==="toolkit"?"bg-background text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[jsxRuntime.jsx(Me,{}),"Toolkit"]}),jsxRuntime.jsxs("button",{onClick:()=>M("finances"),className:`flex-1 min-w-[80px] h-8 px-3 text-xs font-medium transition-colors flex items-center justify-center gap-1.5 ${f==="finances"?"bg-background text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[jsxRuntime.jsx(Te,{}),"Finances"]})]}),f==="deposit"&&jsxRuntime.jsxs("div",{className:"border border-border bg-background p-6 space-y-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Initiate Deposit"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Collect payment from a Mobile Money user"})]}),jsxRuntime.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Phone Number"}),jsxRuntime.jsx("input",{placeholder:"237670000000",value:x,onChange:e=>S(e.target.value),className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Amount"}),jsxRuntime.jsx("input",{type:"number",placeholder:"5000",value:k,onChange:e=>K(e.target.value),className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Currency"}),jsxRuntime.jsx("select",{value:C,onChange:e=>z(e.target.value),className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring",children:X.map(e=>jsxRuntime.jsx("option",{value:e.value,children:e.label},e.value))})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Provider"}),jsxRuntime.jsx("select",{value:w,onChange:e=>$(e.target.value),className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring",children:B.map(e=>jsxRuntime.jsxs("option",{value:e.value,children:[e.label," (",e.country,")"]},e.value))})]}),jsxRuntime.jsxs("div",{className:"space-y-2 sm:col-span-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Customer Message (4-22 chars)"}),jsxRuntime.jsx("input",{placeholder:"Payment description",value:P,onChange:e=>Q(e.target.value),maxLength:22,className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring"})]})]}),jsxRuntime.jsxs("button",{onClick:ee,disabled:p==="loading",className:"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex items-center justify-center gap-2",children:[p==="loading"?jsxRuntime.jsx(T,{}):jsxRuntime.jsx(j,{}),"Execute Deposit"]})]}),f==="payout"&&jsxRuntime.jsxs("div",{className:"border border-border bg-background p-6 space-y-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Initiate Payout"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Send money to a Mobile Money account"})]}),jsxRuntime.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Recipient Phone"}),jsxRuntime.jsx("input",{placeholder:"237670000000",value:x,onChange:e=>S(e.target.value),className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Amount"}),jsxRuntime.jsx("input",{type:"number",placeholder:"5000",value:k,onChange:e=>K(e.target.value),className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Currency"}),jsxRuntime.jsx("select",{value:C,onChange:e=>z(e.target.value),className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring",children:X.map(e=>jsxRuntime.jsx("option",{value:e.value,children:e.label},e.value))})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Provider"}),jsxRuntime.jsx("select",{value:w,onChange:e=>$(e.target.value),className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring",children:B.map(e=>jsxRuntime.jsxs("option",{value:e.value,children:[e.label," (",e.country,")"]},e.value))})]})]}),jsxRuntime.jsxs("button",{onClick:te,disabled:p==="loading",className:"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex items-center justify-center gap-2",children:[p==="loading"?jsxRuntime.jsx(T,{}):jsxRuntime.jsx(j,{}),"Execute Payout"]})]}),f==="status"&&jsxRuntime.jsxs("div",{className:"border border-border bg-background p-6 space-y-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Check Transaction Status"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Query the status of a transaction"})]}),jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Transaction ID"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("input",{placeholder:"Enter transaction ID (UUID)",value:v,onChange:e=>E(e.target.value),className:"flex-1 h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring font-mono"}),v&&jsxRuntime.jsx("button",{onClick:()=>le(v),className:"w-8 h-8 border border-border bg-background hover:bg-muted transition-colors flex items-center justify-center",title:"Copy to clipboard",children:jsxRuntime.jsx(Ne,{})})]})]}),jsxRuntime.jsxs("button",{onClick:oe,disabled:p==="loading"||!v,className:"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex items-center justify-center gap-2",children:[p==="loading"?jsxRuntime.jsx(T,{}):jsxRuntime.jsx(J,{}),"Check Status"]})]})]}),f==="toolkit"&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs("div",{className:"border border-border bg-background p-6 space-y-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Predict Provider"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Predict the provider from a phone number"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Phone Number"}),jsxRuntime.jsx("input",{placeholder:"+237 670 000 000",value:x,onChange:e=>S(e.target.value),className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring"})]}),jsxRuntime.jsxs("button",{onClick:ae,disabled:p==="loading",className:"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex items-center justify-center gap-2",children:[p==="loading"?jsxRuntime.jsx(T,{}):jsxRuntime.jsx(Ae,{}),"Predict Provider"]})]}),jsxRuntime.jsxs("div",{className:"grid sm:grid-cols-3 gap-3",children:[jsxRuntime.jsxs("button",{onClick:re,disabled:p==="loading",className:"h-10 px-3 text-xs font-medium border border-border bg-background hover:bg-muted disabled:opacity-50 transition-colors flex items-center justify-center gap-2",children:[jsxRuntime.jsx(Oe,{}),"Provider Availability"]}),jsxRuntime.jsxs("button",{onClick:se,disabled:p==="loading",className:"h-10 px-3 text-xs font-medium border border-border bg-background hover:bg-muted disabled:opacity-50 transition-colors flex items-center justify-center gap-2",children:[jsxRuntime.jsx(D,{}),"Active Config"]}),jsxRuntime.jsxs("button",{onClick:ne,disabled:p==="loading",className:"h-10 px-3 text-xs font-medium border border-border bg-background hover:bg-muted disabled:opacity-50 transition-colors flex items-center justify-center gap-2",children:[jsxRuntime.jsx(Se,{}),"Public Keys"]})]})]}),f==="finances"&&jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs("div",{className:"border border-border bg-background p-6 space-y-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Wallet Balances"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"View balances for all your wallets"})]}),jsxRuntime.jsxs("button",{onClick:ie,disabled:p==="loading",className:"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex items-center justify-center gap-2",children:[p==="loading"?jsxRuntime.jsx(T,{}):jsxRuntime.jsx(H,{}),"Get Wallet Balances"]})]}),jsxRuntime.jsxs("div",{className:"border border-border bg-background p-6 space-y-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Statements"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Generate financial statements for your wallets"})]}),jsxRuntime.jsxs("div",{className:"p-4 bg-muted/50 text-xs text-muted-foreground",children:["Statement generation requires callback URL configuration. Use the SDK directly:",jsxRuntime.jsx("pre",{className:"mt-2 p-2 bg-background overflow-x-auto",children:`await sdk.finances.generateStatement({
|
|
2
|
+
wallet: { country: 'CMR', currency: 'XAF' },
|
|
3
|
+
callbackUrl: 'https://your-site.com/callback',
|
|
4
|
+
startDate: '2025-01-01T00:00:00Z',
|
|
5
|
+
endDate: '2025-01-31T23:59:59Z',
|
|
6
|
+
});`})]})]})]})]}),jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Results"}),I.length>0&&jsxRuntime.jsx("button",{onClick:()=>U([]),className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),jsxRuntime.jsx("div",{className:"border border-border bg-background divide-y divide-border max-h-[600px] overflow-y-auto",children:I.length===0?jsxRuntime.jsx("div",{className:"p-6 text-center text-muted-foreground text-xs",children:"No results yet. Execute an operation to see results here."}):I.map(e=>jsxRuntime.jsxs("div",{className:"p-4 space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[e.status==="success"?jsxRuntime.jsx(ke,{className:"text-green-600"}):jsxRuntime.jsx(Ce,{className:"text-red-600"}),jsxRuntime.jsx("span",{className:"font-medium text-sm",children:e.operation})]}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:e.timestamp})]}),e.error?jsxRuntime.jsx("p",{className:"text-xs text-red-600",children:e.error}):jsxRuntime.jsx("pre",{className:"text-xs bg-muted p-2 overflow-x-auto max-h-48",children:JSON.stringify(e.response,null,2)})]},e.id))})]})]})]}):jsxRuntime.jsxs("div",{className:`space-y-8 ${A}`,children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"SDK Test Console"}),jsxRuntime.jsx("p",{className:"text-muted-foreground mt-1",children:"Configure your Pawapay SDK credentials to start testing"})]}),jsxRuntime.jsxs("div",{className:"border border-border bg-background p-6 max-w-md space-y-6",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 bg-muted flex items-center justify-center",children:jsxRuntime.jsx(D,{})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:"font-semibold",children:"SDK Configuration"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your API credentials"})]})]}),jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"API Key"}),jsxRuntime.jsx("input",{type:"password",placeholder:"pk_sandbox_...",value:s,onChange:e=>V(e.target.value),className:"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-xs font-medium",children:"Environment"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("button",{onClick:()=>_("sandbox"),className:`h-8 px-3 text-xs font-medium border transition-colors ${c==="sandbox"?"bg-primary text-primary-foreground border-primary":"bg-background border-border hover:bg-muted"}`,children:"Sandbox"}),jsxRuntime.jsx("button",{onClick:()=>_("production"),className:`h-8 px-3 text-xs font-medium border transition-colors ${c==="production"?"bg-primary text-primary-foreground border-primary":"bg-background border-border hover:bg-muted"}`,children:"Production"})]})]}),jsxRuntime.jsxs("button",{onClick:Y,className:"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 transition-colors flex items-center justify-center gap-2",children:[jsxRuntime.jsx(j,{}),"Initialize SDK"]}),jsxRuntime.jsxs("div",{className:"relative flex items-center py-2",children:[jsxRuntime.jsx("div",{className:"flex-grow border-t border-border"}),jsxRuntime.jsx("span",{className:"flex-shrink mx-3 text-xs text-muted-foreground",children:"ou"}),jsxRuntime.jsx("div",{className:"flex-grow border-t border-border"})]}),jsxRuntime.jsxs("button",{onClick:q,className:"w-full h-8 px-3 text-xs font-medium border border-border bg-background hover:bg-muted transition-colors flex items-center justify-center gap-2",children:[jsxRuntime.jsx(we,{}),"Mode D\xE9mo (sans API key)"]})]})]})]})}var D=()=>jsxRuntime.jsxs("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),j=()=>jsxRuntime.jsxs("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]}),H=()=>jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})}),he=()=>jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})}),J=()=>jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),T=()=>jsxRuntime.jsx("svg",{className:"w-4 h-4 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})}),Ne=()=>jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})}),ke=({className:d=""})=>jsxRuntime.jsx("svg",{className:`w-4 h-4 ${d}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),Ce=({className:d=""})=>jsxRuntime.jsx("svg",{className:`w-4 h-4 ${d}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}),we=()=>jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z"})}),Me=()=>jsxRuntime.jsxs("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),Te=()=>jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),Ae=()=>jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),Oe=()=>jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0"})}),Se=()=>jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),Ee=ye;exports.PawapayTestDashboard=ye;exports.default=Ee;//# sourceMappingURL=react.js.map
|
|
7
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react.tsx"],"names":["createMockDepositResponse","txId","createMockPayoutResponse","createMockStatusResponse","createMockAvailabilityResponse","createMockPredictResponse","phone","createMockActiveConfigResponse","createMockWalletBalancesResponse","createMockPublicKeysResponse","simulateDelay","ms","resolve","generateUUID","c","r","PROVIDER_OPTIONS","CURRENCY_OPTIONS","PawapayTestDashboard","initialApiKey","initialEnvironment","className","initialDemoMode","apiBasePath","onDepositComplete","onPayoutComplete","onError","apiKey","setApiKey","useState","environment","setEnvironment","isConfigured","setIsConfigured","isDemoMode","setIsDemoMode","activeTab","setActiveTab","phoneNumber","setPhoneNumber","amount","setAmount","currency","setCurrency","provider","setProvider","description","setDescription","transactionId","setTransactionId","results","setResults","currentStatus","setCurrentStatus","addResult","useCallback","operation","status","response","error","result","prev","handleConfigure","handleDemoMode","handleDeposit","res","data","err","message","handlePayout","handleCheckStatus","handleGetAvailability","handlePredictProvider","handleGetActiveConfig","handleGetPublicKeys","handleGetWalletBalances","copyToClipboard","text","jsxs","jsx","SettingsIcon","WalletIcon","PhoneIcon","RefreshIcon","ToolkitIcon","ChartIcon","LoaderIcon","PlayIcon","CopyIcon","SearchIcon","SignalIcon","KeyIcon","CheckIcon","XIcon","BeakerIcon","react_default"],"mappings":"yIA+BA,IAAMA,EAAAA,CAA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,WAAA,CACjE,SAAAA,cAAAA,CAAC,MAAA,CAAA,CAAK,cAAc,OAAA,CAAQ,cAAA,CAAe,QAAQ,WAAA,CAAa,CAAA,CAAG,EAAE,sMAAA,CAAuM,CAAA,CAC9Q,EAGIU,EAAAA,CAAa,IACjBV,eAAC,KAAA,CAAA,CAAI,SAAA,CAAU,UAAU,IAAA,CAAK,MAAA,CAAO,OAAO,cAAA,CAAe,OAAA,CAAQ,YACjE,QAAA,CAAAA,cAAAA,CAAC,QAAK,aAAA,CAAc,OAAA,CAAQ,eAAe,OAAA,CAAQ,WAAA,CAAa,EAAG,CAAA,CAAE,6CAAA,CAA8C,EACrH,CAAA,CAGIW,EAAAA,CAAa,IACjBX,cAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,SAAA,CAAU,IAAA,CAAK,OAAO,MAAA,CAAO,cAAA,CAAe,QAAQ,WAAA,CACjE,QAAA,CAAAA,eAAC,MAAA,CAAA,CAAK,aAAA,CAAc,QAAQ,cAAA,CAAe,OAAA,CAAQ,YAAa,CAAA,CAAG,CAAA,CAAE,0IAA0I,CAAA,CACjN,CAAA,CAGIY,GAAU,IACdZ,cAAAA,CAAC,OAAI,SAAA,CAAU,SAAA,CAAU,KAAK,MAAA,CAAO,MAAA,CAAO,eAAe,OAAA,CAAQ,WAAA,CACjE,SAAAA,cAAAA,CAAC,MAAA,CAAA,CAAK,cAAc,OAAA,CAAQ,cAAA,CAAe,QAAQ,WAAA,CAAa,CAAA,CAAG,EAAE,4HAAA,CAA6H,CAAA,CACpM,EAGKgB,EAAAA,CAAQ7E","file":"react.js","sourcesContent":["'use client';\n\nimport { useState, useCallback } from 'react';\nimport type { Correspondent } from './constants/correspondents';\nimport type { DepositResponse, PayoutResponse } from './types/transactions';\n\ntype OperationStatus = 'idle' | 'loading' | 'success' | 'error';\ntype TabType = 'deposit' | 'payout' | 'status' | 'toolkit' | 'finances';\n\ninterface TestResult {\n id: string;\n operation: string;\n status: OperationStatus;\n response?: unknown;\n error?: string;\n timestamp: string;\n}\n\nexport interface PawapayTestDashboardProps {\n apiKey?: string;\n environment?: 'sandbox' | 'production';\n className?: string;\n demoMode?: boolean;\n /** Base path for API routes (e.g., '/api/pawapay'). When set, requests go through your server instead of directly to Pawapay. */\n apiBasePath?: string;\n onDepositComplete?: (response: DepositResponse) => void;\n onPayoutComplete?: (response: PayoutResponse) => void;\n onError?: (error: Error) => void;\n}\n\n// Mock response generators for demo mode (V2 API format)\nconst createMockDepositResponse = (txId: string): DepositResponse => ({\n depositId: txId,\n status: 'ACCEPTED',\n created: new Date().toISOString(),\n nextStep: 'FINAL_STATUS',\n});\n\nconst createMockPayoutResponse = (txId: string): PayoutResponse => ({\n payoutId: txId,\n status: 'ACCEPTED',\n created: new Date().toISOString(),\n});\n\nconst createMockStatusResponse = (txId: string) => ({\n depositId: txId,\n status: ['COMPLETED', 'ACCEPTED', 'PROCESSING', 'ENQUEUED'][Math.floor(Math.random() * 4)],\n created: new Date(Date.now() - 60000).toISOString(),\n amount: '5000',\n currency: 'XAF',\n country: 'CMR',\n payer: {\n type: 'MMO',\n accountDetails: {\n phoneNumber: '237670000000',\n provider: 'MTN_MOMO_CMR',\n },\n },\n});\n\nconst createMockAvailabilityResponse = () => [\n {\n country: 'CMR',\n providers: [\n {\n provider: 'MTN_MOMO_CMR',\n operationTypes: [\n { operationType: 'DEPOSIT', status: 'OPERATIONAL' },\n { operationType: 'PAYOUT', status: 'OPERATIONAL' },\n ],\n },\n {\n provider: 'ORANGE_CMR',\n operationTypes: [\n { operationType: 'DEPOSIT', status: 'OPERATIONAL' },\n { operationType: 'PAYOUT', status: 'DELAYED' },\n ],\n },\n ],\n },\n];\n\nconst createMockPredictResponse = (phone: string) => ({\n country: 'CMR',\n provider: phone.startsWith('23767') ? 'MTN_MOMO_CMR' : 'ORANGE_CMR',\n phoneNumber: phone.replace(/\\D/g, ''),\n});\n\nconst createMockActiveConfigResponse = () => ({\n companyName: 'Demo Company',\n signatureConfiguration: {\n signedRequestsOnly: false,\n signedCallbacks: true,\n },\n countries: [\n {\n country: 'CMR',\n displayName: { en: 'Cameroon', fr: 'Cameroun' },\n prefix: '237',\n flag: 'https://cdn.pawapay.io/flags/cmr.svg',\n providers: [\n {\n provider: 'MTN_MOMO_CMR',\n displayName: 'MTN Mobile Money',\n nameDisplayedToCustomer: 'MTN MoMo',\n currencies: [\n {\n currency: 'XAF',\n displayName: 'CFA Franc',\n operationTypes: {\n DEPOSIT: { minAmount: '100', maxAmount: '1000000', status: 'OPERATIONAL' },\n PAYOUT: { minAmount: '100', maxAmount: '500000', status: 'OPERATIONAL' },\n },\n },\n ],\n },\n ],\n },\n ],\n});\n\nconst createMockWalletBalancesResponse = () => ({\n balances: [\n { country: 'CMR', currency: 'XAF', balance: '1250000.00' },\n { country: 'COG', currency: 'XAF', balance: '450000.00' },\n { country: 'GAB', currency: 'XAF', balance: '780000.00' },\n ],\n});\n\nconst createMockPublicKeysResponse = () => [\n {\n id: 'key-001',\n key: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...',\n },\n];\n\nconst simulateDelay = (ms: number = 800) => new Promise(resolve => setTimeout(resolve, ms + Math.random() * 400));\n\nconst generateUUID = (): string => {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16) | 0;\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n};\n\nconst PROVIDER_OPTIONS: Array<{ value: Correspondent; label: string; country: string }> = [\n { value: 'MTN_MOMO_CMR', label: 'MTN Mobile Money', country: 'Cameroun' },\n { value: 'ORANGE_CMR', label: 'Orange Money', country: 'Cameroun' },\n { value: 'MTN_MOMO_COG', label: 'MTN Mobile Money', country: 'Congo' },\n { value: 'AIRTEL_COG', label: 'Airtel Money', country: 'Congo' },\n { value: 'MTN_MOMO_GAB', label: 'MTN Mobile Money', country: 'Gabon' },\n { value: 'AIRTEL_GAB', label: 'Airtel Money', country: 'Gabon' },\n];\n\nconst CURRENCY_OPTIONS = [\n { value: 'XAF', label: 'XAF (CFA Franc BEAC)' },\n { value: 'XOF', label: 'XOF (CFA Franc BCEAO)' },\n { value: 'GHS', label: 'GHS (Ghana Cedi)' },\n { value: 'KES', label: 'KES (Kenyan Shilling)' },\n { value: 'RWF', label: 'RWF (Rwandan Franc)' },\n { value: 'TZS', label: 'TZS (Tanzanian Shilling)' },\n { value: 'UGX', label: 'UGX (Ugandan Shilling)' },\n { value: 'ZMW', label: 'ZMW (Zambian Kwacha)' },\n];\n\nexport function PawapayTestDashboard({\n apiKey: initialApiKey = '',\n environment: initialEnvironment = 'sandbox',\n className = '',\n demoMode: initialDemoMode = false,\n apiBasePath = '/api/pawapay',\n onDepositComplete,\n onPayoutComplete,\n onError,\n}: PawapayTestDashboardProps) {\n const [apiKey, setApiKey] = useState(initialApiKey);\n const [environment, setEnvironment] = useState<'sandbox' | 'production'>(initialEnvironment);\n const [isConfigured, setIsConfigured] = useState(!!initialApiKey || initialDemoMode);\n const [isDemoMode, setIsDemoMode] = useState(initialDemoMode);\n\n const [activeTab, setActiveTab] = useState<TabType>('deposit');\n const [phoneNumber, setPhoneNumber] = useState('237670000000');\n const [amount, setAmount] = useState('5000');\n const [currency, setCurrency] = useState('XAF');\n const [provider, setProvider] = useState<Correspondent>('MTN_MOMO_CMR');\n const [description, setDescription] = useState('Test Payment');\n const [transactionId, setTransactionId] = useState('');\n\n const [results, setResults] = useState<TestResult[]>([]);\n const [currentStatus, setCurrentStatus] = useState<OperationStatus>('idle');\n\n const addResult = useCallback((operation: string, status: OperationStatus, response?: unknown, error?: string) => {\n const result: TestResult = {\n id: generateUUID(),\n operation,\n status,\n response,\n error,\n timestamp: new Date().toLocaleTimeString(),\n };\n setResults((prev) => [result, ...prev].slice(0, 20));\n }, []);\n\n const handleConfigure = useCallback(() => {\n if (!apiKey.trim()) {\n addResult('Configuration', 'error', undefined, 'API Key is required');\n return;\n }\n setIsConfigured(true);\n setIsDemoMode(false);\n addResult('Configuration', 'success', { environment, configured: true, apiBasePath });\n }, [apiKey, environment, apiBasePath, addResult]);\n\n const handleDemoMode = useCallback(() => {\n setIsDemoMode(true);\n setIsConfigured(true);\n addResult('Configuration', 'success', { mode: 'demo', message: 'Demo mode activated - responses are simulated' });\n }, [addResult]);\n\n const handleDeposit = useCallback(async () => {\n if (!apiKey && !isDemoMode) return;\n setCurrentStatus('loading');\n\n try {\n const txId = generateUUID();\n setTransactionId(txId);\n\n let response: DepositResponse;\n\n if (isDemoMode) {\n await simulateDelay();\n response = createMockDepositResponse(txId);\n } else {\n const res = await fetch(`${apiBasePath}/deposit`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n apiKey,\n environment,\n amount: parseFloat(amount),\n currency,\n provider,\n phoneNumber,\n customerMessage: description.slice(0, 22),\n transactionId: txId,\n }),\n });\n\n const data = await res.json();\n if (!res.ok) throw new Error(data.error || 'Deposit failed');\n response = data;\n }\n\n setCurrentStatus('success');\n addResult('Deposit', 'success', response);\n onDepositComplete?.(response);\n } catch (err) {\n setCurrentStatus('error');\n const message = err instanceof Error ? err.message : 'Deposit failed';\n addResult('Deposit', 'error', undefined, message);\n onError?.(err instanceof Error ? err : new Error(message));\n }\n }, [apiKey, apiBasePath, environment, isDemoMode, amount, currency, provider, phoneNumber, description, addResult, onDepositComplete, onError]);\n\n const handlePayout = useCallback(async () => {\n if (!apiKey && !isDemoMode) return;\n setCurrentStatus('loading');\n\n try {\n const txId = generateUUID();\n setTransactionId(txId);\n\n let response: PayoutResponse;\n\n if (isDemoMode) {\n await simulateDelay();\n response = createMockPayoutResponse(txId);\n } else {\n const res = await fetch(`${apiBasePath}/payout`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n apiKey,\n environment,\n amount: parseFloat(amount),\n currency,\n provider,\n phoneNumber,\n transactionId: txId,\n }),\n });\n\n const data = await res.json();\n if (!res.ok) throw new Error(data.error || 'Payout failed');\n response = data;\n }\n\n setCurrentStatus('success');\n addResult('Payout', 'success', response);\n onPayoutComplete?.(response);\n } catch (err) {\n setCurrentStatus('error');\n const message = err instanceof Error ? err.message : 'Payout failed';\n addResult('Payout', 'error', undefined, message);\n onError?.(err instanceof Error ? err : new Error(message));\n }\n }, [apiKey, apiBasePath, environment, isDemoMode, amount, currency, provider, phoneNumber, addResult, onPayoutComplete, onError]);\n\n const handleCheckStatus = useCallback(async () => {\n if ((!apiKey && !isDemoMode) || !transactionId) {\n addResult('Check Status', 'error', undefined, 'No transaction ID');\n return;\n }\n setCurrentStatus('loading');\n\n try {\n let response;\n\n if (isDemoMode) {\n await simulateDelay();\n response = createMockStatusResponse(transactionId);\n } else {\n const res = await fetch(`${apiBasePath}/status`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ apiKey, environment, transactionId }),\n });\n\n const data = await res.json();\n if (!res.ok) throw new Error(data.error || 'Status check failed');\n response = data;\n }\n\n setCurrentStatus('success');\n addResult('Check Status', 'success', response);\n } catch (err) {\n setCurrentStatus('error');\n const message = err instanceof Error ? err.message : 'Status check failed';\n addResult('Check Status', 'error', undefined, message);\n onError?.(err instanceof Error ? err : new Error(message));\n }\n }, [apiKey, apiBasePath, environment, isDemoMode, transactionId, addResult, onError]);\n\n const handleGetAvailability = useCallback(async () => {\n if (!apiKey && !isDemoMode) return;\n setCurrentStatus('loading');\n\n try {\n let response;\n\n if (isDemoMode) {\n await simulateDelay();\n response = createMockAvailabilityResponse();\n } else {\n const res = await fetch(`${apiBasePath}/availability`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ apiKey, environment }),\n });\n\n const data = await res.json();\n if (!res.ok) throw new Error(data.error || 'Availability check failed');\n response = data;\n }\n\n setCurrentStatus('success');\n addResult('Provider Availability', 'success', response);\n } catch (err) {\n setCurrentStatus('error');\n const message = err instanceof Error ? err.message : 'Availability check failed';\n addResult('Provider Availability', 'error', undefined, message);\n onError?.(err instanceof Error ? err : new Error(message));\n }\n }, [apiKey, apiBasePath, environment, isDemoMode, addResult, onError]);\n\n const handlePredictProvider = useCallback(async () => {\n if (!apiKey && !isDemoMode) return;\n setCurrentStatus('loading');\n\n try {\n let response;\n\n if (isDemoMode) {\n await simulateDelay();\n response = createMockPredictResponse(phoneNumber);\n } else {\n const res = await fetch(`${apiBasePath}/predict-provider`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ apiKey, environment, phoneNumber }),\n });\n\n const data = await res.json();\n if (!res.ok) throw new Error(data.error || 'Prediction failed');\n response = data;\n }\n\n setCurrentStatus('success');\n addResult('Predict Provider', 'success', response);\n } catch (err) {\n setCurrentStatus('error');\n const message = err instanceof Error ? err.message : 'Prediction failed';\n addResult('Predict Provider', 'error', undefined, message);\n onError?.(err instanceof Error ? err : new Error(message));\n }\n }, [apiKey, apiBasePath, environment, isDemoMode, phoneNumber, addResult, onError]);\n\n const handleGetActiveConfig = useCallback(async () => {\n if (!apiKey && !isDemoMode) return;\n setCurrentStatus('loading');\n\n try {\n let response;\n\n if (isDemoMode) {\n await simulateDelay();\n response = createMockActiveConfigResponse();\n } else {\n const res = await fetch(`${apiBasePath}/active-config`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ apiKey, environment }),\n });\n\n const data = await res.json();\n if (!res.ok) throw new Error(data.error || 'Failed to get config');\n response = data;\n }\n\n setCurrentStatus('success');\n addResult('Active Configuration', 'success', response);\n } catch (err) {\n setCurrentStatus('error');\n const message = err instanceof Error ? err.message : 'Failed to get config';\n addResult('Active Configuration', 'error', undefined, message);\n onError?.(err instanceof Error ? err : new Error(message));\n }\n }, [apiKey, apiBasePath, environment, isDemoMode, addResult, onError]);\n\n const handleGetPublicKeys = useCallback(async () => {\n if (!apiKey && !isDemoMode) return;\n setCurrentStatus('loading');\n\n try {\n let response;\n\n if (isDemoMode) {\n await simulateDelay();\n response = createMockPublicKeysResponse();\n } else {\n const res = await fetch(`${apiBasePath}/public-keys`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ apiKey, environment }),\n });\n\n const data = await res.json();\n if (!res.ok) throw new Error(data.error || 'Failed to get public keys');\n response = data;\n }\n\n setCurrentStatus('success');\n addResult('Public Keys', 'success', response);\n } catch (err) {\n setCurrentStatus('error');\n const message = err instanceof Error ? err.message : 'Failed to get public keys';\n addResult('Public Keys', 'error', undefined, message);\n onError?.(err instanceof Error ? err : new Error(message));\n }\n }, [apiKey, apiBasePath, environment, isDemoMode, addResult, onError]);\n\n const handleGetWalletBalances = useCallback(async () => {\n if (!apiKey && !isDemoMode) return;\n setCurrentStatus('loading');\n\n try {\n let response;\n\n if (isDemoMode) {\n await simulateDelay();\n response = createMockWalletBalancesResponse();\n } else {\n const res = await fetch(`${apiBasePath}/wallet-balances`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ apiKey, environment }),\n });\n\n const data = await res.json();\n if (!res.ok) throw new Error(data.error || 'Failed to get balances');\n response = data;\n }\n\n setCurrentStatus('success');\n addResult('Wallet Balances', 'success', response);\n } catch (err) {\n setCurrentStatus('error');\n const message = err instanceof Error ? err.message : 'Failed to get balances';\n addResult('Wallet Balances', 'error', undefined, message);\n onError?.(err instanceof Error ? err : new Error(message));\n }\n }, [apiKey, apiBasePath, environment, isDemoMode, addResult, onError]);\n\n const copyToClipboard = useCallback((text: string) => {\n navigator.clipboard.writeText(text);\n }, []);\n\n if (!isConfigured) {\n return (\n <div className={`space-y-8 ${className}`}>\n <div>\n <h1 className=\"text-2xl font-bold tracking-tight\">SDK Test Console</h1>\n <p className=\"text-muted-foreground mt-1\">\n Configure your Pawapay SDK credentials to start testing\n </p>\n </div>\n\n <div className=\"border border-border bg-background p-6 max-w-md space-y-6\">\n <div className=\"flex items-center gap-3\">\n <div className=\"w-10 h-10 bg-muted flex items-center justify-center\">\n <SettingsIcon />\n </div>\n <div>\n <h2 className=\"font-semibold\">SDK Configuration</h2>\n <p className=\"text-xs text-muted-foreground\">Enter your API credentials</p>\n </div>\n </div>\n\n <div className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">API Key</label>\n <input\n type=\"password\"\n placeholder=\"pk_sandbox_...\"\n value={apiKey}\n onChange={(e) => setApiKey(e.target.value)}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n />\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Environment</label>\n <div className=\"flex gap-2\">\n <button\n onClick={() => setEnvironment('sandbox')}\n className={`h-8 px-3 text-xs font-medium border transition-colors ${\n environment === 'sandbox'\n ? 'bg-primary text-primary-foreground border-primary'\n : 'bg-background border-border hover:bg-muted'\n }`}\n >\n Sandbox\n </button>\n <button\n onClick={() => setEnvironment('production')}\n className={`h-8 px-3 text-xs font-medium border transition-colors ${\n environment === 'production'\n ? 'bg-primary text-primary-foreground border-primary'\n : 'bg-background border-border hover:bg-muted'\n }`}\n >\n Production\n </button>\n </div>\n </div>\n\n <button\n onClick={handleConfigure}\n className=\"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 transition-colors flex items-center justify-center gap-2\"\n >\n <PlayIcon />\n Initialize SDK\n </button>\n\n <div className=\"relative flex items-center py-2\">\n <div className=\"flex-grow border-t border-border\"></div>\n <span className=\"flex-shrink mx-3 text-xs text-muted-foreground\">ou</span>\n <div className=\"flex-grow border-t border-border\"></div>\n </div>\n\n <button\n onClick={handleDemoMode}\n className=\"w-full h-8 px-3 text-xs font-medium border border-border bg-background hover:bg-muted transition-colors flex items-center justify-center gap-2\"\n >\n <BeakerIcon />\n Mode Démo (sans API key)\n </button>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className={`space-y-6 ${className}`}>\n <div className=\"flex items-center justify-between flex-wrap gap-4\">\n <div>\n <div className=\"flex items-center gap-2\">\n <h1 className=\"text-2xl font-bold tracking-tight\">SDK Test Console</h1>\n {isDemoMode && (\n <span className=\"px-2 py-0.5 text-xs font-medium bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-200\">\n DEMO\n </span>\n )}\n </div>\n <p className=\"text-muted-foreground mt-1\">\n {isDemoMode\n ? 'Mode démo - Les réponses sont simulées'\n : `Test Pawapay SDK operations in ${environment} mode`\n }\n </p>\n </div>\n <button\n onClick={() => setIsConfigured(false)}\n className=\"h-8 px-3 text-xs font-medium border border-border bg-background hover:bg-muted transition-colors flex items-center gap-2\"\n >\n <SettingsIcon />\n Reconfigure\n </button>\n </div>\n\n <div className=\"grid lg:grid-cols-3 gap-6\">\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Tabs */}\n <div className=\"flex flex-wrap gap-1 bg-muted p-1\">\n <button\n onClick={() => setActiveTab('deposit')}\n className={`flex-1 min-w-[80px] h-8 px-3 text-xs font-medium transition-colors flex items-center justify-center gap-1.5 ${\n activeTab === 'deposit' ? 'bg-background text-foreground' : 'text-muted-foreground hover:text-foreground'\n }`}\n >\n <WalletIcon />\n Deposit\n </button>\n <button\n onClick={() => setActiveTab('payout')}\n className={`flex-1 min-w-[80px] h-8 px-3 text-xs font-medium transition-colors flex items-center justify-center gap-1.5 ${\n activeTab === 'payout' ? 'bg-background text-foreground' : 'text-muted-foreground hover:text-foreground'\n }`}\n >\n <PhoneIcon />\n Payout\n </button>\n <button\n onClick={() => setActiveTab('status')}\n className={`flex-1 min-w-[80px] h-8 px-3 text-xs font-medium transition-colors flex items-center justify-center gap-1.5 ${\n activeTab === 'status' ? 'bg-background text-foreground' : 'text-muted-foreground hover:text-foreground'\n }`}\n >\n <RefreshIcon />\n Status\n </button>\n <button\n onClick={() => setActiveTab('toolkit')}\n className={`flex-1 min-w-[80px] h-8 px-3 text-xs font-medium transition-colors flex items-center justify-center gap-1.5 ${\n activeTab === 'toolkit' ? 'bg-background text-foreground' : 'text-muted-foreground hover:text-foreground'\n }`}\n >\n <ToolkitIcon />\n Toolkit\n </button>\n <button\n onClick={() => setActiveTab('finances')}\n className={`flex-1 min-w-[80px] h-8 px-3 text-xs font-medium transition-colors flex items-center justify-center gap-1.5 ${\n activeTab === 'finances' ? 'bg-background text-foreground' : 'text-muted-foreground hover:text-foreground'\n }`}\n >\n <ChartIcon />\n Finances\n </button>\n </div>\n\n {/* Deposit Tab */}\n {activeTab === 'deposit' && (\n <div className=\"border border-border bg-background p-6 space-y-4\">\n <div>\n <h3 className=\"font-semibold\">Initiate Deposit</h3>\n <p className=\"text-xs text-muted-foreground\">Collect payment from a Mobile Money user</p>\n </div>\n\n <div className=\"grid sm:grid-cols-2 gap-4\">\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Phone Number</label>\n <input\n placeholder=\"237670000000\"\n value={phoneNumber}\n onChange={(e) => setPhoneNumber(e.target.value)}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n />\n </div>\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Amount</label>\n <input\n type=\"number\"\n placeholder=\"5000\"\n value={amount}\n onChange={(e) => setAmount(e.target.value)}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n />\n </div>\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Currency</label>\n <select\n value={currency}\n onChange={(e) => setCurrency(e.target.value)}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n >\n {CURRENCY_OPTIONS.map((c) => (\n <option key={c.value} value={c.value}>{c.label}</option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Provider</label>\n <select\n value={provider}\n onChange={(e) => setProvider(e.target.value as Correspondent)}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n >\n {PROVIDER_OPTIONS.map((c) => (\n <option key={c.value} value={c.value}>{c.label} ({c.country})</option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2 sm:col-span-2\">\n <label className=\"text-xs font-medium\">Customer Message (4-22 chars)</label>\n <input\n placeholder=\"Payment description\"\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n maxLength={22}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n />\n </div>\n </div>\n\n <button\n onClick={handleDeposit}\n disabled={currentStatus === 'loading'}\n className=\"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex items-center justify-center gap-2\"\n >\n {currentStatus === 'loading' ? <LoaderIcon /> : <PlayIcon />}\n Execute Deposit\n </button>\n </div>\n )}\n\n {/* Payout Tab */}\n {activeTab === 'payout' && (\n <div className=\"border border-border bg-background p-6 space-y-4\">\n <div>\n <h3 className=\"font-semibold\">Initiate Payout</h3>\n <p className=\"text-xs text-muted-foreground\">Send money to a Mobile Money account</p>\n </div>\n\n <div className=\"grid sm:grid-cols-2 gap-4\">\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Recipient Phone</label>\n <input\n placeholder=\"237670000000\"\n value={phoneNumber}\n onChange={(e) => setPhoneNumber(e.target.value)}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n />\n </div>\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Amount</label>\n <input\n type=\"number\"\n placeholder=\"5000\"\n value={amount}\n onChange={(e) => setAmount(e.target.value)}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n />\n </div>\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Currency</label>\n <select\n value={currency}\n onChange={(e) => setCurrency(e.target.value)}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n >\n {CURRENCY_OPTIONS.map((c) => (\n <option key={c.value} value={c.value}>{c.label}</option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Provider</label>\n <select\n value={provider}\n onChange={(e) => setProvider(e.target.value as Correspondent)}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n >\n {PROVIDER_OPTIONS.map((c) => (\n <option key={c.value} value={c.value}>{c.label} ({c.country})</option>\n ))}\n </select>\n </div>\n </div>\n\n <button\n onClick={handlePayout}\n disabled={currentStatus === 'loading'}\n className=\"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex items-center justify-center gap-2\"\n >\n {currentStatus === 'loading' ? <LoaderIcon /> : <PlayIcon />}\n Execute Payout\n </button>\n </div>\n )}\n\n {/* Status Tab */}\n {activeTab === 'status' && (\n <div className=\"border border-border bg-background p-6 space-y-4\">\n <div>\n <h3 className=\"font-semibold\">Check Transaction Status</h3>\n <p className=\"text-xs text-muted-foreground\">Query the status of a transaction</p>\n </div>\n\n <div className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Transaction ID</label>\n <div className=\"flex gap-2\">\n <input\n placeholder=\"Enter transaction ID (UUID)\"\n value={transactionId}\n onChange={(e) => setTransactionId(e.target.value)}\n className=\"flex-1 h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring font-mono\"\n />\n {transactionId && (\n <button\n onClick={() => copyToClipboard(transactionId)}\n className=\"w-8 h-8 border border-border bg-background hover:bg-muted transition-colors flex items-center justify-center\"\n title=\"Copy to clipboard\"\n >\n <CopyIcon />\n </button>\n )}\n </div>\n </div>\n\n <button\n onClick={handleCheckStatus}\n disabled={currentStatus === 'loading' || !transactionId}\n className=\"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex items-center justify-center gap-2\"\n >\n {currentStatus === 'loading' ? <LoaderIcon /> : <RefreshIcon />}\n Check Status\n </button>\n </div>\n </div>\n )}\n\n {/* Toolkit Tab */}\n {activeTab === 'toolkit' && (\n <div className=\"space-y-4\">\n <div className=\"border border-border bg-background p-6 space-y-4\">\n <div>\n <h3 className=\"font-semibold\">Predict Provider</h3>\n <p className=\"text-xs text-muted-foreground\">Predict the provider from a phone number</p>\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"text-xs font-medium\">Phone Number</label>\n <input\n placeholder=\"+237 670 000 000\"\n value={phoneNumber}\n onChange={(e) => setPhoneNumber(e.target.value)}\n className=\"w-full h-8 px-2.5 text-xs border border-input bg-transparent rounded-none outline-none focus:border-ring\"\n />\n </div>\n\n <button\n onClick={handlePredictProvider}\n disabled={currentStatus === 'loading'}\n className=\"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex items-center justify-center gap-2\"\n >\n {currentStatus === 'loading' ? <LoaderIcon /> : <SearchIcon />}\n Predict Provider\n </button>\n </div>\n\n <div className=\"grid sm:grid-cols-3 gap-3\">\n <button\n onClick={handleGetAvailability}\n disabled={currentStatus === 'loading'}\n className=\"h-10 px-3 text-xs font-medium border border-border bg-background hover:bg-muted disabled:opacity-50 transition-colors flex items-center justify-center gap-2\"\n >\n <SignalIcon />\n Provider Availability\n </button>\n <button\n onClick={handleGetActiveConfig}\n disabled={currentStatus === 'loading'}\n className=\"h-10 px-3 text-xs font-medium border border-border bg-background hover:bg-muted disabled:opacity-50 transition-colors flex items-center justify-center gap-2\"\n >\n <SettingsIcon />\n Active Config\n </button>\n <button\n onClick={handleGetPublicKeys}\n disabled={currentStatus === 'loading'}\n className=\"h-10 px-3 text-xs font-medium border border-border bg-background hover:bg-muted disabled:opacity-50 transition-colors flex items-center justify-center gap-2\"\n >\n <KeyIcon />\n Public Keys\n </button>\n </div>\n </div>\n )}\n\n {/* Finances Tab */}\n {activeTab === 'finances' && (\n <div className=\"space-y-4\">\n <div className=\"border border-border bg-background p-6 space-y-4\">\n <div>\n <h3 className=\"font-semibold\">Wallet Balances</h3>\n <p className=\"text-xs text-muted-foreground\">View balances for all your wallets</p>\n </div>\n\n <button\n onClick={handleGetWalletBalances}\n disabled={currentStatus === 'loading'}\n className=\"w-full h-8 px-3 text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors flex items-center justify-center gap-2\"\n >\n {currentStatus === 'loading' ? <LoaderIcon /> : <WalletIcon />}\n Get Wallet Balances\n </button>\n </div>\n\n <div className=\"border border-border bg-background p-6 space-y-4\">\n <div>\n <h3 className=\"font-semibold\">Statements</h3>\n <p className=\"text-xs text-muted-foreground\">Generate financial statements for your wallets</p>\n </div>\n\n <div className=\"p-4 bg-muted/50 text-xs text-muted-foreground\">\n Statement generation requires callback URL configuration. Use the SDK directly:\n <pre className=\"mt-2 p-2 bg-background overflow-x-auto\">\n{`await sdk.finances.generateStatement({\n wallet: { country: 'CMR', currency: 'XAF' },\n callbackUrl: 'https://your-site.com/callback',\n startDate: '2025-01-01T00:00:00Z',\n endDate: '2025-01-31T23:59:59Z',\n});`}\n </pre>\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* Results Panel */}\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"font-semibold\">Results</h3>\n {results.length > 0 && (\n <button\n onClick={() => setResults([])}\n className=\"text-xs text-muted-foreground hover:text-foreground\"\n >\n Clear\n </button>\n )}\n </div>\n\n <div className=\"border border-border bg-background divide-y divide-border max-h-[600px] overflow-y-auto\">\n {results.length === 0 ? (\n <div className=\"p-6 text-center text-muted-foreground text-xs\">\n No results yet. Execute an operation to see results here.\n </div>\n ) : (\n results.map((result) => (\n <div key={result.id} className=\"p-4 space-y-2\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n {result.status === 'success' ? (\n <CheckIcon className=\"text-green-600\" />\n ) : (\n <XIcon className=\"text-red-600\" />\n )}\n <span className=\"font-medium text-sm\">{result.operation}</span>\n </div>\n <span className=\"text-xs text-muted-foreground\">{result.timestamp}</span>\n </div>\n\n {result.error ? (\n <p className=\"text-xs text-red-600\">{result.error}</p>\n ) : (\n <pre className=\"text-xs bg-muted p-2 overflow-x-auto max-h-48\">\n {JSON.stringify(result.response, null, 2)}\n </pre>\n )}\n </div>\n ))\n )}\n </div>\n </div>\n </div>\n </div>\n );\n}\n\n// Simple SVG Icons (no external dependencies)\nconst SettingsIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15 12a3 3 0 11-6 0 3 3 0 016 0z\" />\n </svg>\n);\n\nconst PlayIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M21 12a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n);\n\nconst WalletIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z\" />\n </svg>\n);\n\nconst PhoneIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z\" />\n </svg>\n);\n\nconst RefreshIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15\" />\n </svg>\n);\n\nconst LoaderIcon = () => (\n <svg className=\"w-4 h-4 animate-spin\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\" />\n </svg>\n);\n\nconst CopyIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\" />\n </svg>\n);\n\nconst CheckIcon = ({ className = '' }: { className?: string }) => (\n <svg className={`w-4 h-4 ${className}`} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n);\n\nconst XIcon = ({ className = '' }: { className?: string }) => (\n <svg className={`w-4 h-4 ${className}`} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n);\n\nconst BeakerIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z\" />\n </svg>\n);\n\nconst ToolkitIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z\" />\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15 12a3 3 0 11-6 0 3 3 0 016 0z\" />\n </svg>\n);\n\nconst ChartIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z\" />\n </svg>\n);\n\nconst SearchIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\" />\n </svg>\n);\n\nconst SignalIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0\" />\n </svg>\n);\n\nconst KeyIcon = () => (\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z\" />\n </svg>\n);\n\nexport default PawapayTestDashboard;\n"]}
|