xendit / xendit-php

Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services, xenPlatforms
https://developers.xendit.co/api-reference/
MIT License
152 stars 76 forks source link

ERROR getAllTransactions using WITHDRAWAL status #224

Open gilbertronaldo opened 6 months ago

gilbertronaldo commented 6 months ago

Problem:

When attempting to call $apiInstance->getAllTransactions() with the parameter types set to 'WITHDRAWAL', the following error occurs:

Invalid value 'NOT_APPLICABLE' for 'status', must be one of 'PENDING', 'COMPLETED', 'CANCELED', 'REVERSED'

Cause:

The error arises because the API response contains a status value of 'NOT_APPLICABLE', which is not currently handled by the FeeResponse file.

Proposed Solution:

To resolve this issue, we need to update the FeeResponse file to include support for the 'NOT_APPLICABLE' status.

image

Steps to Reproduce:

  1. Call $apiInstance->getAllTransactions() with the types parameter set to 'WITHDRAWAL'.
  2. Observe the error message stating the invalid value for the status.

Expected Behavior:

The FeeResponse file should be updated to recognize and handle the 'NOT_APPLICABLE' status returned by the API.