Closed wanghaifeng closed 6 years ago
代码基本上和example里的代码一样,放到moodle里框架里
我的URL结果:
https://openapi.alipaydev.com/gateway.do?app_id=2016073100130857&biz_content=%7B%22out_trade_no%22%3A%2215139485565a3d058c1e952%22%2C%22product_code%22%3A%22FAST_INSTANT_TRADE_PAY%22%2C%22total_amount%22%3A%222000%22%2C%22subject%22%3A%22%E8%B4%AD%E4%B9%B0%E8%AF%BE%E7%A8%8B%3A+%E4%B8%BB%E4%BB%98%E8%B4%B9%E8%AF%BE%E7%A8%8B%22%2C%22body%22%3A%22haifeng%40nsshell.com+%E8%B4%AD%E4%B9%B0+%E4%B8%BB%E4%BB%98%E8%B4%B9%E8%AF%BE%E7%A8%8B%22%2C%22passback_params%22%3A%22asdf%22%2C%22goods_type%22%3A%221%22%2C%22timeout_express%22%3A%229m%22%7D&charset=UTF-8&format=JSON&method=alipay.trade.page.pay&notify_url=http%3A%2F%2Fmoodle.local%2Fenrol%2Fmaike%2Fnotify.php&return_url=http%3A%2F%2Fmoodle.local%2F&sign_type=RSA2&timestamp=2017-12-22+21%3A16%3A38&version=1.0&sign=OgHoJ3gDKkzyAf7%2Fv3vztPICaA%2F4Qutr5gmezKe840cuHAN33JpQbg%2BdLladT89gLrQ3bvTyrIVUbuHnUVXWxLlRyOtCF5uB%2FKg%2BEdOQChZaBoZ9S9i5so1phR1U03XPgWeP%2F6t5BKFOwyTcOUy3dXM71fCVbt3bVGKox1vV%2B1tzReXG08gEJeOM1RelRMTglavqw6hCI7IJn%2FAwWbrzFRiVXsaXE8WAjUXv5eJXVhBLDStlqnzruR63EXyC1fup1s7TEUkVdOJ7vSiH2ma9za3XI6ZZ6M687pxFT4yHZAnOvCVOv%2F2eaWPKhDHp%2FpiGkmBlYnXYUZLFYh8re6wh9Q%3D%3D
https://openapi.alipaydev.com/gateway.do?app_id=2016073100130857&biz_content=%7B%22out_trade_no%22%3A%2215139488564152%22%2C%22product_code%22%3A%22FAST_INSTANT_TRADE_PAY%22%2C%22total_amount%22%3A%220.01%22%2C%22subject%22%3A%22%E6%B5%8B%E8%AF%95%E6%94%AF%E4%BB%98%E5%AE%9D%E7%94%B5%E8%84%91%E7%BD%91%E7%AB%99%E6%94%AF%E4%BB%98%22%2C%22body%22%3A%22ali+web+pay%22%2C%22passback_params%22%3A%22123123%22%2C%22goods_type%22%3A%221%22%2C%22timeout_express%22%3A%2210m%22%7D&charset=UTF-8&format=JSON&method=alipay.trade.page.pay¬ify_url=https%3A%2F%2Fhelei112g.github.io%2Fv1%2Fnotify%2Fali&return_url=https%3A%2F%2Fhelei112g.github.io%2F&sign_type=RSA2×tamp=2017-12-22+21%3A20%3A56&version=1.0&sign=Z%2FO30s8X9%2FFB%2FNgS5ZXL%2Fq%2BRrcPti9j89tshN%2BvVDHA%2Bz0Y8xz%2BpLsnXR%2B3jZsiF0ILgmPfbRALA9ICczNrqwusAN0Hr3mKvvlfZSod5vVZ9UotrV39tQ8sdrw5Is8sCqRr%2BDq1AkuzEf4h4pFYpbDJGMF3vyoSsQ0WDg9bReihYGCoEIjBCOoELm4Ed8KBTcVq%2BWQ9HHXf30B8Jwf%2Fk9VY5nI8KRlPzVUV5VuYUezqO1X7SmuundmB6BYCU9nfRi6PqNitOp7zxxddz19aLxSLPcHSj9Wc0cU8WcBKWAm%2FUkD%2Fz8YDqaQovq1q9tYJBUMfV6Fkmv3EC19ah1UK6eA%3D%3D
问题解决,原来在moodle的 lib/setup.php里,设置了 ini_set('arg_separator.output', '& amp;'); 通过添加 ini_set('arg_separator.output', '&'); 然后代码后修复回 ini_set('arg_separator.output', '& amp;'); 解决。
代码基本上和example里的代码一样,放到moodle里框架里
我的URL结果:
https://openapi.alipaydev.com/gateway.do?app_id=2016073100130857&biz_content=%7B%22out_trade_no%22%3A%2215139485565a3d058c1e952%22%2C%22product_code%22%3A%22FAST_INSTANT_TRADE_PAY%22%2C%22total_amount%22%3A%222000%22%2C%22subject%22%3A%22%E8%B4%AD%E4%B9%B0%E8%AF%BE%E7%A8%8B%3A+%E4%B8%BB%E4%BB%98%E8%B4%B9%E8%AF%BE%E7%A8%8B%22%2C%22body%22%3A%22haifeng%40nsshell.com+%E8%B4%AD%E4%B9%B0+%E4%B8%BB%E4%BB%98%E8%B4%B9%E8%AF%BE%E7%A8%8B%22%2C%22passback_params%22%3A%22asdf%22%2C%22goods_type%22%3A%221%22%2C%22timeout_express%22%3A%229m%22%7D&charset=UTF-8&format=JSON&method=alipay.trade.page.pay&notify_url=http%3A%2F%2Fmoodle.local%2Fenrol%2Fmaike%2Fnotify.php&return_url=http%3A%2F%2Fmoodle.local%2F&sign_type=RSA2&timestamp=2017-12-22+21%3A16%3A38&version=1.0&sign=OgHoJ3gDKkzyAf7%2Fv3vztPICaA%2F4Qutr5gmezKe840cuHAN33JpQbg%2BdLladT89gLrQ3bvTyrIVUbuHnUVXWxLlRyOtCF5uB%2FKg%2BEdOQChZaBoZ9S9i5so1phR1U03XPgWeP%2F6t5BKFOwyTcOUy3dXM71fCVbt3bVGKox1vV%2B1tzReXG08gEJeOM1RelRMTglavqw6hCI7IJn%2FAwWbrzFRiVXsaXE8WAjUXv5eJXVhBLDStlqnzruR63EXyC1fup1s7TEUkVdOJ7vSiH2ma9za3XI6ZZ6M687pxFT4yHZAnOvCVOv%2F2eaWPKhDHp%2FpiGkmBlYnXYUZLFYh8re6wh9Q%3D%3D
https://openapi.alipaydev.com/gateway.do?app_id=2016073100130857&biz_content=%7B%22out_trade_no%22%3A%2215139488564152%22%2C%22product_code%22%3A%22FAST_INSTANT_TRADE_PAY%22%2C%22total_amount%22%3A%220.01%22%2C%22subject%22%3A%22%E6%B5%8B%E8%AF%95%E6%94%AF%E4%BB%98%E5%AE%9D%E7%94%B5%E8%84%91%E7%BD%91%E7%AB%99%E6%94%AF%E4%BB%98%22%2C%22body%22%3A%22ali+web+pay%22%2C%22passback_params%22%3A%22123123%22%2C%22goods_type%22%3A%221%22%2C%22timeout_express%22%3A%2210m%22%7D&charset=UTF-8&format=JSON&method=alipay.trade.page.pay¬ify_url=https%3A%2F%2Fhelei112g.github.io%2Fv1%2Fnotify%2Fali&return_url=https%3A%2F%2Fhelei112g.github.io%2F&sign_type=RSA2×tamp=2017-12-22+21%3A20%3A56&version=1.0&sign=Z%2FO30s8X9%2FFB%2FNgS5ZXL%2Fq%2BRrcPti9j89tshN%2BvVDHA%2Bz0Y8xz%2BpLsnXR%2B3jZsiF0ILgmPfbRALA9ICczNrqwusAN0Hr3mKvvlfZSod5vVZ9UotrV39tQ8sdrw5Is8sCqRr%2BDq1AkuzEf4h4pFYpbDJGMF3vyoSsQ0WDg9bReihYGCoEIjBCOoELm4Ed8KBTcVq%2BWQ9HHXf30B8Jwf%2Fk9VY5nI8KRlPzVUV5VuYUezqO1X7SmuundmB6BYCU9nfRi6PqNitOp7zxxddz19aLxSLPcHSj9Wc0cU8WcBKWAm%2FUkD%2Fz8YDqaQovq1q9tYJBUMfV6Fkmv3EC19ah1UK6eA%3D%3D