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

Enabling developer to set custom 'callback-url' to any Requests sent to Xendit API. #207

Closed Karuna053 closed 2 months ago

Karuna053 commented 1 year ago

According to https://docs.xendit.co/ewallet/integrations/best-practices, it is possible to set up a dynamic callback URL by including 'callback-url' in the request header, but I couldn't find any ways to include this in the current xendit-php.

This is my fix for it. Coders now only need to add 'callback-url' to the parameter used in src/ApiOperations/Request.php. image

Karuna053 commented 1 year ago

cc @xen-HendryZheng @ellennugroho

adityarx commented 1 year ago

Hi @Karuna053, thank you for raising this. We don't support a universal header to set callback URL. This will vary with each product you're using. For example, a callback can be set for create QR here https://developers.xendit.co/api-reference/#create-qr-code.

Karuna053 commented 1 year ago

In that case, is the ability to set up callback-url in createEWalletCharge() just not supported in general? I've read it in the ewallet documentation that you could, so I was under the impression it is possible to set up dynamic callback-url on ewallet functions, specifically in createEWalletCharge().

trunghieu26 commented 12 months ago

Hi, I'm currently having a hard time doing the payment function with Vitural Account and using USD. Can you help me?

adityarx commented 11 months ago

@trunghieu26 can you raise it through help@xendit.co or on https://help.xendit.co/hc/en-us? Our CS team will be happy to help you