diff --git a/src/client/transactions/namespace.ts b/src/client/transactions/namespace.ts index 9a0d678..95c4f98 100644 --- a/src/client/transactions/namespace.ts +++ b/src/client/transactions/namespace.ts @@ -6,7 +6,7 @@ import { TransactionCaptureOptions, TransactionRefundOptions } from './options'; -import { Transaction, CalculateInstallmentsAmount } from './responses'; +import { Transaction, CalculateInstallmentsAmount, CardHashKey } from './responses'; declare module 'pagarme' { export namespace client { @@ -23,7 +23,7 @@ declare module 'pagarme' { function capture(opts: TransactionCaptureOptions): Promise; - function cardHashKey(opts: any): any; + function cardHashKey(opts: any): Promise; function collectPayment(opts: any, body: any): any; diff --git a/src/client/transactions/responses.ts b/src/client/transactions/responses.ts index 566c44c..3e59ab2 100644 --- a/src/client/transactions/responses.ts +++ b/src/client/transactions/responses.ts @@ -111,3 +111,14 @@ export interface CalculateInstallmentsAmount { [key: string]: Installment; }; } + +export interface CardHashKey { + /** Momento de criação da chave pública. */ + date_created: "string", + /** id retornado e que será utilizado para compor o card_hash, logo, é importante que você o reserve. */ + id: number, + /** IP de onde a request foi originada. */ + ip: string, + /** Chave pública utilizada para criptografar os dados do cartão. */ + public_key: string, +}