Open AhmetHuseyinDOK opened 6 months ago
Ok I found a workaround,
this.snapApi.httpClient.http_client.defaults.headers.common['X-Override-Notification'] = "https://somewebhook.com/handler/ ";
But I think, it would be nice to be able to do it with an optional config like this
this.snapApi.createTransaction({
transaction_details: {
gross_amount: transaction.amount,
order_id: transaction.id,
},
enabled_payments: ['gopay'],
overrideNotification: 'https://somenotificatipon.com/webhookhandler/' // would be much nicer
})
In the Midtrans documentation, it is shown that we can override the webhook url via headers, How can I achieve the same result using this library ?
https://docs.midtrans.com/docs/https-notification-webhooks#customizing-notification-url-via-api