PHP micro-channel public number to pay the pop-up "NaN: undefined" Solution

After recent study php development micro-channel payment, download the demo from the micro-micro-channel pay an official letter, the test is always pops up NaN: Undefined such a mistake. But this does not affect the operation of pay after successful payment can still get to pay the normal state, and jump, output and other operations.

Micro-channel pay official demo Download: https: //pay.weixin.qq.com/wiki/doc/api/jsapi.php chapter = 11_1 (including php, java, .net C # version three)?

Specific performance:

1. Under a single time, and no pop NaN: undefined.
2. Go to the payment page before clicking the payment button, will pop up NaN: undefined.
3. But do not affect the payment. Click to pay BTN, or call up the payment window.

If the quick point, it will pull up the first payment screen, and other payment page to complete the return just when will see the pop-up "NaN: undefined", etc. Click OK after the pop disappear, will be paid a set after the successful operation php, such as jumps, output.

Before the payment screen:

wxpaynanSuccessful payment interface:wxpayok

Xie bit suspect, is not the same interfaces and micro-channel basis, there is a debug: true this debugging directly off, there is no? Check it again, and did not find this. Internet looking around and found appear NaN: undefined JS is usually due to appear in character and numeric variables are not translated correctly due. NaN is Not A Number of meaning, so we need to troubleshoot all possible numeric variable in JS to see if it is not defined as a string?

notanumber

Finally found here, the easiest way is to comment out the line alert, hateful NaN: Undefined error will not happen again!

Guess you like

Origin www.cnblogs.com/SofuBlue/p/11466750.html
Recommended