正在显示
6 个修改的文件
包含
74 行增加
和
25 行删除
@@ -53,15 +53,6 @@ class Pay extends Api | @@ -53,15 +53,6 @@ class Pay extends Api | ||
53 | $this->error('无效的订单'); | 53 | $this->error('无效的订单'); |
54 | } | 54 | } |
55 | 55 | ||
56 | - //暂时写支付成功 | ||
57 | - $status = $this->order_status; | ||
58 | - $orderModel = new Order(); | ||
59 | - $orderModel->where(['uid'=>$this->uid,'order_sn'=>$order_sn,'status'=>$status[0]])->update(['status'=>$status[2]]); | ||
60 | - $this->success('成功',['order_id'=>$res['id']]); | ||
61 | - | ||
62 | - | ||
63 | - | ||
64 | - | ||
65 | //创建支付对象 | 56 | //创建支付对象 |
66 | $config = config('verify.wx_pay'); | 57 | $config = config('verify.wx_pay'); |
67 | $pay_order_sn = Common::genPayOrderSn('pay');//支付订单号 | 58 | $pay_order_sn = Common::genPayOrderSn('pay');//支付订单号 |
@@ -162,18 +153,6 @@ class Pay extends Api | @@ -162,18 +153,6 @@ class Pay extends Api | ||
162 | $app = Factory::payment($config); | 153 | $app = Factory::payment($config); |
163 | $pay_order_sn = Common::genPayOrderSn('pay');//支付订单号 | 154 | $pay_order_sn = Common::genPayOrderSn('pay');//支付订单号 |
164 | 155 | ||
165 | - //写入订单 | ||
166 | - $res = Common::createOrder($data,$pay_order_sn,$this->uid); | ||
167 | - if($res){ | ||
168 | - $this->success('成功',['order_id'=>$res['order_id']]); | ||
169 | - } | ||
170 | - $this->error('创建订单失败'); | ||
171 | - | ||
172 | - | ||
173 | - | ||
174 | - | ||
175 | - | ||
176 | - //暂时没有真正支付 | ||
177 | $ffg_host = config('verify.ffg_host'); | 156 | $ffg_host = config('verify.ffg_host'); |
178 | $result = $app->order->unify([ | 157 | $result = $app->order->unify([ |
179 | 'body' => '佛山市理想中网络科技有限公司', | 158 | 'body' => '佛山市理想中网络科技有限公司', |
application/cert/apiclient_cert.p12
0 → 100644
不能预览此文件类型
application/cert/apiclient_cert.pem
0 → 100644
1 | +-----BEGIN CERTIF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MUJENDIyMEU1MERCQzA0QjA2QUQzOTc1 | ||
17 | +NDk4NDZDMDFDM0U4RUJEMjANBgkqhkiG9w0BAQsFAAOCAQEAD8WseN3N/cCLr3h+ | ||
18 | +p1VdZeojctzHd/Zoem4BxiXpphJezGIZjl6c3XTt2nZnpfZrcBPylEuON0Ap/qkV | ||
19 | +VADaOXq7JA6zCaC3f53UYmVwwgg/pzfXFfSTA4MNWy2su7MaTqUABYe2/eoKrjaP | ||
20 | +UN+A76gXz+zmg9CzagcJv7Zoi6lLGapBfU2TfwxKF/IWxjkvjmdpLN4vm7CWXCDc | ||
21 | ++tF/dJ6z1UH55XVaTbFfVd5ABqFCc3IVkgz0J+cEYtTlCt8nxInbhk/j5mUwXyap | ||
22 | +O+UATmR/thZbmlbMOjth34+D9PFCB2SVNzEy0eD6dpa8YD/pf5DCd/lt7JU4o6sg | ||
23 | +SKLIQQ== | ||
24 | +-----END CERTIFICATE----- |
application/cert/apiclient_key.pem
0 → 100644
1 | +-----BEGIN PRIVATE KEY----- | ||
2 | +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmle4akSGOUfp8 | ||
3 | +TlSK+Tmg9EZNAvX3d1yDrh9DfDUSs10/7aiatg5+m3liPABDtPVJiwyWC2VMfUC9 | ||
4 | +ciHEJVdmFgss+NGv6CzSVvuIB4Avm1NESb/lyKfB5Z9b3Daj4mwQ4nHuhkeaIhov | ||
5 | +QZ3uryMYavsASM0x6UQ8b0sPPGCg98wD3qtmWxeSkUTd+pdCgSK1rc1oEmgK9VRN | ||
6 | +fvDNzXVkI9USom6S8qlidQEBxW9TxwvUIYdRxv2SEa9jLa3gZkA454K0b//NHUru | ||
7 | +5VExmIqIKNY2gWuCyuRwHcEOYwOS214phqQAl6Qd8gmnu0/8IfxBbE8jPvItMQVc | ||
8 | +X6BkQ/47AgMBAAECggEAAu2fwdfLPzUxsf2ufsLiwHGKys/CgxcWCTqGUilcxXdh | ||
9 | +rD4BOLb6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||
24 | +G6ghql++8wRiQVFefiUKM2qjOXHxd8Tu2EU7UksCgYEAjMASUUwCVAEU2GBlevgB | ||
25 | +sTj5GU/ybGOk5VLXFDWwsJSKnvTcUq64JBfcbaD+aFM9TAfwbmbqWISXaJgYZBmC | ||
26 | +j/ozmkLTujBYryyLWpF7qDcBJR0eaOhSmSt46j0fyFufhAviMMG1Dw1FAuV8ULqT | ||
27 | +UP04Ss2hkmjZrW4F1hfZLWA= | ||
28 | +-----END PRIVATE KEY----- |
application/cert/证书使用说明.txt
0 → 100644
1 | +欢迎使用微信支付! | ||
2 | +附件中的三份文件(证书pkcs12格式、证书pem格式、证书密钥pem格式),为接口中强制要求时需携带的证书文件。 | ||
3 | +证书属于敏感信息,请妥善保管不要泄露和被他人复制。 | ||
4 | +不同开发语言下的证书格式不同,以下为说明指引: | ||
5 | + 证书pkcs12格式(apiclient_cert.p12) | ||
6 | + 包含了私钥信息的证书文件,为p12(pfx)格式,由微信支付签发给您用来标识和界定您的身份 | ||
7 | + 部分安全性要求较高的API需要使用该证书来确认您的调用身份 | ||
8 | + windows上可以直接双击导入系统,导入过程中会提示输入证书密码,证书密码默认为您的商户号(如:1900006031) | ||
9 | + 证书pem格式(apiclient_cert.pem) | ||
10 | + 从apiclient_cert.p12中导出证书部分的文件,为pem格式,请妥善保管不要泄漏和被他人复制 | ||
11 | + 部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供 | ||
12 | + 您也可以使用openssl命令来自己导出:openssl pkcs12 -clcerts -nokeys -in apiclient_cert.p12 -out apiclient_cert.pem | ||
13 | + 证书密钥pem格式(apiclient_key.pem) | ||
14 | + 从apiclient_cert.p12中导出密钥部分的文件,为pem格式 | ||
15 | + 部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供 | ||
16 | + 您也可以使用openssl命令来自己导出:openssl pkcs12 -nocerts -in apiclient_cert.p12 -out apiclient_key.pem | ||
17 | +备注说明: | ||
18 | + 由于绝大部分操作系统已内置了微信支付服务器证书的根CA证书, 2018年3月6日后, 不再提供CA证书文件(rootca.pem)下载 |
@@ -14,12 +14,12 @@ return [ | @@ -14,12 +14,12 @@ return [ | ||
14 | //微信支付配置 | 14 | //微信支付配置 |
15 | 'wx_pay' => [ | 15 | 'wx_pay' => [ |
16 | 'app_id' => 'wx322817859bfe5db1', | 16 | 'app_id' => 'wx322817859bfe5db1', |
17 | - 'mch_id' => '1559021551', | ||
18 | - 'key' => 'SMfEq8C98z7jF6OnXxZdfTi9FBRzyTN4', // 支付 密钥 | 17 | + 'mch_id' => '1565916131', |
18 | + 'key' => 'sflz1pDcxfiNe4Un6jOD4InHIk1Vwwsm', // 支付 密钥 | ||
19 | 19 | ||
20 | // 如需使用敏感接口(如退款、发送红包等)需要配置 API 证书路径(登录商户平台下载 API 证书) | 20 | // 如需使用敏感接口(如退款、发送红包等)需要配置 API 证书路径(登录商户平台下载 API 证书) |
21 | - 'cert_path' => ROOT_PATH.'public/cert/apiclient_cert.pem', // XXX: 绝对路径!!!! | ||
22 | - 'key_path' => ROOT_PATH.'public/cert/apiclient_key.pem', // XXX: 绝对路径!!!! | 21 | + 'cert_path' => ROOT_PATH.'application/cert/apiclient_cert.pem', // XXX: 绝对路径!!!! |
22 | + 'key_path' => ROOT_PATH.'application/cert/apiclient_key.pem', // XXX: 绝对路径!!!! | ||
23 | 23 | ||
24 | 'notify_url' => '默认的订单回调地址', // 你也可以在下单时单独设置来想覆盖它 | 24 | 'notify_url' => '默认的订单回调地址', // 你也可以在下单时单独设置来想覆盖它 |
25 | ], | 25 | ], |
-
请 注册 或 登录 后发表评论