Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

payjs支付生成二维码出错 404 #151

Closed
imnpc opened this issue Nov 26, 2019 · 4 comments
Closed

payjs支付生成二维码出错 404 #151

imnpc opened this issue Nov 26, 2019 · 4 comments

Comments

@imnpc
Copy link

imnpc commented Nov 26, 2019

支付模式 native
支付页面 x.com/qrcode/pay/20191126112738w6tdQ/payjs/d2VpeGluOi8vd3hwYXkvYml6cGF5dXJsP3ByPUI0djdYVWo=
支付页面报错 404
/qrcode/pay/20191126112738w6tdQ/payjs 这个页面是正常的
看了下 调用的方法里面 最后一个参数是模板页

function qrcode(Request $sp16eb02, $sp88df5b, $spc04db9)
    {
        $sp6f156a = \App\Order::whereOrderNo($sp88df5b)->with('product')->first();
        if ($sp6f156a == null) {
            return self::renderResultPage($sp16eb02, array('msg' => '订单未找到,请重试'));
        }
        if ($sp6f156a->product_id !== \App\Product::ID_API && $sp6f156a->product == null) {
            return self::renderResultPage($sp16eb02, array('msg' => '商品未找到,请重试'));
        }
        return view('pay/' . $spc04db9, array('pay_id' => $sp6f156a->pay_id, 'name' => $sp6f156a->product->name . ' x ' . $sp6f156a->count . '', 'amount' => $sp6f156a->paid, 'qrcode' => $sp16eb02->get('url'), 'id' => $sp88df5b));
    }

但是payjs支付接口最后一个参数是生成二维码的

header('location: /qrcode/pay/' . $sp178dbe . '/payjs/' . base64_encode($spa8b001['code_url']));

payjs生成订单是正确的

@Tai7sy
Copy link
Owner

Tai7sy commented Nov 26, 2019

@Tai7sy
Copy link
Owner

Tai7sy commented Nov 26, 2019

可以将

header('location: /qrcode/pay/' . $sp178dbe . '/payjs/' . base64_encode($spa8b001['code_url']));

修改为

header('Location: /qrcode/pay/' . $sp178dbe . '/payjs?url=' . urlencode($spa8b001['code_url']));

@imnpc
Copy link
Author

imnpc commented Nov 26, 2019

可以扫码支付了 但是页面请求查询这个接口 /api/qrcode/query/payjs 报错支付方式错误

@Tai7sy
Copy link
Owner

Tai7sy commented Nov 30, 2019

新版本已经修复此BUG

@Tai7sy Tai7sy closed this as completed Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants