flowcl-node-api-client
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -5,3 +5,3 @@ export interface IFlowApiConfig { | ||
apiURL: string; | ||
baseURL: string; | ||
baseURL?: string; | ||
} | ||
@@ -16,2 +16,8 @@ export enum PaymentMethod { | ||
} | ||
export enum FlowStatus { | ||
PENDING_PAYMENT = 1, | ||
PAIED = 2, | ||
REJECTED = 3, | ||
CANCELED = 4 | ||
} | ||
export interface IFlowSendParams { | ||
@@ -27,2 +33,29 @@ commerceOrder: number; | ||
} | ||
export interface IFlowResponse { | ||
flowOrder: number; | ||
commerceOrder: string; | ||
requestDate: string; | ||
status: FlowStatus; | ||
subject: string; | ||
currency: string; | ||
amount: number; | ||
payer: string; | ||
optional: { | ||
[key: string]: string; | ||
}; | ||
pending_info: { | ||
media: string; | ||
date: string; | ||
}; | ||
paymentData: { | ||
date: string; | ||
media: string; | ||
conversionDate: string; | ||
conversionRate: number; | ||
amount: number; | ||
fee: number; | ||
balance: number; | ||
transferDate: string; | ||
}; | ||
} | ||
export interface IFlowApi { | ||
@@ -34,3 +67,3 @@ new (n: IFlowApiConfig): IFlowApi; | ||
method: "GET" | " POST" = "GET" | ||
): Promise<any>; | ||
): Promise<IFlowResponse>; | ||
getPack(params: IFlowSendParams, method: "GET" | " POST" = "GET"): string; | ||
@@ -37,0 +70,0 @@ sign(params: IFlowSendParams): string; |
{ | ||
"name": "flowcl-node-api-client", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,3 +13,6 @@ # NODE-API-CLIENT | ||
Baje la última versión y copie los archivos en su servidor. | ||
Instale la última versión en su proyecto desde npm | ||
```ssh | ||
npm install flowcl-node-api-client --save | ||
``` | ||
@@ -30,3 +33,3 @@ ## Documentación | ||
- **apiURL** la URL del endpoint del API de Flow, Aquí podrá configurar el endpoint de producción o del sandbox. Esta información se obtiene en la documentación del API https://www.flow.cl/docs/api.html | ||
- **baseURL** La URL base donde instaló el cliente PHP en su servidor | ||
- **baseURL** La URL base donde instaló el cliente en su servidor | ||
@@ -46,3 +49,3 @@ ```json | ||
```json | ||
```javascript | ||
/** | ||
@@ -49,0 +52,0 @@ * Ejemplo de creación de una orden de cobro, iniciando una transacción de pago |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21251
340
89