update test webhook
This commit is contained in:
@@ -31,6 +31,12 @@ export class PayosService {
|
||||
|
||||
async webhook(data: WebhookType) {
|
||||
Logger.log(`Webhook received: ${JSON.stringify(data)}`)
|
||||
// check if orderCode = 123 mean it's a test payment and auto response success
|
||||
if (data.data.orderCode === 123) {
|
||||
return {
|
||||
message: 'Payment received',
|
||||
}
|
||||
}
|
||||
// verify checksum
|
||||
const paymentData = this.payos.verifyPaymentWebhookData(data)
|
||||
if (!paymentData) {
|
||||
|
||||
Reference in New Issue
Block a user