tomoya 1 week ago
parent
commit
3b38e18010
1 changed files with 4 additions and 5 deletions
  1. 4 5
      backend/app/app/api/api_v1/endpoints/simplepayment.py

+ 4 - 5
backend/app/app/api/api_v1/endpoints/simplepayment.py

@@ -28,7 +28,6 @@ def ecpay_payment(
   user_data: schemas.SimplePayCreate,
   lang: str=''
 ):  
-    print(user_data.url)
     MerchantTradeNo = 'test'+datetime.now().strftime("NO%Y%m%d%H%M%S")
     remark = {'MerchantTradeNo':MerchantTradeNo}
     remark_string = json.dumps(remark, ensure_ascii=False)
@@ -215,13 +214,13 @@ def ecpay_payment(
     }
 
     inv_params = {
-        # 'RelateNumber': 'Tea0001', # 特店自訂編號
+        'RelateNumber': MerchantTradeNo, # 特店自訂編號
         # 'CustomerID': 'TEA_0000001', # 客戶編號
-        # 'CustomerIdentifier': '53348111', # 統一編號
-        # 'CustomerName': '客戶名稱',
+        'CustomerIdentifier': user_data.taxID if user_data.taxID else '', # 統一編號
+        'CustomerName': user_data.name,
         # 'CustomerAddr': '客戶地址',
         # 'CustomerPhone': '0912345678', # 客戶手機號碼
-        # 'CustomerEmail': 'abc@ecpay.com.tw',
+        'CustomerEmail': user_data.email,
         # 'ClearanceMark': '2', # 通關方式
         # 'TaxType': '1', # 課稅類別
         # 'CarruerType': '', # 載具類別