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
153 stars 76 forks source link

Create Disbursement Response Error Code unCatchable #173

Closed indragunawan82 closed 1 year ago

indragunawan82 commented 2 years ago

Step to Reproduce : Create Disbursement Request with this payload : "external_id" => "freetext" "amount" => "100000" "bank_code" => "Dummy Bank" "account_holder_name" => "freetext" "account_number" => "085611111111" "description" => "freetext"

Result should be : image

i tried to catch the error response by using this : image

the response still same : image

expected response/result : should be "xx"

adityarx commented 1 year ago

Hi @indragunawan82, a bit of a late response, but we're not quite sure about the dd() function. I believe you should be able to catch the exception raised by creating the disbursement and handle the paymernt from there.