File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -99,11 +99,11 @@ export default function Payment() {
9999 http
100100 . post ( `/pay/weixin/transactions/${ type } /${ productId } ` , { mute : true } )
101101 . then ( response => {
102- const { orderId , ...args } = response ;
102+ const { order_id , ...args } = response ;
103103 if ( type === 'jsapi' ) {
104104 function onBridgeReady ( ) {
105105 WeixinJSBridge . invoke ( 'getBrandWCPayRequest' , args , function ( ) {
106- queryOrder ( 'weixin' , orderId ) ;
106+ queryOrder ( 'weixin' , order_id ) ;
107107 } ) ;
108108 }
109109 if ( typeof WeixinJSBridge == 'undefined' ) {
@@ -126,12 +126,12 @@ export default function Payment() {
126126 return ;
127127 }
128128 if ( type === 'h5' ) {
129- location . href = `${ args . h5_url } &redirect_url=${ encodeURIComponent ( location . href + '&type=weixin&orderId=' + orderId ) } ` ;
129+ location . href = `${ args . h5_url } &redirect_url=${ encodeURIComponent ( location . href + '&type=weixin&orderId=' + order_id ) } ` ;
130130 return ;
131131 }
132132 if ( type === 'native' ) {
133+ codeOrderId . current = order_id ;
133134 setCode ( args . code_url ) ;
134- codeOrderId . current = orderId ;
135135 return ;
136136 }
137137 } )
@@ -182,7 +182,7 @@ export default function Payment() {
182182 } , [ orderIdFromPay , orderType ] ) ;
183183
184184 useEffect ( ( ) => {
185- if ( ! code || ! codeOrderId . current ) {
185+ if ( ! code ) {
186186 return ;
187187 }
188188
You can’t perform that action at this time.
0 commit comments