Micro-credit payment, even if the deposit, you still deal with the test phase, can not be officially released. You must submit your orders, delivery notices and other data to the micro-credit system through the program test before you can apply for publication.
Then, because in the micro-letter is to invoke the API in a JS way, you must set up the payment authorization directory in the micro-letter background, and to go to level two three directory, which is a small problem with the MVC framework.
Using MVC, in the development environment, URLs are often native URL formats and cannot be guaranteed to be in the form of a path/
Therefore, a more reliable way is to create subfolders of the entity, such as the system as a whole URL, need to do some transformation.
In addition, the last step, JS call, for HTTPS://GITHUB.COM/DODGEPUDDING/WECHAT-PHP-SDK here to provide the JS library, in the call, you must ensure that the page is loaded after the trigger, That is, the state of the weixinjsbridgeready, because it can be communicated with the micro-trust browser with Jsbridge.
5.24 Repair
You can see the relevant code in the micro-engine.
Copy Code code as follows:
<script type= "Text/javascript" >
Document.addeventlistener (' Weixinjsbridgeready ', function Onbridgeready () {
Weixinjsbridge.invoke (' Getbrandwcpayrequest ', {
' AppId ': ' <?php echo $wOpt [' appId '];? > ',
' TimeStamp ': ' <?php echo $wOpt [' TimeStamp '];? > ',
' Noncestr ': ' <?php echo $wOpt [' noncestr '];? > ',
' Package ': ' <?php echo $wOpt [' package '];? > ',
' Signtype ': ' <?php echo $wOpt [' Signtype '];? > ',
' Paysign ': ' <?php echo $wOpt [' paysign '];? > '
}, function (res) {
if (res.err_msg = = ' Get_brand_wcpay_request:ok ') {
} else {
Alert (' Start a micro-letter payment failure, please check your payment parameters.) The detailed error is: ' + res.err_msg ';
}
History.go (-1);
});
}, False);
</script>