微信小程序支付功能打通
This commit is contained in:
@@ -49,7 +49,9 @@ export async function payOrder(orderId: string): Promise<'paid' | 'pending'> {
|
||||
});
|
||||
|
||||
if (result.mode === 'jsapi' && result.prepay) {
|
||||
await invokeWechatPay(result.prepay as WechatJsapiPrepayParams);
|
||||
await invokeWechatPay(result.prepay as WechatJsapiPrepayParams, {
|
||||
platform: isMiniWechatEnv() ? 'mini' : undefined,
|
||||
});
|
||||
const paid = await waitOrderPaid(orderId);
|
||||
return paid ? 'paid' : 'pending';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user