Skip to content

Commit

Permalink
Update app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
CYHFREDA authored Oct 17, 2024
1 parent c58b3d4 commit 1eec47b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ app.post('/api/create-payment', async (req, res) => {
console.log('儲存交易資料:', transaction);
await transaction.save();

res.json({ returnUrl: response.data.info.paymentUrl.web });
res.json({
returnUrl: response.data.info.paymentUrl.web,
transactionId: response.data.info.transactionId // 添加交易 ID
});

} else {
res.status(501).json({ message: '支付請求成功,但未返回有效的付款網址' });
}
Expand Down

0 comments on commit 1eec47b

Please sign in to comment.