GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - toventang/cordova-plugin-crosspay: cordova跨平台支付插件,现支持ios、android。

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
scripts
scripts
 
 
src
src
 
 
www
www
 
 
.gitattributes
.gitattributes
 
 
README.md
README.md
 
 
package.json
package.json
 
 
plugin.xml
plugin.xml
 
 

Repository files navigation

cordova-plugin-crosspay

cordova跨平台支付插件,现支持ios、android的微信支付及支付宝支付。
支持 cordova 7,在 cordova 6 环境下请安装 0.0.2 版本。

安装方法

cordova plugin add https://github.com/toventang/cordova-plugin-crosspay --save
或
cordova plugin add cordova-plugin-crosspay

支付所需的APPID等都由后台接口返回,不放在APP代码里。

使用方法

declare var cordova:any;

export class HomePage {
  constructor(){}

  aliPay(){
    // 参数参照支付宝官方开发文档
    cordova.plugins.crosspay.aliPay(
        {
          appId: "后台接口返回的APPID",
          order: "后台返回的orderStr"
        },
        function() {
          // 支付成功
        },
        function(error) {
          // 支付失败
          console.log('错误描述', error);
        }
      );
  }
  
  wechatPay(){
    // 参数参照微信支付官方开发文档
    cordova.plugins.crosspay.wechatPay(
        {
          appId: "后台接口返回的APPID",
          partnerId: "商户ID",
          prepayId: "预付ID",
          nonceStr: "noncestr"
          timeStamp: "timeStamp",
          sign: "sign"
          package: "Sign=WXPay"
        },
        function() {
          // 支付成功
        },
        function(error) {
          // 支付失败
          console.log('错误描述', error);
        }
      );
  }
}

About

cordova跨平台支付插件,现支持ios、android。

Topics

android-paymentcordovacordova-plugin-crosspayios-payment

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.