|
@@ -95,7 +95,18 @@ class Pay extends Base
|
|
* @ApiReturnParams (name="prepay_id", type="string", description="统一支付接口返回的prepay_id参数值,提交格式如:package: 'prepay_id=' + data.prepay_id")
|
|
* @ApiReturnParams (name="prepay_id", type="string", description="统一支付接口返回的prepay_id参数值,提交格式如:package: 'prepay_id=' + data.prepay_id")
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
- public function unify()
|
|
|
|
|
|
+ public function unify(){
|
|
|
|
+ Hook::add('paid_success', 'addons\\unishop\\behavior\\Order');
|
|
|
|
+
|
|
|
|
+ $orderId = $this->request->request('order_id', 0);
|
|
|
|
+ $orderId = Hashids::decodeHex($orderId);
|
|
|
|
+
|
|
|
|
+ $orderModel = new \addons\unishop\model\Order();
|
|
|
|
+ $order = $orderModel->where(['id' => $orderId])->find();
|
|
|
|
+
|
|
|
|
+ Hook::listen('paid_success', $order, ['pay_type' => \addons\unishop\model\Order::PAY_WXPAY]);
|
|
|
|
+ }
|
|
|
|
+ public function unify_old()
|
|
{
|
|
{
|
|
|
|
|
|
$orderId = $this->request->request('order_id', 0);
|
|
$orderId = $this->request->request('order_id', 0);
|