Live chat method updated , Alipay payment gatewat integrated

This commit is contained in:
Vion
2022-02-14 17:50:30 +08:00
parent bf838eb78a
commit b636872ecd
4 changed files with 60 additions and 32 deletions

View File

@@ -661,8 +661,19 @@ export const getOrderList = (user, status) => {
}
//支付宝支付二维码
export const generateOrderAlipay = (data) => {
return fetch('generateOrderAlipay', data, 'POST' )
}
//支付宝支付二维码
export const generateOrderAlipay = (orderNo, payType) => {
//Dictionary : 1: PC, 2: Mobile
let url = 'generateOrderAlipayPC';
if(payType == 2) {
url = 'generateOrderAlipayPhone'
}
var data = {
orderNo:orderNo
}
return fetch(url, data)
//let ret = { "code": 1, "msg": "操作成功!", "success": true, "data": "<form name=\"punchout_form\" method=\"post\" action=\"https://openapi.alipay.com/gateway.do?charset=utf-8&method=alipay.trade.wap.pay&sign=GK1NjnOYPh%2BHTcTtuZg4YunsBNGPHiyc9BwXLx%2FG4G6Z7S8ILYy2E6VmxkGVwZEwZ1G5PA3u2eZxJN3ysyynL9uwG7L4jGQcOB6I2m1763VBi7euNiyMhimv5AYeXP4KiDtmZNDIAdyi3eKWemKTq74AfS0TTubYvKL8aqhJHTQy2GtYdXA89v53ZeFkXjoqpylwCf2j%2FJWD1nV1eO0a0PB5MFqPaZB5Eif69XkT1TNAt1eZiwIn4AO6yqMFJ41gGN5ymmLQUVcUgc5dxlGkMNgY4FUsI6mFYucQ%2BRPPmuH78YJTFU6VS5E%2BZ%2BCL%2BGLxeJs068n%2BLAPqpPqDbhveYg%3D%3D&return_url=https%3A%2F%2Fshop.royalcanin.com.cn&notify_url=https%3A%2F%2Fshop.royalcanin.com.cn%2Froyalcanin%2Froyalcanin%2Froyalcanin%2FupdateOrderAliPay&version=1.0&app_id=2021003108690157&sign_type=RSA2&timestamp=2022-02-14+15%3A08%3A05&alipay_sdk=alipay-sdk-java-dynamicVersionNo&format=json\">\n<input type=\"hidden\" name=\"biz_content\" value=\"{&quot;out_trade_no&quot;:&quot;02110014172230000&quot;,&quot;total_amount&quot;:&quot;138.0&quot;,&quot;subject&quot;:&quot;皇家宠物食品官方商城&quot;}\">\n<input type=\"submit\" value=\"立即支付\" style=\"display:none\" >\n</form>\n<script>document.forms[0].submit();</script>" };
//ret = JSON.parse(ret);
//return ret;
}