# 三合一收款二維碼API請(qǐng)求方式 # Method: GET/POST # 請(qǐng)求地址 # https://api./qrpay/api.php # 請(qǐng)求參數(shù) # type //輸出類型 json-img(默認(rèn)img,,選填) alipay //支付寶收款地址,,url編碼后傳遞(必填) vxpay //微信收款地址,,url編碼后傳遞(必填) qqpay //QQ收款地址,,url編碼后傳遞(必填) uin //收款人的QQ(選填) # JSON返回參數(shù) # code //狀態(tài)碼,,200-查詢成功,,201-未輸入?yún)?shù) payUrl //支付網(wǎng)址 # 調(diào)用示例 # https://api./qrpay/api.php?alipay=https://qr.alipay.com/fkx04420ekndgryhkycbl75&vxpay=wxp://f2f0hOo-rzb46DNBib_wZnjxiXqWnpio2ESK&qqpay=https://i.qianbao.qq.com/wallet/sqrcode.htm?m=tenpay&a=1&u=541571321&ac=30800C441FB35C8004E0F99A215F576EE68961EA8F03F516DFC953DDBF44D836&n=Tolerance&f=wallet&uin=541571321 https://api./qrpay/api.php?type=json&alipay=https://qr.alipay.com/fkx04420ekndgryhkycbl75&vxpay=wxp://f2f0hOo-rzb46DNBib_wZnjxiXqWnpio2ESK&qqpay=https://i.qianbao.qq.com/wallet/sqrcode.htm?m=tenpay&a=1&u=541571321&ac=30800C441FB35C8004E0F99A215F576EE68961EA8F03F516DFC953DDBF44D836&n=Tolerance&f=wallet&uin=541571321 # HTML示例 # <img src='https://api./qrpay/api.php?alipay=https://qr.alipay.com/fkx04420ekndgryhkycbl75&vxpay=wxp://f2f0hOo-rzb46DNBib_wZnjxiXqWnpio2ESK&qqpay=https://i.qianbao.qq.com/wallet/sqrcode.htm?m=tenpay&a=1&u=541571321&ac=30800C441FB35C8004E0F99A215F576EE68961EA8F03F516DFC953DDBF44D836&n=Tolerance&f=wallet&uin=541571321'/> # 返回?cái)?shù)據(jù) # 本API無(wú)返回?cái)?shù)據(jù),,直接輸出圖片 # JSON返回?cái)?shù)據(jù) # { 'code': '200', 'payUrl': 'http:///EoOPVXB' } # PHP調(diào)用 # <?php header('Access-Control-Allow-Origin:*'); date_default_timezone_set('PRC'); //$aliUrl = urlencode($_GET['alipay']); //$vxUrl = urlencode($_GET['vxpay']); //$qqUrl = urlencode($_GET['qqpay']); $aliUrl = urlencode('https://qr.alipay.com/fkx04420ekndgryhkycbl75'); $vxUrl = urlencode('wxp://f2f0hOo-rzb46DNBib_wZnjxiXqWnpio2ESK'); $qqUrl = urlencode('https://i.qianbao.qq.com/wallet/sqrcode.htm?m=tenpay&a=1&u=541571321&ac=30800C441FB35C8004E0F99A215F576EE68961EA8F03F516DFC953DDBF44D836&n=Tolerance&f=wallet'); $result = file_get_contents('https://api./qrpay/api.php?alipay='.$aliUrl.'&vxpay='.$vxUrl.'&qqpay='.$qqUrl); $arr = json_decode($result,true); header('Content-Type: image/JPEG'); echo $result; } ?> 注:將以上PHP代碼保存成api.php上傳至服務(wù)器,即可制作自己的API接口 |
|
來(lái)自: 泰山勇士 > 《手機(jī)微信》