$attributes = [
'trade_type' => 'JSAPI', // JSAPI,NATIVE,APP...
'body' => '用户订单',
'detail' => 'iPad mini 16G 白色',
'out_trade_no' => time(),
'total_fee' => 1,
'notify_url' => 'http://disook.com/cart', // 支付结果通知网址,如果不设置则会使用配置里的默认地址
//'sub_openid' => $user->openid, // 如果传入sub_openid, 请在实例化Application时, 同时传入$sub_app_id, $sub_merchant_id
// ...
];
$order = new \EasyWeChat\Payment\Order($attributes);
$result = $this->wechat->payment->prepare($order);
dd($result);
if ($result->return_code == 'SUCCESS' && $result->result_code == 'SUCCESS'){
$prepayId = $result->prepay_id;
}
返回签名错误