-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.php
More file actions
108 lines (92 loc) · 3.15 KB
/
Copy pathconfig.php
File metadata and controls
108 lines (92 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
//網站根目錄
define('WEB_PATH', str_replace(str_replace("\\","/",$_SERVER['DOCUMENT_ROOT']),"",str_replace("\\","/",dirname(__FILE__))));
//是否ssl
define('HTTP', (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) ? "https://" : "http://");
//網站網址
define('HTTP_PATH', HTTP.$_SERVER['HTTP_HOST'].WEB_PATH.'/');
//訂單編號長度
//傳送到金流端會加入後墜,避免訂單編號重複
define('ORDER_SIZE', 10);
//第一銀行
define('FISC_IS_TEST', true);
define('FISC_MER_ID', '');
define('FISC_MERCHANT_ID', '');
define('FISC_TERMINAL_ID', '');
define('FISC_MERCHANT_NAME', '');
define('FISC_CALLBACK', HTTP_PATH.'callback/fisc.php');
//華南
define('EPOS_IS_TEST', true);
define('EPOS_MER_ID', '');
define('EPOS_MERCHANT_ID', '');
define('EPOS_TERMINAL_ID', '');
define('EPOS_CHECK_ID', '');
define('EPOS_CALLBACK', HTTP_PATH.'callback/epos.php');
//藍新
define('NEWEB_IS_TEST', true);
define('NEWEB_MERCHANT_ID', '');
define('NEWEB_HASH_KEY', '');
define('NEWEB_HASH_IV', '');
define('NEWEB_CALLBACK', HTTP_PATH.'callback/neweb.php');
//LINE PAY
define('LINE_PAY_IS_TEST', true);
define('LINE_PAY_CHANNELID', '');
define('LINE_PAY_CHANNELSECRET', '');
define('LINE_PAY_MERCHANTNAME', '');
define('LINE_PAY_CALLBACK', HTTP_PATH.'callback/line.php?amount=');
//PAY NOW
//回傳網址在PAY NOW後台設定
define('PAY_NOW_IS_TEST', true);
define('PAY_NOW_WEBNO', '');
define('PAY_NOW_PASSWORD', '');
define('PAY_NOW_ECPLATFORM', '');
//台新
define('TSPG_IS_TEST', true);
define('TSPG_MID', '');
define('TSPG_TID', '');
define('TSPG_CALLBACK', HTTP_PATH.'callback/tspg.php');
//YI PAY
define('YI_PAY_IS_TEST', true);
define('YI_PAY_MERCHANTID', '');
define('YI_PAY_HASHKEY', '');
define('YI_PAY_HASHIV', '');
define('YI_PAY_CALLBACK', HTTP_PATH.'callback/yiPay.php');
abstract class paymentMethodType{
const FISC = 1;//信用卡刷卡(財金資訊股份有限公司)
const EPOS = 2;//信用卡刷卡(華南銀行)
const CREDIT_NEWEB = 3;//信用卡一次付清(藍新)
const ANDROIDPAY_NEWEB = 4;//Google Pay(藍新)
const SAMSUNGPAY_NEWEB = 5;//Samsung Pay(藍新)
const INSTFLAG_NEWEB = 6;//信用卡分期(藍新)
const CREDITRED_NEWEB = 7;//信用卡紅利(藍新)
const UNIONPAY_NEWEB = 8;//信用卡銀聯卡(藍新)
const WEBATM_NEWEB = 9;//WEBATM(藍新)
const VACC_NEWEB = 10;//ATM 轉帳(藍新)
const CVS_NEWEB = 11;//超商代碼繳費(藍新)
const BARCODE_NEWEB = 12;//超商條碼繳費(藍新)
const P2G_NEWEB = 13;//ezPay 電子錢包(藍新)
const CVSCOM_NEWEB_N = 14;//超商取貨不付款(藍新)
const CVSCOM_NEWEB_Y = 15;//超商取貨付款(藍新)
const LINE_PAY = 16;//LINE PAY
const PAY_NOW = 17;//PAY NOW
const TSPG = 18;//信用卡刷卡(台新銀行)
const YI_PAY = 19;//YI PAY
}
//測試資料
$order = [
"orderNumber" => "MT00000001",
"total" => 500,
"freight" => 60,
"handlingFee" => 30,
"buyEmail" => ""
];
$orderList = [
[
"name" => "商品名稱",
"count" => 1
],
[
"name" => "商品名稱1",
"count" => 2
],
];