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-itppay

v1.0.0

Published

itppay plugin for cordova

Downloads

14

Readme

[TOC]

cordova-plugin-itppay

cordova-plugin-itppay是智付云(ITPPay)旗下面向Apache Cordova的移动端支付产品,通过接入本产品,能够快速集成支付宝支付、微信支付以及银联快捷支付,集成过程简单快捷,是专为移动端定制的新一代支付产品。

1. 渠道支撑

智付云为互联网开发者提供了如下支付渠道:

  • 支付宝
  • 微信支付
  • 银联快捷支付

2. 接入流程

2.1 插件安装

cordova plugin add cordova-plugin-itppay --variable ITPPAYPARAM=param

说明:若接入微信支付,则将param替换为在官方微信支付平台申请的appid,否则将param替换为iOS的URL-SCHEME。

2.2 接入准备

进行对接之前,请前往智付云平台联系我们,获取支付Appid以及AppKey。

2.3 接入示例

//生成订单号,该订单号要求商户端唯一
var orderNo = new Date().getTime()+"abc";
//支付参数赋值
var params={
appid: '0000000022',
appkey: 'e7d4c31780d1379c6af38f82e455967c',
subject: 'test goods',
amount: '1',
body: 'testonetest',
mchntOrderNo: orderNo,
notifyUrl: 'http://www.baidu.com',
cpChannel: 'CP分发渠道',
description: '商品描述',
extra: '附加数据',
payStyle: ITPPay.ALIPAY
};
//调起itppay支付模块,回调函数中的参数为JSONObject类型,如{payResultCode:"0",msg:"支付成功"}
ITPPay.dlpay(
params,
function(result){
alert("success,result code:"+result.payResultCode+"result message:"+result.msg);
},
function(result){
alert("failed,result code:"+result.payResultCode+"result message:"+result.msg);
}
);

3. 参数说明

支付参数列表

|名称|类型|含义|最大长度(位)|备注| |:---:|:---:|:---:|:---:|:---:| | amount | string | 订单金额 | 12 | 必填 | | appid | string | 交易发起所属App | 固定 | 必填,在智付云平台上申请获得 | | appkey | string | 交易发起所属AppKey | 固定 | 必填,在智付云平台上申请获得 | | body | string | 商品描述 | 128 | 必填 | | cpChannel | string | CP分发渠道 | 128 | 非必填,由商户自定义 | | description | string | 订单附加描述 | 128 | 非必填 | | extra | string | 附加数据 | 128 | 非必填,以键值对形式存放 | | mchntOrderNo | string | 商户订单号 | 64 | 必填,且商户端必须唯一 | | notifyUrl | string | 订单支付结果通知地址 | 64 | 必填,用于接受订单支付结果通知,必须以http或https | | payStyle | string | 支付方式 | 64 | 必填,值见itppay常量列表 | | subject | string | 商品名称 | 64 | 必填 |

支付通道常量列表

| 常量值 | 支付方式 | |:---:|:---:| | ITPPay.ALIPAY | 支付宝 | | ITPPay.WECHAT | 微信支付 | | ITPPay.UNIONPAY | 银联快捷支付 |

支付结果返回码payResultCode列表

| 返回码 | 含义 | |:---:|:---:| | -1 | 支付失败| | 0 | 支付成功 | | 1 | 用户取消支付 | | 2 | 待支付 |

4. 技术支持

  1. 您可以在智付云平台了解我们的产品,在网站上注册商户,并寻求技术支持。

  2. 您可以在智付云官网的帮助中心查阅相关资料,了解相关问题的解决方案。

  3. 如果您有其他问题,也可以联系我们