File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ public function pay($service)
2121 $ response = $ this ->unionpay ($ gateway );
2222 break ;
2323 }
24+ dd ( $ response ->getData ());
2425 $ response ->redirect ();
2526 }
2627 /**
@@ -48,7 +49,14 @@ protected function alipay($gateway)
4849 */
4950 protected function wechat ($ gateway )
5051 {
51- return '' ;
52+ $ order = [
53+ 'body ' => 'The test order ' ,
54+ 'out_trade_no ' => date ('YmdHis ' ).mt_rand (1000 , 9999 ),
55+ 'total_fee ' => 1 , //=0.01
56+ 'spbill_create_ip ' => '127.0.0.1 ' ,
57+ 'fee_type ' => 'CNY '
58+ ];
59+ return $ gateway ->purchase ($ order )->send ();
5260 }
5361 /**
5462 * [unionpay 银联支付购买]
Original file line number Diff line number Diff line change 2727 'notifyUrl ' => 'http://corecmf.dev/Omnipay/alipay '
2828 ]
2929 ],
30+ 'wechat ' => [
31+ 'driver ' => 'WechatPay ' ,
32+ 'options ' => [
33+ 'appId ' => 'wxd18b8356c98591dc ' ,
34+ 'mchId ' => '10035597 ' ,
35+ 'apiKey ' =>'237a9914f17b3041d60f9eee5406af2c ' ,
36+ 'tradeType ' => 'NATIVE ' ,
37+ 'notifyUrl ' => 'http://corecmf.dev/Omnipay/unionpay '
38+ ]
39+ ],
3040 'unionpay ' => [
3141 'driver ' => 'UnionPay_Express ' ,
3242 'options ' => [
You can’t perform that action at this time.
0 commit comments