修复:更新ios支付接口
This commit is contained in:
@@ -7,8 +7,8 @@ export const ENV = process.env.NODE_ENV || 'development';
|
||||
*/
|
||||
const BASE_URL_MAP = {
|
||||
development: {
|
||||
// MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
|
||||
MAIN: 'https://global.nuttyreading.com/', // 线上
|
||||
MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
|
||||
//MAIN: 'https://global.nuttyreading.com/', // 线上
|
||||
// PAYMENT: 'https://dev-pay.example.com', // 暂时用不到
|
||||
// CDN: 'https://cdn-dev.example.com', // 暂时用不到
|
||||
},
|
||||
|
||||
@@ -370,7 +370,7 @@ export async function getUserContributionByTypeList(current : number, limit : nu
|
||||
*/
|
||||
export async function getIosPayment(transactionId : string, productId : string, orderId : string, receiptData : string, customerOid : string) {
|
||||
const res = await mainClient.request<IApiResponse>({
|
||||
url: 'Ipa/veri/',
|
||||
url: 'Ipa/veri',
|
||||
method: 'POST',
|
||||
data: { transactionId, productId, orderId, receiptData, customerOid}
|
||||
})
|
||||
|
||||
@@ -307,9 +307,12 @@
|
||||
const obj = await getIosPayment(res.transactionIdentifier, res.payment.productid, res.payment.username, res.transactionReceipt, userStore.userInfo.id)
|
||||
console.log(obj, '校验订单')
|
||||
finishTransaction(res)
|
||||
uni.switchTab({
|
||||
url: '/pages/user/index'
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('校验订单失败:', error)
|
||||
// 也需要释放订单,防止再次提交支付窗口拉不起来
|
||||
// 也需要释放订单,防止失败再次提交支付窗口拉不起来
|
||||
finishTransaction(res)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user