Skip to content

Commit

Permalink
chore: fix verify signature webhook momo
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhhTien committed Jul 6, 2024
1 parent ec2d3c2 commit 19457fb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/payment/strategies/momo.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ export class MomoPaymentStrategy implements IPaymentStrategy {
const rawSignature = `accessKey=${this.config.accessKey}&amount=${amount}&extraData=${extraData}&message=${message}&orderId=${orderId}&orderInfo=${orderInfo}&orderType=${orderType}&partnerCode=${partnerCode}&payType=${payType}&requestId=${requestId}&responseTime=${responseTime}&resultCode=${resultCode}&transId=${transId}`
const signature = this.helperService.createSignature(rawSignature, this.config.secretKey)

console.log(`1. ${momoPaymentResponseDto.signature}`)
console.log(`2. ${signature}`)
return momoPaymentResponseDto.signature !== signature
return momoPaymentResponseDto.signature == signature
}
}

0 comments on commit 19457fb

Please sign in to comment.