![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
wang.imchao.plugin.alipay
Advanced tools
还在开发中,待加入订单信息
使用git命令将插件下载到本地,并标记为$CORDOVA_PLUGIN_DIR
git clone https://github.com/charleyw/cordova-plugin-alipay.git && cd cordova-plugin-alipay && export CORDOVA_PLUGIN_DIR=$(pwd)
修改$CORDOVA_PLUGIN_DIR/plugin.xml,将
<preference name="private_key" value="$PRIVATE_KEY" />
改成
<preference name="PRIVATE_KEY" value="你生成的private key"/>
**注意**:总共有两处
3. 安装
cordova plugin add $CORDOVA_PLUGIN_DIR --variable PARTNER_ID=[你的商户PID可以在账户中查询] --variable SELLER_ACCOUNT=[你的商户支付宝帐号]
window.alipay.pay({
tradeNo: tradeNo,
subject: "测试标题",
body: "我是测试内容",
price: 0.02,
fromUrlScheme: "demoScheme://afterPaymentSuccess",
notifyUrl: "http://your.server.notify.url"
});
调用pay
方法会打开支付宝支付页面进行支付(如果有安装支付宝钱包的话会打开支付宝钱包),支付完成之后会跳回到程序,会跳到fromUrlScheme
定义的程序页面,
如上面的例子会返回你的程序的/afterPaymentSuccess
路径所定义的页面,并且支付结果会附加到这个url后面。你可以在程序中调试来确定该怎么处理。
正常情况下,应该是可以使用下面的命令安装的
cordova plugin add $CORDOVA_PLUGIN_DIR --variable PARTNER_ID=[你的商户PID可以在账户中查询] --variable SELLER_ACCOUNT=[你的商户支付宝帐号] --variable PRIVATE_KEY=[你生成的private key]
但是因为private key里面有时会有等号(=),而当前版本的cordova(v5.1.1)有一个bug,当参数中有等号(=)的时候就不能正常解析变量值了。这个bug已经在cordova的master上已经修好了,但是还没有发布。
© 2015 Wang Chao. This code is distributed under the MIT license.
FAQs
支付宝支付插件,alipay payment
The npm package wang.imchao.plugin.alipay receives a total of 1 weekly downloads. As such, wang.imchao.plugin.alipay popularity was classified as not popular.
We found that wang.imchao.plugin.alipay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.