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 eea0849 commit 7e7a9a4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ app.post('/api/create-payment', async (req, res) => {
currency,
"productName": "ithome",
"productImageUrl": "https://ithelp.ithome.com.tw/images/ironman/11th/event/kv_event/kv-bg-addfly.png",
"confirmUrl": "http://192.168.61.15:5001",
"confirmUrl": "/api/transaction",
};

// 定義簽名生成函數
Expand Down Expand Up @@ -298,3 +298,9 @@ app.post('/api/create-payment', async (req, res) => {
});
}
});

app.get('/api/transaction', (req, res) => {
const transactionId = req.query.transactionId;
// 在這裡處理交易 ID,查詢相應的數據或執行相應的邏輯
res.json({ message: 'Transaction details', transactionId });
});

0 comments on commit 7e7a9a4

Please sign in to comment.