Skip to content

Commit

Permalink
Merge pull request #74 from banzeh/fix/#73 (skip-ci)
Browse files Browse the repository at this point in the history
Fix/#73
  • Loading branch information
banzeh authored Jun 17, 2020
2 parents 17a6906 + 83a2be0 commit 1e642b6
Show file tree
Hide file tree
Showing 3 changed files with 249 additions and 154 deletions.
2 changes: 1 addition & 1 deletion src/class/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class Utils {

res.on('end', () => {
const response = (chunks.length > 0 && this.validateJSON(chunks)) ? JSON.parse(chunks) : '';
if (res.statusCode && [200, 201].indexOf(res.statusCode) === -1) return reject(this.parseHttpRequestError(options, data, response));
if (res.statusCode && [200, 201].indexOf(res.statusCode) === -1) return reject(this.parseHttpRequestError(options, data, res));
if (options.method === 'PUT' && chunks.length === 0) return resolve(this.parseHttpPutResponse(res));
return resolve({
...this.parseHttpPutResponse(res),
Expand Down
4 changes: 2 additions & 2 deletions src/models/payment.request.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface PaymentRequestModel {
/**
* Texto impresso na fatura bancaria comprador - Exclusivo para VISA/MASTER - não permite caracteres especiais - Ver Anexo
*/
softDescriptor: string;
softDescriptor?: string;
/**
* Dados do cartão
*/
Expand Down Expand Up @@ -63,7 +63,7 @@ export interface PaymentRequestModel {
/**
* URI para onde o usuário será redirecionado após o fim do pagamento
*/
ReturnUrl?: string;
returnUrl?: string;

/**
* Informações de recorrência de pagamento
Expand Down
Loading

0 comments on commit 1e642b6

Please sign in to comment.