说明: 这两个demo是APP支付服务端的测试demo,建议大家只配置账号和密钥生成签名进行请求测试即可
声明:demo仅做参考测试使用客户端测试工具强烈推荐各位开发者测试使用
JAVA demo alipaytradeapppay.zip
PHP demo APPPay-UTF-8.zip
注意:如果PHP demo生成请求字符串中带有“&” 请将htmlspecialchars()这个函数去掉 一定要生成以“&”符号链接的请求字符串,否则会报错ali38173
正确请求字符串
alipay_sdk=alipay-sdk-php-20161101&app_id=2016072800109035&biz_content=%7B%22out_trade_no%22%3A%22201712290251256987%22%2C%22total_amount%22%3A0.01%2C%22product_code%22%3A%22QUICK_MSECURITY_PAY%22%2C%22subject%22%3A%22app%E6%B5%8B%E8%AF%95%22%7D&charset=utf-8&format=json&method=alipay.trade.app.pay¬ify_url=https%3A%2F%2Fwww.alipay.com&sign_type=RSA2×tamp=2017-12-29+02%3A51%3A25&version=1.0&sign=HaD12RXDt8rubSpyHaN4n3KeJh3oh1KwQyQSzVg3XJGrtyvA%2BcAZVtJhyJsYwxMj17%2FNwBmF9QGOYiOQt%2FY%2FWvnt%2FwTCJ7wYByLvcxkQjaQR3dThEN3LXLzp%2FZESRPgVCIywkn%2Bk0Os6or2xG8uWljPRZekDxHGaz0ADqug9hJqxnovV1s8R%2BVf5T16DiJf8YSC%2BnXd%2FJxkWB%2Bbm8oJT1UVs5QMdw5e3LoqiQQJNYIHZbwdbkkFc41v1URwaLsdtgjZ6dH11DOE0fJsFMfAo3FbYoOuyG%2F4ZM1zqVpwWkPP0D4SC7NjIIlyv5LpsObV70nceyASd7w7G9mgjo6J3pQ%3D%3D