mehdi-ra / zarinpal-nestjs

Zarin Pal payment API Module for NestJs.
MIT License
5 stars 1 forks source link

fix(zarinpal-http.ts): updated error section, handle empty array #13

Closed mobintmu closed 1 month ago

mobintmu commented 1 month ago

Description

Thanks for your contribution. In new version of Zarinpal response, they sent empty array of errors and it made a bug on the application.

  data: {
    wages: [],
    code: 101,
    message: 'Verified',
    card_hash: 'XXXXX',
    card_pan: '11111*****111',
    ref_id: 5XXXXXXXX,
    fee_type: 'Merchant',
    fee: 3500,
    shaparak_fee: '1200',
    order_id: null
  },
  errors: []

Please check and fix this problem. Thanks

mehdi-ra commented 1 month ago

I'm on it dear @mobintmu. Thanks for contribution.

mobintmu commented 1 month ago

I have updated the code. Thanks

mehdi-ra commented 1 month ago

@mobintmu jan, Can you check the version 1.1.1 recently released ?