npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-pingpp

v1.0.5

Published

pingpp cordova/phonegap plugin

Downloads

6

Readme

Cordova Plugin Pingpp

Ping++ 是为移动端应用以及 PC 网页量身打造的下一代支付系统,通过一个 SDK 便可以同时支持移动端以及 PC 端网页的多种主流支付渠道,你只需要一次接入即可完成多个渠道的接入。 Ping++ SDK 包括 Client SDK 和 Server SDK 两部分,支持主流的七种后端开发语言,适配了 Android,iOS 和 HTML5 三种移动端平台以及 PC 端网页。

支持以下渠道支付

  1. 支付宝 (alipay)
  2. 微信支付 (wx)
  3. 银联支付(upacp)
  4. QQ钱包 (qpay)
  5. 招行一网通 (cmb_wallet)

插件安装

cordova plugin add https://git.coding.net/pingplusplus/pingpp-cordova.git

若上述方法安装失败,可使用:

cordova plugin add git+https://git.coding.net/pingplusplus/pingpp-cordova.git

Ping++ 标准版使用方法

使用方法

/**
 * 调用支付
 * @param charge 服务端返回的 charge
 * @param function 支付结果回调 (result, error)
 */
Pingpp.createPayment(charge, function (result, error) {
    alert(result);
    alert(error);
});

// 开启debug模式
Pingpp.setDebugMode(enabled) // [true] or [false];

/**
 * 获取当前SDK的版本号
 * @param Function successCallback (version)
 */
Pingpp.getVersion(function(version){
    alert("当前SDK版本号是:" + version);
});

iOS 回调结果配置

在 plugin.xml 中填入自己的 url_scheme, 如:

<array>
    <!-- 替换自己的 URL-SCHEME -->
    <string>$PINGPP_URL_SCHEME</string>
</array>

接收并处理交易结果

渠道为百度钱包或者渠道为支付宝但未安装支付宝钱包时,交易结果会在调起插件时的 Completion 中返回。渠道为微信、支付宝(安装了支付宝钱包)、银联或者测试模式时,请实现 UIApplicationDelegate 的 - application:openURL:xxxx: 方法: 打开 AppDelegate.m,添加一个函数来触发支付完成后的回调

- (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)url
            options:(NSDictionary *)options {
    BOOL canHandleURL = [Pingpp handleOpenURL:url withCompletion:nil];
    return canHandleURL;
}

官方 SDK

问题

问题

**关于如何使用 SDK 请参考 开发者中心 **