@tender-cash/agent-sdk-react 0.0.1 → 0.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.
- package/dist/tender-cash-agent-sdk-react.cjs.js +266 -0
- package/dist/tender-cash-agent-sdk-react.cjs.js.map +1 -0
- package/dist/tender-cash-agent-sdk-react.es.js +10975 -0
- package/dist/tender-cash-agent-sdk-react.es.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/module/_actions/details.d.ts +22 -0
- package/dist/types/module/_actions/index.d.ts +29 -0
- package/dist/types/module/_components/button.d.ts +13 -0
- package/dist/types/module/_components/index.d.ts +6 -0
- package/dist/types/module/_components/layout.d.ts +4 -0
- package/dist/types/module/_components/loader.d.ts +8 -0
- package/dist/types/module/_components/select.d.ts +14 -0
- package/dist/types/module/_components/toaster.d.ts +5 -0
- package/dist/types/module/_components/transition.d.ts +5 -0
- package/dist/types/module/_context/index.d.ts +13 -0
- package/dist/types/module/index.d.ts +3 -0
- package/dist/types/module/lib/axios-instance.d.ts +5 -0
- package/dist/types/module/lib/error-handler.d.ts +3 -0
- package/dist/types/module/lib/logger.d.ts +17 -0
- package/dist/types/module/lib/queue.d.ts +14 -0
- package/dist/types/module/lib/utils/index.d.ts +18 -0
- package/dist/types/module/screens/details.d.ts +3 -0
- package/dist/types/module/screens/form.d.ts +16 -0
- package/dist/types/module/screens/index.d.ts +2 -0
- package/dist/types/module/screens/info.d.ts +5 -0
- package/dist/types/module/types.d.ts +202 -0
- package/dist/types/styles/default-theme.d.ts +3 -0
- package/dist/types/types.d.ts +2 -0
- package/package.json +2 -4
- package/readme.md +4 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IPaymentData, PAYMENT_STAGE } from '../types';
|
|
2
|
+
declare const fetchPaymentDetailAction: ({ nextScreen, setPageLoading }: {
|
|
3
|
+
nextScreen: (stage: PAYMENT_STAGE) => void;
|
|
4
|
+
setPageLoading: (c: boolean) => void;
|
|
5
|
+
}) => {
|
|
6
|
+
paymentDetails: IPaymentData | undefined;
|
|
7
|
+
isFetching: boolean;
|
|
8
|
+
initiatePayment: ({ amount, chain, coin, fiatCurrency }: {
|
|
9
|
+
amount: number;
|
|
10
|
+
chain: string;
|
|
11
|
+
coin: string;
|
|
12
|
+
fiatCurrency: string;
|
|
13
|
+
}) => Promise<void>;
|
|
14
|
+
paymentError: {
|
|
15
|
+
title: string;
|
|
16
|
+
message: string;
|
|
17
|
+
data: any;
|
|
18
|
+
} | undefined;
|
|
19
|
+
confirmPayment: () => void | Promise<void>;
|
|
20
|
+
cancelPayment: () => void | Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
export default fetchPaymentDetailAction;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IPaymentData, Option } from '../types';
|
|
2
|
+
declare const useAgentSdkAction: () => {
|
|
3
|
+
currentStage: number;
|
|
4
|
+
amount: number;
|
|
5
|
+
fiatCurrency: string;
|
|
6
|
+
networks: [] | Option[];
|
|
7
|
+
coins: [] | Option[];
|
|
8
|
+
selectedCoin: Option | null;
|
|
9
|
+
selectedNetwork: Option | null;
|
|
10
|
+
setCoin: import('react').Dispatch<import('react').SetStateAction<Option | null>>;
|
|
11
|
+
setNetwork: (network: Option) => Promise<void>;
|
|
12
|
+
submitForm: () => Promise<void | null>;
|
|
13
|
+
formDisabled: boolean;
|
|
14
|
+
formLoading: boolean;
|
|
15
|
+
paymentData: IPaymentData & {
|
|
16
|
+
cancelPayment: () => void;
|
|
17
|
+
confirmPayment: () => void;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
};
|
|
21
|
+
pageLoading: boolean;
|
|
22
|
+
coinFetching: boolean;
|
|
23
|
+
paymentError: {
|
|
24
|
+
title: string;
|
|
25
|
+
message: string;
|
|
26
|
+
data: any;
|
|
27
|
+
} | undefined;
|
|
28
|
+
};
|
|
29
|
+
export default useAgentSdkAction;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const button: (props?: ({
|
|
4
|
+
variant?: "primary" | "secondary" | "danger" | "outline" | "transparent" | null | undefined;
|
|
5
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
6
|
+
fullWidth?: boolean | null | undefined;
|
|
7
|
+
disabled?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof button> {
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FormFooterProps, FormHeaderProps } from '../types';
|
|
2
|
+
declare const FormFooter: ({ children }: FormFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const FormHeader: ({ title, description, icon }: FormHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { FormFooter, FormHeader };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Option } from '../types';
|
|
2
|
+
interface SelectProps {
|
|
3
|
+
options: Option[];
|
|
4
|
+
value: Option | null;
|
|
5
|
+
onChange: (value: Option) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
triggerClassName?: string;
|
|
11
|
+
dropdownClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const SelectDropdown: ({ options, value, onChange, placeholder, disabled, loading, className, triggerClassName, dropdownClassName, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { Axios } from 'axios';
|
|
3
|
+
import { ConfigContextType } from '../types';
|
|
4
|
+
declare const useConfig: () => ConfigContextType & {
|
|
5
|
+
client?: Axios;
|
|
6
|
+
CONFIRM_INTERVAL: number;
|
|
7
|
+
};
|
|
8
|
+
interface ConfigProviderProps {
|
|
9
|
+
config: ConfigContextType;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const ConfigProvider: React.FC<ConfigProviderProps>;
|
|
13
|
+
export { useConfig, ConfigProvider };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type LogLevel = "info" | "warn" | "error" | "debug";
|
|
2
|
+
interface LoggerOptions {
|
|
3
|
+
level: LogLevel;
|
|
4
|
+
message: string;
|
|
5
|
+
meta?: Record<string, any> | any[];
|
|
6
|
+
}
|
|
7
|
+
declare class Logger {
|
|
8
|
+
static show: boolean;
|
|
9
|
+
static log({ level, message, meta }: LoggerOptions): void;
|
|
10
|
+
private static logToConsole;
|
|
11
|
+
static info(message: string, meta?: Record<string, any>): void;
|
|
12
|
+
static warn(message: string, meta?: Record<string, any>): void;
|
|
13
|
+
static error(message: string, meta?: Record<string, any>): void;
|
|
14
|
+
static debug(message: string, meta?: Record<string, any>): void;
|
|
15
|
+
static showLogger(v: boolean): void;
|
|
16
|
+
}
|
|
17
|
+
export default Logger;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
+
declare class ApiRequestQueue {
|
|
3
|
+
private queue;
|
|
4
|
+
private processing;
|
|
5
|
+
private isCleared;
|
|
6
|
+
private axios;
|
|
7
|
+
constructor();
|
|
8
|
+
private processQueue;
|
|
9
|
+
private sendRequest;
|
|
10
|
+
addToQueue<T = any>(config: AxiosRequestConfig, customHeaders?: Record<string, string>, retryCount?: number): Promise<AxiosResponse<T>>;
|
|
11
|
+
cancelRequest(requestId: string): void;
|
|
12
|
+
clearQueue(): void;
|
|
13
|
+
}
|
|
14
|
+
export default ApiRequestQueue;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import { IGetRequestSignatureParam, IGetRequestSignature, ITheme } from '../../types';
|
|
3
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
4
|
+
declare enum TENDER_URLS {
|
|
5
|
+
test = "https://stagapi.tender.cash",
|
|
6
|
+
live = "https://secureapi.tender.cash"
|
|
7
|
+
}
|
|
8
|
+
declare const URL_PATHS: {
|
|
9
|
+
CHAINS: string;
|
|
10
|
+
COINS: string;
|
|
11
|
+
PAYMENT_INITIATE: string;
|
|
12
|
+
PAYMENT_VALIDATE: string;
|
|
13
|
+
};
|
|
14
|
+
declare const getRequestSignature: ({ accessId, accessSecret, }: IGetRequestSignatureParam) => IGetRequestSignature;
|
|
15
|
+
declare const applyTheme: (theme: ITheme) => void;
|
|
16
|
+
declare const sleep: (milliseconds: number) => void;
|
|
17
|
+
declare const sentenceCase: (str: string) => string;
|
|
18
|
+
export { cn, getRequestSignature, applyTheme, sleep, TENDER_URLS, URL_PATHS, sentenceCase, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { paymentResponseProps, paymentDetailsProps } from '../types';
|
|
2
|
+
declare const PaymentDetails: ({ address, amount, amountPaid, coin, loading, status, balance, cancelPayment, confirmPayment, }: paymentResponseProps & paymentDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default PaymentDetails;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Option } from '../types';
|
|
2
|
+
interface paymentFormProps {
|
|
3
|
+
amount: number;
|
|
4
|
+
fiatCurrency: string;
|
|
5
|
+
networks: Option[];
|
|
6
|
+
coins: Option[];
|
|
7
|
+
selectedNetwork: Option | null;
|
|
8
|
+
selectedCoin: Option | null;
|
|
9
|
+
formDisabled: boolean;
|
|
10
|
+
formLoading: boolean;
|
|
11
|
+
selectCoin: (value: Option) => void;
|
|
12
|
+
selectNetwork: (value: Option) => void;
|
|
13
|
+
submitForm: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare const PaymentForm: ({ amount, fiatCurrency, networks, selectedNetwork, selectedCoin, coins, formDisabled, formLoading, selectCoin, selectNetwork, submitForm }: paymentFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default PaymentForm;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';
|
|
3
|
+
type IAny = any;
|
|
4
|
+
interface ITheme extends Record<string, any> {
|
|
5
|
+
primary?: string;
|
|
6
|
+
secondary?: string;
|
|
7
|
+
info?: string;
|
|
8
|
+
warning?: string;
|
|
9
|
+
success?: string;
|
|
10
|
+
danger?: string;
|
|
11
|
+
}
|
|
12
|
+
interface IGetRequestSignature {
|
|
13
|
+
signature: string;
|
|
14
|
+
timeStamp: string;
|
|
15
|
+
requestId: string;
|
|
16
|
+
}
|
|
17
|
+
interface IGetRequestSignatureParam {
|
|
18
|
+
accessId: string;
|
|
19
|
+
accessSecret: string;
|
|
20
|
+
}
|
|
21
|
+
declare enum PAYMENT_STATUS {
|
|
22
|
+
PENDING = "pending",
|
|
23
|
+
PARTIAL = "partial-payment",
|
|
24
|
+
COMPLETE = "completed",
|
|
25
|
+
OVER = "overpayment"
|
|
26
|
+
}
|
|
27
|
+
interface Option {
|
|
28
|
+
label: string;
|
|
29
|
+
value: string;
|
|
30
|
+
icon?: string;
|
|
31
|
+
}
|
|
32
|
+
declare enum paymentStatusMap {
|
|
33
|
+
"overpayment" = "over",
|
|
34
|
+
"partial-payment" = "partial",
|
|
35
|
+
"completed" = "complete",
|
|
36
|
+
"pending" = "pending",
|
|
37
|
+
"error" = "error",
|
|
38
|
+
"cancelled" = "cancelled"
|
|
39
|
+
}
|
|
40
|
+
type PaymentTypeProps = "partial" | "complete" | "over" | "pending" | "error";
|
|
41
|
+
type PaymentStatusProps = "partial-payment" | "completed" | "overpayment" | "pending" | "error" | "cancelled";
|
|
42
|
+
type TenderEnvironments = "test" | "live";
|
|
43
|
+
interface FormHeaderProps {
|
|
44
|
+
title: string;
|
|
45
|
+
description: string;
|
|
46
|
+
icon?: string;
|
|
47
|
+
}
|
|
48
|
+
interface FormFooterProps {
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
}
|
|
51
|
+
interface IPaymentData {
|
|
52
|
+
id?: string;
|
|
53
|
+
amount?: number;
|
|
54
|
+
coinAmount?: number;
|
|
55
|
+
coin?: string;
|
|
56
|
+
chain?: string;
|
|
57
|
+
address?: string;
|
|
58
|
+
amountPaid?: string;
|
|
59
|
+
balance?: string;
|
|
60
|
+
status?: PaymentStatusProps;
|
|
61
|
+
}
|
|
62
|
+
interface paymentResponseProps {
|
|
63
|
+
address: string;
|
|
64
|
+
amount: number;
|
|
65
|
+
amountPaid: number;
|
|
66
|
+
coin: string;
|
|
67
|
+
loading: boolean;
|
|
68
|
+
status?: PaymentStatusProps;
|
|
69
|
+
balance?: string;
|
|
70
|
+
}
|
|
71
|
+
declare enum PAYMENT_RESPONSES {
|
|
72
|
+
partial = "Please complete the remaining payment to finalize this transaction. If the full amount is not received within 24 hours, the transaction will be canceled. For a refund, please contact the Merchant.",
|
|
73
|
+
over = "You have overpaid. If the excess amount is significant, please contact your Merchant for a refund.",
|
|
74
|
+
complete = "",
|
|
75
|
+
pending = "",
|
|
76
|
+
error = "",
|
|
77
|
+
cancelled = ""
|
|
78
|
+
}
|
|
79
|
+
declare const PAYMENT_ICONS: {
|
|
80
|
+
partial: string;
|
|
81
|
+
over: string;
|
|
82
|
+
complete: string;
|
|
83
|
+
pending: undefined;
|
|
84
|
+
error: undefined;
|
|
85
|
+
cancelled: undefined;
|
|
86
|
+
};
|
|
87
|
+
interface paymentDetailsProps {
|
|
88
|
+
cancelPayment: () => void;
|
|
89
|
+
confirmPayment: () => void;
|
|
90
|
+
}
|
|
91
|
+
declare enum PAYMENT_STAGE {
|
|
92
|
+
FORM = 1,
|
|
93
|
+
DETAILS = 2,
|
|
94
|
+
INFO = 3
|
|
95
|
+
}
|
|
96
|
+
interface QueueItem {
|
|
97
|
+
id: string;
|
|
98
|
+
config: AxiosRequestConfig;
|
|
99
|
+
controller: AbortController;
|
|
100
|
+
resolve: (value: AxiosResponse<any>) => void;
|
|
101
|
+
reject: (reason?: any) => void;
|
|
102
|
+
retries: number;
|
|
103
|
+
}
|
|
104
|
+
type APIResponse<T = unknown> = AxiosResponse<{
|
|
105
|
+
message: string;
|
|
106
|
+
status: string;
|
|
107
|
+
data: T;
|
|
108
|
+
}>;
|
|
109
|
+
type APIError<T = unknown> = AxiosError<{
|
|
110
|
+
message: string;
|
|
111
|
+
status: string;
|
|
112
|
+
data?: T;
|
|
113
|
+
}>;
|
|
114
|
+
interface newPaymentResponse {
|
|
115
|
+
activationFee: number;
|
|
116
|
+
activationFeeUSD: number;
|
|
117
|
+
agentAmount: string;
|
|
118
|
+
agentCurrency: string;
|
|
119
|
+
agentId: string;
|
|
120
|
+
agentRate: number;
|
|
121
|
+
agentRateUSD: number;
|
|
122
|
+
amount: string;
|
|
123
|
+
chain: string;
|
|
124
|
+
chainId?: {
|
|
125
|
+
coin: string;
|
|
126
|
+
};
|
|
127
|
+
coinAmount: string;
|
|
128
|
+
contractAddress: string;
|
|
129
|
+
currency: string;
|
|
130
|
+
fee: number;
|
|
131
|
+
feeSent: boolean;
|
|
132
|
+
feeUSD: number;
|
|
133
|
+
merchantId: string;
|
|
134
|
+
rate: number;
|
|
135
|
+
txId: string;
|
|
136
|
+
type: string;
|
|
137
|
+
usdAmount: string;
|
|
138
|
+
walletAddress: string;
|
|
139
|
+
walletAddressIndex: number;
|
|
140
|
+
status?: PaymentStatusProps;
|
|
141
|
+
amountReceived?: string;
|
|
142
|
+
balanceRequired?: string;
|
|
143
|
+
}
|
|
144
|
+
interface onFinishResponse {
|
|
145
|
+
status: PaymentStatusProps;
|
|
146
|
+
message: string;
|
|
147
|
+
data: IPaymentData | undefined;
|
|
148
|
+
}
|
|
149
|
+
interface ConfigContextType {
|
|
150
|
+
accessId: string;
|
|
151
|
+
accessSecret: string;
|
|
152
|
+
amount: number;
|
|
153
|
+
fiatCurrency: string;
|
|
154
|
+
env: TenderEnvironments;
|
|
155
|
+
confirmationInterval?: number;
|
|
156
|
+
theme?: "light" | "dark";
|
|
157
|
+
onEventResponse?: (data: onFinishResponse) => void;
|
|
158
|
+
}
|
|
159
|
+
interface TenderAgentProps {
|
|
160
|
+
amount: number;
|
|
161
|
+
fiatCurrency: string;
|
|
162
|
+
accessId: string;
|
|
163
|
+
accessSecret: string;
|
|
164
|
+
env: TenderEnvironments;
|
|
165
|
+
onEventResponse?: (data: onFinishResponse) => void;
|
|
166
|
+
}
|
|
167
|
+
interface PaymentChain {
|
|
168
|
+
_id: string;
|
|
169
|
+
name: string;
|
|
170
|
+
icon: string;
|
|
171
|
+
id: string;
|
|
172
|
+
coin: string;
|
|
173
|
+
status: string;
|
|
174
|
+
explorer: string;
|
|
175
|
+
chainType: string;
|
|
176
|
+
isMultiChain: boolean;
|
|
177
|
+
cType: string;
|
|
178
|
+
}
|
|
179
|
+
interface PaymentCoin {
|
|
180
|
+
_id: string;
|
|
181
|
+
id: string;
|
|
182
|
+
name: string;
|
|
183
|
+
icon: string;
|
|
184
|
+
isContract: boolean;
|
|
185
|
+
chains: string[];
|
|
186
|
+
priceTag: string;
|
|
187
|
+
symbol: string;
|
|
188
|
+
status: string;
|
|
189
|
+
}
|
|
190
|
+
interface PaymentChainResponse {
|
|
191
|
+
data: PaymentChain[];
|
|
192
|
+
pages: number;
|
|
193
|
+
page: number;
|
|
194
|
+
limit: number;
|
|
195
|
+
}
|
|
196
|
+
interface PaymentCoinsResponse {
|
|
197
|
+
data: PaymentCoin[];
|
|
198
|
+
pages: number;
|
|
199
|
+
page: number;
|
|
200
|
+
limit: number;
|
|
201
|
+
}
|
|
202
|
+
export { type IAny, type FormHeaderProps, type FormFooterProps, type IPaymentData, type PaymentTypeProps, type PaymentStatusProps, type paymentResponseProps, type paymentDetailsProps, type newPaymentResponse, type Option, type IGetRequestSignatureParam, type IGetRequestSignature, type ITheme, type ConfigContextType, type TenderEnvironments, type TenderAgentProps, type QueueItem, type PaymentCoinsResponse, type PaymentChainResponse, type PaymentCoin, type APIResponse, type APIError, type onFinishResponse, paymentStatusMap, PAYMENT_STAGE, PAYMENT_STATUS, PAYMENT_RESPONSES, PAYMENT_ICONS, };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tender-cash/agent-sdk-react",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"repository": "git://github.com/tender-cash/agent-sdk-react.git",
|
|
6
6
|
"description": "",
|
|
7
7
|
"author": "Tender",
|
|
@@ -67,9 +67,7 @@
|
|
|
67
67
|
"vite-plugin-svgr": "^4.3.0"
|
|
68
68
|
},
|
|
69
69
|
"files": [
|
|
70
|
-
"dist
|
|
71
|
-
"dist/bundle-cjs",
|
|
72
|
-
"dist/assets",
|
|
70
|
+
"dist",
|
|
73
71
|
"dist/style.css"
|
|
74
72
|
],
|
|
75
73
|
"keywords": [],
|
package/readme.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# @tender-cash/agent-sdk-react
|
|
2
2
|
|
|
3
|
+
[](https://badge.fury.io/js/%40tender-cash%2Fagent-sdk-react)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
3
6
|
React component library for integrating the Tender Cash payment flow into your application.
|
|
4
7
|
|
|
5
8
|
## Installation
|
|
@@ -38,7 +41,7 @@ function PaymentComponent() {
|
|
|
38
41
|
// --- Configuration ---
|
|
39
42
|
const accessId = 'YOUR_ACCESS_ID'; // Replace with your actual Access ID
|
|
40
43
|
const accessSecret = 'YOUR_ACCESS_SECRET'; // Replace with your actual Access Secret
|
|
41
|
-
const amount =
|
|
44
|
+
const amount = 150.00; // Amount to charge
|
|
42
45
|
const fiatCurrency = 'USD'; // Currency code
|
|
43
46
|
const environment = 'test'; // 'test' or 'live'
|
|
44
47
|
|