fym201 / alipay-node-sdk

支付宝新版App支付nodejs版sdk.
MIT License
209 stars 64 forks source link

请问得到参数后怎么处理? #25

Open 383366204 opened 6 years ago

383366204 commented 6 years ago

得到参数后要向支付宝发请求吗?

fym201 commented 6 years ago

是的

conantao commented 6 years ago

是跳转到支付宝网关,还是后台去发起请求支付宝网关,能否在TEST里给一个示例,实在是没搞懂!

383366204 commented 6 years ago

我是获取到参数后直接在前台用windows.location= 跳转到那个支付页面

conantao commented 6 years ago

@383366204 好的,我试试后端跳过去

conantao commented 6 years ago

@383366204 我把lib的props.pagePay // return utl.processParams(params, this.rsaPrivate, this.signType); 改成 var body = utl.processParams(params, this.rsaPrivate, this.signType); return (this.sandbox ? alipay_gate_way_sandbox : alipay_gate_way) + '?' + body;

然后路由拿到地址,res.redirect(地址),可以实现

robinxc commented 5 years ago

是的 获取到 参数 如何发送给支付宝? 用 var appparams = ali.appPay({ subject: 'ceszds123', body: 'sdsdsdffff', outTradeId: outTradeId, timeout: '2m', amount: query.total , goodsType: 0 , qrPayMode: 4 , qrcodeWidth: 256 , passbackParams: '12345678765390' }) res.send(appparams); 报错啊! 参数不对支付宝报

wjyzhixing commented 1 year ago

我这返回app_id=2021004100663540&biz_content=%7B%22body%22%3A%22%E6%B5%8B%E8%AF%95%E5%95%86%E5%93%81%E6%8F%8F%E8%BF%B0%22%2C%22subject%22%3A%22%E6%B5%8B%E8%AF%95%E5%95%86%E5%93%81%22%2C%22out_trade_no%22%3A%221686726701694%22%2C%22timeout_express%22%3A%2210m%22%2C%22total_amount%22%3A%2210.00%22%2C%22product_code%22%3A%22QUICK_WAP_PAY%22%2C%22goods_type%22%3A%220%22%7D&charset=utf-8&format=JSON&method=alipay.trade.wap.pay&sign_type=RSA&timestamp=2023-06-14%2015%3A11%3A41&version=1.0&sign=IPPxSJseyvYOjOh45tB%2BTGMaGngskxiOYZFe5a5b%2FKZQyfWroF7PBw91V6EGyCLTcQGeMSXddNhxCf4N%2F%2FCzUfqG21Dpcp8ynHsmOuZ0J%2BigrGddfBlOGCsk1gZShecfkPCtDwuajibyRjeCbJKGwxUgbIp%2FyN9NUuDSGx3wb18iwNkwChlWVuVfVp%2BX7By6JPGgzArYAygCRHR41tY22MmcaSo7XvOK6hr4O7dPZM%2FxjyIZGDVfpHm%2FhDuWEqLJdjPFiF293O9RTtjde2lyerRrEF11wDuDS1uLyN4fg2kJvaRd%2BfVBQ7EvA7%2BzJOpx7grQY26vVdkMElpVgMnj0w%3D%3D