@@ -19,7 +19,7 @@ |
||
19 | 19 | public function getDefaultParameters() |
20 | 20 | { |
21 | 21 | return [ |
22 | - 'TradeType' => '2', //1:Android SDK (手遊適用) 2:WEB |
|
22 | + 'TradeType' => '2', //1:Android SDK (手遊適用) 2:WEB |
|
23 | 23 | ]; |
24 | 24 | } |
25 | 25 |
@@ -19,8 +19,7 @@ |
||
19 | 19 | if ($this->httpRequest->get('DATA')) { |
20 | 20 | $this->getNotifyParams(); |
21 | 21 | $type = 'notify'; |
22 | - } |
|
23 | - else { |
|
22 | + } else { |
|
24 | 23 | $this->getReturnParams(); |
25 | 24 | $type = 'return'; |
26 | 25 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | { |
10 | 10 | |
11 | 11 | private $ip = [ |
12 | - '220.130.127.125', // MyCard正式服务器IP |
|
12 | + '220.130.127.125', // MyCard正式服务器IP |
|
13 | 13 | '218.32.37.148' // MyCard测试服务器IP |
14 | 14 | ]; |
15 | 15 | |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | */ |
47 | 47 | private function getReturnParams() |
48 | 48 | { |
49 | - $ReturnCode = $this->httpRequest->get('ReturnCode'); // 1 为成功, 其他则为失败. 注意: ReturnCode 为1并不代表交易成功,正确交易结果请参考PayResult |
|
49 | + $ReturnCode = $this->httpRequest->get('ReturnCode'); // 1 为成功, 其他则为失败. 注意: ReturnCode 为1并不代表交易成功,正确交易结果请参考PayResult |
|
50 | 50 | $ReturnMsg = $this->httpRequest->get('ReturnMsg'); |
51 | - $PayResult = $this->httpRequest->get('PayResult'); // 交易结果代码 交易成功为 3; 交易失败为 0 |
|
52 | - $FacTradeSeq = $this->httpRequest->get('FacTradeSeq'); // 厂商交易序号 |
|
51 | + $PayResult = $this->httpRequest->get('PayResult'); // 交易结果代码 交易成功为 3; 交易失败为 0 |
|
52 | + $FacTradeSeq = $this->httpRequest->get('FacTradeSeq'); // 厂商交易序号 |
|
53 | 53 | // $PaymentType = $this->httpRequest->get('PaymentType'); // 付费方式 |
54 | 54 | // $Amount = $this->httpRequest->get('Amount'); |
55 | 55 | // $Currency = $this->httpRequest->get('Currency'); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | { |
69 | 69 | // 查询 |
70 | 70 | $fetchResponse = $this->request->fetchTransaction($this->token); |
71 | - $this->data['raw'] = $fetchResponse->getData(); // 用查询数据覆盖掉通知过来的数据 |
|
71 | + $this->data['raw'] = $fetchResponse->getData(); // 用查询数据覆盖掉通知过来的数据 |
|
72 | 72 | |
73 | 73 | $this->status = static::STATUS_FAILED; |
74 | 74 | if ($fetchResponse->getData()['PayResult'] == 3) { // 交易成功為3; 交易失敗為0; |
@@ -79,8 +79,7 @@ |
||
79 | 79 | $confirmResponse = $this->request->confirmTransaction(); |
80 | 80 | if ($confirmResponse->getData()['ReturnCode'] == 1) { |
81 | 81 | $this->data['raw']['confirm'] = true; |
82 | - } |
|
83 | - else { |
|
82 | + } else { |
|
84 | 83 | $this->data['raw']['confirm'] = false; |
85 | 84 | } |
86 | 85 | return $this; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | 'FacServiceId' => $this->getAppId(), |
15 | 15 | 'FacTradeSeq' => $this->getTransactionId(), |
16 | 16 | 'TradeType' => $this->getTradeType(), |
17 | - 'ServerId' => $this->getServerId() ?: '', // 服务器ID |
|
17 | + 'ServerId' => $this->getServerId() ?: '', // 服务器ID |
|
18 | 18 | 'CustomerId' => $this->getAccountId() ?: $this->getTransactionId(), // 用户ID |
19 | 19 | 'PaymentType' => $this->getPaymentType() ?: '', |
20 | 20 | 'ItemCode' => $this->getItemCode() ?: '', |