-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: export data-vault & process payment types
- Loading branch information
Showing
8 changed files
with
123 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { z } from 'zod'; | ||
import { Create } from './schemas'; | ||
|
||
export type DataVaultResponse = Partial<{ | ||
/** | ||
* Marca de la tarjeta | ||
*/ | ||
Brand: string; | ||
/** | ||
* Número de tarjeta enmascarada (ej. XXXXXX…XXXX). | ||
*/ | ||
CardNumber: string; | ||
/** | ||
* Token generado por SDP. | ||
*/ | ||
DataVaultToken: string; | ||
/** | ||
* Descripción del error. | ||
* Valor sólo presente si la transacción produjo un error. En caso | ||
* de no presentar error ese campo viaja en blanco | ||
*/ | ||
ErrorDescription: string; | ||
/** | ||
* Fecha expiración del token. Formato YYYYMM | ||
*/ | ||
Expiration: string; | ||
/** | ||
* Indica si el Token fue creado con CVV. | ||
*/ | ||
HasCVV: boolean; | ||
/** | ||
* Código ISO-8583 recibido de respuesta. | ||
* Cuando la transacción es exitosa se recibe el valor “00” | ||
*/ | ||
IsoCode: string; | ||
/** | ||
* Mensaje de respuesta | ||
*/ | ||
ResponseMessage: string; | ||
}>; | ||
|
||
export type CreateInput = z.input<typeof Create>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import { ProcessPaymentSchema } from './schemas'; | ||
import { z } from 'zod'; | ||
import { RefundSchema } from './schemas'; | ||
|
||
export type ProcessPaymentResponse = Partial<{ | ||
/** | ||
* Código de autorización generado por el centro autorizador para la | ||
* transacción. | ||
* Sólo presente si la transacción fue aprobada. ISOCode = ISO8583 y | ||
* ResponseCode = 00 | ||
*/ | ||
AuthorizationCode: string; | ||
/** | ||
* Numero Identificador dada por el afiliado a la transacción. Si no | ||
* fue provisto en la transacción, este campo viaja en blanco | ||
*/ | ||
CustomOrderId: string; | ||
/** | ||
* Fecha y hora de la transacción. | ||
* Formato YYYYMMDDHHMMSS. | ||
*/ | ||
DateTime: string; | ||
/** | ||
* Descripción del error. | ||
* Valor sólo presente si la transacción produjo un error. En caso de | ||
* no presentar error ese campo viaja en blanco | ||
*/ | ||
ErrorDescription: string; | ||
/** | ||
* Código ISO-8583 recibido de respuesta. | ||
* Nota: En la documentación de Azul, este campo se llama ISOCode | ||
*/ | ||
IsoCode: string; | ||
/** | ||
* Número de lote en que se registró la transacción | ||
*/ | ||
LotNumber: string; | ||
/** | ||
* Número de referencia | ||
* (Reference referral number). | ||
*/ | ||
RRN: string; | ||
/** | ||
* Número de orden Azul. Puede ser usado en vez del RRN para generar una | ||
* devolución. Importante dar prioridad a este valor sobre el RRN. | ||
*/ | ||
AzulOrderId: string; | ||
/** | ||
* Código de respuesta. | ||
* Puede contener uno de los siguientes valores: | ||
* Iso8583 = la transacción fue procesada. Se debe revisar el | ||
* campo ISOCode para ver la respuesta de la transacción Error = | ||
* La transacción no fue procesada. | ||
*/ | ||
ResponseCode: 'ISO8583' | 'Error'; | ||
/** | ||
* Mensaje de respuesta ISO-8583. | ||
* Valor sólo presente si el ResponseCode = ISO8583 | ||
*/ | ||
ResponseMessage: string; | ||
/** | ||
* Número del ticket correspondiente a la transacción | ||
*/ | ||
Ticket: string; | ||
/** | ||
* Tarjeta usada para la transacción, enmascarada | ||
* (XXXXXX******XXXX) | ||
*/ | ||
CardNumber: string; | ||
}>; | ||
|
||
export type ProcessPaymentSchemaInput = z.input<typeof ProcessPaymentSchema>; | ||
|
||
export type RefundSchemaInput = z.input<typeof RefundSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters