更新支付
This commit is contained in:
parent
dad4b1d1fb
commit
ae94b1368c
@ -63,6 +63,7 @@ class RetailOrderController extends BaseApiController
|
|||||||
* @notes 创建零售订单
|
* @notes 创建零售订单
|
||||||
*/
|
*/
|
||||||
public function createOrder(){
|
public function createOrder(){
|
||||||
|
|
||||||
// d(WeChatConfigService::getPayConfigByTerminal(1));
|
// d(WeChatConfigService::getPayConfigByTerminal(1));
|
||||||
$user=User::where('id',$this->request->userId)->find();
|
$user=User::where('id',$this->request->userId)->find();
|
||||||
$cartId = (Array)$this->request->post('cart_id', []);
|
$cartId = (Array)$this->request->post('cart_id', []);
|
||||||
|
@ -63,7 +63,6 @@ class PaymentLogic extends BaseLogic
|
|||||||
// $order['redirect_url'] = $redirectUrl;
|
// $order['redirect_url'] = $redirectUrl;
|
||||||
// $result = $payService->pay($from, $order);
|
// $result = $payService->pay($from, $order);
|
||||||
$auth = UserAuth::where(['user_id' => $order['uid'], 'terminal' => $terminal])->findOrEmpty();
|
$auth = UserAuth::where(['user_id' => $order['uid'], 'terminal' => $terminal])->findOrEmpty();
|
||||||
|
|
||||||
$order = [
|
$order = [
|
||||||
'out_trade_no' => $paySn,
|
'out_trade_no' => $paySn,
|
||||||
'description' => '商品',
|
'description' => '商品',
|
||||||
@ -76,9 +75,10 @@ class PaymentLogic extends BaseLogic
|
|||||||
],
|
],
|
||||||
'attach' => $from
|
'attach' => $from
|
||||||
];
|
];
|
||||||
|
|
||||||
$config = Config::get('payment');
|
$config = Config::get('payment');
|
||||||
Pay::config($config);
|
Pay::config($config);
|
||||||
$result = Pay::wechat()->mini($order);
|
$result = Pay::wechat()->mini($order)->toArray();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
self::$error = '订单异常';
|
self::$error = '订单异常';
|
||||||
|
@ -47,8 +47,9 @@
|
|||||||
"tinywan/jwt": "^1.9",
|
"tinywan/jwt": "^1.9",
|
||||||
"next/var-dumper": "^0.1.0",
|
"next/var-dumper": "^0.1.0",
|
||||||
"w7corp/easywechat": "^6.8",
|
"w7corp/easywechat": "^6.8",
|
||||||
|
"hyperf/pimple": "~2.2.0",
|
||||||
"yansongda/pay": "^3.6",
|
"yansongda/pay": "^3.6",
|
||||||
"hyperf/pimple": "~2.2.0"
|
"guzzlehttp/guzzle": "^7.8"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-event": "For better performance. "
|
"ext-event": "For better performance. "
|
||||||
|
2
composer.lock
generated
2
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "31c73aec55a41927680c578e301dcb28",
|
"content-hash": "aec3bdabbcd3d781fd7d055878ca0a66",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "aliyuncs/oss-sdk-php",
|
"name": "aliyuncs/oss-sdk-php",
|
||||||
|
@ -30,9 +30,9 @@ return [
|
|||||||
'wechat' => [
|
'wechat' => [
|
||||||
'default' => [
|
'default' => [
|
||||||
// 必填-商户号,服务商模式下为服务商商户号
|
// 必填-商户号,服务商模式下为服务商商户号
|
||||||
'mch_id' => '1635725673',
|
'mch_id' => '1654274867',
|
||||||
// 必填-商户秘钥
|
// 必填-商户秘钥
|
||||||
'mch_secret_key' => 'F6C2A57790C667607D8E8C0C00CCF9B6',
|
'mch_secret_key' => '7E00D167C9793006C93F4FB4CF65BCC2',
|
||||||
// 必填-商户私钥 字符串或路径
|
// 必填-商户私钥 字符串或路径
|
||||||
'mch_secret_cert' => runtime_path().'/cert/c208f16ad08e6d2516e0b73e6d0ab8da.pem',
|
'mch_secret_cert' => runtime_path().'/cert/c208f16ad08e6d2516e0b73e6d0ab8da.pem',
|
||||||
// 必填-商户公钥证书路径
|
// 必填-商户公钥证书路径
|
||||||
|
Loading…
x
Reference in New Issue
Block a user