Ionic1 project WeChat payment, ionic1 Project Payment

Source: Internet
Author: User

Ionic1 Project Payment, ionic1 Project Payment

Reference URL of the plug-in used: https://github.com/xu-li/cordova-plugin-wechat; (logon, sharing, and payment are included here)

Install cordova plugin add cordova-plugin-wechat -- variable wechatappid = YOUR_WECHAT_APPID;

Usage:

Var params = {partnerid: '000000', // merchant id prepayid: 'hangzhou', // prepay id noncestr: '1add1a30ac87aa2db72f57a2375d8fec', // nonce timestamp: '000000 ', // timestamp sign: '0cb01533b8c1ef103065174f50bca001 ', // signed string}; Wechat. sendPaymentRequest (params, function () {alert ("Success") ;}, function (reason) {alert ("Failed:" + reason );});

For some parameter specifications and formats, see

Develop official document https://pay.weixin.qq.com/wiki/doc/api/app/app.php? Chapter = 9_1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.