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 c457597 commit e3cd1ef
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ const channelSecret = '8c832c018d09a8be1738b32a3be1ee0a';
// 創建支付的 API
app.post('/api/create-payment', async (req, res) => {
const orderId = `o_${Date.now()}`; // 生成唯一的訂單 ID
const packageId = `p_${Date.now()}`; // 生成唯一的套餐 ID
const productId = `pr_${Date.now()}`; // 生成唯一的商品 ID
const amount = 500; // 您可以根據需要調整金額
const currency = 'TWD'; // 或 'JPY'

Expand All @@ -246,11 +244,9 @@ app.post('/api/create-payment', async (req, res) => {
orderId,
packages: [
{
id: packageId,
amount,
products: [
{
id: productId,
name: "這是好吃的",
imageUrl: "https://pay-store.example.com/images/product.jpg",
quantity: 1,
Expand Down

0 comments on commit e3cd1ef

Please sign in to comment.