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

"Could not find and update PENDING invoice" error #200

Closed whousehomestay closed 1 year ago

whousehomestay commented 1 year ago

It happens when we try to change the status of an invoice (payment link) to expired, while maybe on xendit, the invoice's status has been expired. Maybe we can prevent this by checking the status first, if it's pending then expired request is sent.

A bit of code to reproduce this error: do: $expireInvoice = Invoice::expireInvoice($invoiceId); on expired invoice.

adityarx commented 1 year ago

Hello @whousehomestay for implementation assistance please have a read through our Docs (https://docs.xendit.co/) or ask for help using our site's chatbot. Thanks! 🙏