Skip to content

Commit

Permalink
fix bug midtrans webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
XSmas29 committed Oct 9, 2024
1 parent 2ab49dd commit 2991444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/webhook/midtrans.webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ router.post('/status', async (req, res) => {
console.log(payload)
if (
payload.status_code === '200' &&
payload.fraud_status === 'accept' &&
(!payload.fraud_status || payload.fraud_status === 'accept') &&
(payload.transaction_status === 'settlement' || payload.transaction_status === 'capture')
) {
const order_category = payload.order_id.split('-')[0]
Expand Down

0 comments on commit 2991444

Please sign in to comment.