|
@@ -9,7 +9,7 @@ class Shande extends Controller
|
|
|
{
|
|
|
// 统一下单接口
|
|
|
// https://open.sandpay.com.cn/product/detail/43308/43720/43721
|
|
|
- public static function orderPay($order_no,$amout,$body,$notifyurl,$frontUrl,$card_no)
|
|
|
+ public static function orderPay($order_no,$amout,$body,$notifyurl,$frontUrl)
|
|
|
{
|
|
|
$client = new H5FastPay;
|
|
|
// 参数
|
|
@@ -20,13 +20,13 @@ class Shande extends Controller
|
|
|
'subject' => $body,
|
|
|
'body' => $body,
|
|
|
'payMode' => 'sand_h5',
|
|
|
- 'payExtra' => json_encode(array('cardNo'=>$card_no)),
|
|
|
'clientIp' => get_client_ip(),
|
|
|
//'notifyUrl' => 'http://192.168.1.66/sandpay-qr-phpdemo/notifyurl.php',
|
|
|
'notifyUrl' => $notifyurl,
|
|
|
//'frontUrl' => 'http://192.168.1.66/sandpay-qr-phpdemo/notifyurl.php',
|
|
|
- 'frontUrl' => $frontUrl
|
|
|
+ 'frontUrl' => $frontUrl,
|
|
|
);
|
|
|
+
|
|
|
// 返回结果
|
|
|
$ret = $client->request('orderPay');
|
|
|
return $ret;
|
|
@@ -72,21 +72,21 @@ class Shande extends Controller
|
|
|
// 异步通知通用接口
|
|
|
public function notify()
|
|
|
{
|
|
|
- /* $client = new H5FastPay;
|
|
|
- $sign = $_POST['sign']; //签名
|
|
|
- $data = stripslashes($_POST['data']); //支付数据
|
|
|
+ /* $client = new H5FastPay;
|
|
|
+ $sign = $_POST['sign']; //签名
|
|
|
+ $data = stripslashes($_POST['data']); //支付数据
|
|
|
|
|
|
- // 验签
|
|
|
- try {
|
|
|
- $verifyFlag = $client->verify($data, $sign);
|
|
|
- if ($verifyFlag) {
|
|
|
- echo '签名正确';
|
|
|
- } else {
|
|
|
- echo '签名错误';
|
|
|
- }
|
|
|
- } catch (\Exception $e) {
|
|
|
- echo $e->getMessage();
|
|
|
- }*/
|
|
|
+ // 验签
|
|
|
+ try {
|
|
|
+ $verifyFlag = $client->verify($data, $sign);
|
|
|
+ if ($verifyFlag) {
|
|
|
+ echo '签名正确';
|
|
|
+ } else {
|
|
|
+ echo '签名错误';
|
|
|
+ }
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ echo $e->getMessage();
|
|
|
+ }*/
|
|
|
}
|
|
|
|
|
|
// 商户自主重发异步通知接口
|