PrepayController.class.php
711 Bytes
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
<?php
namespace Api\Controller\Pay;
use VcySDK\Service;
use VcySDK\WxPay;
class PrepayController extends AbstractController
{
protected $_require_login = false;
/**
*/
public function Index_post()
{
$field = [
'memUid',
'worTotalFee',
'worBody',
'worIp',
'worTradeType',
'worOrder',
'worChannel',
'worNotifyUrl'
];
$postData = [];
foreach ($field as $param) {
$postData[$param] = I('post.' . $param);
}
$paySdk = new WxPay(Service::instance());
$this->_result = $paySdk->prepay($postData);
return true;
}
}