Compare commits

..

No commits in common. "9a65fef3cfa3502df5220ee675afda40af53301a" and "b03806fae6cf833f9c91736138db725342939e68" have entirely different histories.

2 changed files with 2 additions and 3 deletions

View File

@ -708,7 +708,7 @@ function verifyWebhookSignature(body, mode) {
const grossAmount = body?.gross_amount
if (mode === 'SNAP') {
const signature = body?.signature_key
const signature = req.headers['x-signature'] || req.headers['signature'] || body?.signature
if (!signature) return false
const data = `${orderId}${statusCode}${grossAmount}${serverKey}`
@ -1194,7 +1194,6 @@ app.post('/api/payments/notification', async (req, res) => {
}
} catch (e) {
console.log(e);
logError('webhook.error', { message: e?.message, stack: e?.stack })
return res.status(500).json({
ok: false,

View File

@ -3,7 +3,7 @@ const fs = require('fs');
async function createPaymentLink() {
// Read file and remove BOM if present
let jsonContent = fs.readFileSync('temp/tmp-createtransaksi.json', 'utf8');
let jsonContent = fs.readFileSync('../temp/tmp-createtransaksi.json', 'utf8');
// Remove BOM
if (jsonContent.charCodeAt(0) === 0xFEFF) {
jsonContent = jsonContent.slice(1);