Ping++ 聚合支付宝扫条形码支持条形码吗?

a 当前位置:
知名移动支付聚合平台Ping++上线快捷支付和跨境收款
&江卫平 译 o  来源:前瞻网 E299
在支付宝与微信支付的强力影响下,正将线上线下链接,O2O一体化将成为支付未来,移动支付 SDK 服务商 Ping++ 正式进军 PC 端与线下,从而完成以移动应用为点,扩展 Web 页面与线下扫码受理两个方向,如当年支付宝从 Web 迁移到移动端再渗透线下一样,在用户面前,只要一个支付账户就可随手随付,支付将不分类别使用。
移动 SDK 全面升级快捷支付,无需跳转
Ping++ 对他们的产品进行了再次迭代,首先是在用户支付体验上进行升级优化,推出了 App 应用内的快捷支付,让用户免去了使用移动支付需下载多个移动钱包的麻烦,由原来的用户在应用中使用支付选项时跳转到支付独立应用进行支付,转变成用户在 App 中直接支付,缩减了跳转这一环节,用户避免了跳转移动钱包的应用再登录和支付确认的步骤,用户只需在 App 中进行绑定信息,即可轻松使用这种便捷无缝的支付体验。
移动钱包的标杆支付宝较早优化了移动端的快捷支付,在兄弟应用淘宝中,用户随意购物进行消费支付时,均不用跳转支付宝钱包,应用内弹窗即可支付,小额支付均免去输入密码的步骤,支付流程极度简化,用户体验佳。同理,Ping++ 由于升级快捷支付,用户在进行网购支付时使用&快捷支付&减少了支付应用的跳转次数,增强了转化购买率和支付成功率,这都是用户和商家乐见其成的。
功能新增支持国际卡和代扣
中国的繁荣也吸引了国际商务贸易和境外海淘粉儿,除了淘宝、京东外,以兰亭集势为代表的中国电商均吸引着境外消费者的目光,港澳成为中国大陆移动电商 App 在境外最多使用的地区,、美国像中国大陆海淘代购的消费者也逐渐增多,中国跨境电商的未来发展潜力巨大,在移动互联网高度发达的今天,未来会涌现出众多类似于兰亭集势这类的电商应用,而 Ping++ 全面支持国际主流 Visa、MasterCard 卡品牌的支付和受理,让国内的电商、服务应用也可以向境外用户销售商品和提供服务。助力众多小微服务型应用加速国际化,以及优化消费群体的轻松跨境购物体验,让中国制造和中国创造走向世界。
Ping++ 上线代扣功能,可以满足生活类缴费平台 App、打车应用等 App 的个性化付款需求。以前众多、上门清洁等均可通过 Ping++ 代扣功能设置服务扣款,用户资金灵活支配,无需笔笔操作,商户放心,用户方便。
全方位服务移动应用
移动 App 的发展逐渐变得轻量化,而应用内支付变得越来越普遍,无论是增加用户粘性,商业化营收,支付都是为重中之重,如何更好的帮助应用进行支付是 Ping++ 的专业化追求,无论是快捷支付还是外卡、代扣,均是为了向应用开发商提供更全面的功能和多样化的需求落实,让用户在使用应用时感受到最佳体验。
本文来源前瞻网,转载请注明来源!(图片来源互联网,版权归原作者所有)
广告、内容合作请点这里:
前瞻网官方微信
发现趋势,预见未来!
前瞻产业研究院
如何抓准行业的下一个风口?未来5年10年行业趋势如何把握?扫一扫立即关注。
相关阅读RELEVANT
文章评价COMMENT
还可以输入<em class="orange" id="emCmtLen" maxlen="个字
网友评论仅供其表达个人看法,并不表明前瞻网同意其观点或证实其描述。
前瞻产业研究院
Copyright (C)
深圳前瞻资讯股份有限公司 All rights reserved.    增值电信业务经营许可证:工具类服务
编辑部专用服务
作者专用服务
Ping++:聚合支付先行者
2016年初完成千万美元B轮融资,6月1日推出付费服务,12月举办以“变现时代”为主题的分享会,支付聚合SDK公司Ping++在2016年的每一步都走得谨慎而笃定.
2014年Ping++成立,定位移动支付解决方案公司,专门为企业提供集成多个支付渠道的标准接口,应用开发者只需几行代码就能在其应用里嵌入包括支付宝、微信、百度钱包等第三方支付平台.最快只要1个小时,就可以让应用、网站、微信服务号轻松获得支付功能.
年,卷(期):
在线出版日期:
本文读者也读过
相关检索词
万方数据知识服务平台--国家科技支撑计划资助项目(编号:2006BAH03B01)(C)北京万方数据股份有限公司
万方数据电子出版社Ping++ 支付接口对接 - 博客频道 - CSDN.NET
水到渠成,让自己慢慢沉淀
分类:Java
一、请求charge对象
package com.bra.modules.util.
import mon.utils.SystemP
import com.pingplusplus.P
import org.springframework.stereotype.S
import java.io.F
* Created by Afon on 16/4/26.
public class PingPlusPlusService {
* Pingpp 管理平台对应的 API Key
private final static String apiKey = &&;
* Pingpp 管理平台对应的应用 ID
private final static String appId = &&;
* 你生成的私钥路径
private final static String privateKeyFilePath = File.separator+SystemPath.getClassPath()+&res&+ File.separator+&rsa_private_key.pem&;
public static String charge(String orderNo,int amount,String subject,String body,String channel,String clientIP){
// 设置 API Key
Pingpp.apiKey = apiK
// 设置私钥路径,用于请求签名
Pingpp.privateKeyPath = privateKeyFileP
PingPlusCharge charge=new PingPlusCharge(appId);
String chargeString=charge.createCharge(orderNo,amount,subject,body,channel,clientIP);
return chargeS
二、生成charge 对象
package com.bra.modules.util.
import com.pingplusplus.exception.PingppE
import com.pingplusplus.model.C
import java.util.C
import java.util.HashM
import java.util.M
* Created by Afon on 16/4/26.
public class PingPlusCharge {
private String appId;
PingPlusCharge(String appId) {
this.appId = appId;
public String createCharge(String orderNo, int amount, String subject, String body, String channel, String clientIP) {
* 或者直接设置私钥内容
Pingpp.privateKey = &-----BEGIN RSA PRIVATE KEY-----\n& +
&... 私钥内容字符串 ...\n& +
&-----END RSA PRIVATE KEY-----\n&;
Map&String, Object& chargeMap = new HashMap&String, Object&();
chargeMap.put(&amount&, amount);
chargeMap.put(&currency&, &cny&);
chargeMap.put(&subject&, subject);
chargeMap.put(&body&, body);
chargeMap.put(&order_no&, orderNo);
chargeMap.put(&channel&, channel);
Calendar cal = Calendar.getInstance();
cal.add(Calendar.MINUTE, 15);//15分钟失效
long timestamp = cal.getTimeInMillis()/ 1000L;
chargeMap.put(&time_expire&, timestamp);
chargeMap.put(&client_ip&, clientIP); // 客户端 ip 地址(ipv4)
Map&String, String& app = new HashMap&String, String&();
app.put(&id&, appId);
chargeMap.put(&app&, app);
String chargeString =
//发起交易请求
Charge charge = Charge.create(chargeMap);
// 传到客户端请先转成字符串 .toString(), 调该方法,会自动转成正确的 JSON 字符串
chargeString = charge.toString();
} catch (PingppException e) {
e.printStackTrace();
return chargeS
三、webhook
@RequestMapping(value = &webhooks&)
@ResponseBody
public void webhooks ( HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
/*System.out.println(&ping++ webhooks&);*/
request.setCharacterEncoding(&UTF8&);
//获取头部所有信息
Enumeration headerNames = request.getHeaderNames();
String signature=
while (headerNames.hasMoreElements()) {
String key = (String) headerNames.nextElement();
String value = request.getHeader(key);
if(&x-pingplusplus-signature&.equals(key)){
signature=
/*System.out.println(&signature&+signature);*/
// 获得 http body 内容
StringBuffer eventJson=new StringBuffer();
BufferedReader reader=
reader = request.getReader();
eventJson.append(reader.readLine());
}while(reader.read()!=-1);
} catch (IOException e) {
e.printStackTrace();
reader.close();
JSONObject event=JSON.parseObject(eventJson.toString());
boolean verifyRS=
PublicKey publicKey= WebhooksVerifyService.getPubKey();
System.out.println(publicKey);*/
verifyRS=WebhooksVerifyService.verifyData(eventJson.toString(),signature,publicKey);
} catch (Exception e) {
e.printStackTrace();
if(verifyRS) {
/*System.out.println(&签名验证成功&);*/
if (&charge.succeeded&.equals(event.get(&type&))) {
JSONObject data = JSON.parseObject(event.get(&data&).toString());
JSONObject object = JSON.parseObject(data.get(&object&).toString());
String orderId = (String) object.get(&order_no&);
/*System.out.println(&orderId:&+orderId);*/
String channel = (String) object.get(&channel&);
String payType =
int amountFen = (int) object.get(&amount&);
Double amountYuan = amountFen * 1.0 / 100;//ping++扣款,精确到分,而数据库精确到元
Double weiXinInput =
Double aliPayInput =
Double bankCardInput =
if (&wx&.equals(channel)) {
payType = &4&;//支付类型(1:储值卡,2:现金,3:银行卡,4:微信,5:支付宝,6:优惠券,7:打白条;8:多方式付款;9:微信个人,10:支付宝(个人))
weiXinInput = amountY
} else if (&alipay&.equals(channel)) {
payType = &5&;
aliPayInput = amountY
} else if (&upacp&.equals(channel) || &upacp_wap&.equals(channel) || &upacp_pc&.equals(channel)) {
payType = &3&;
bankCardInput = amountY
Double couponI
ReserveVenueCons order = reserveAppVenueConsService.get(orderId);
if (order != null) {
Double orderPrice = order.getShouldPrice();
couponInput = orderPrice - amountY//订单金额-ping++扣款 等于优惠金额
Boolean bool = reserveAppVenueConsService.saveSettlement(order, payType, amountYuan,
0.0, bankCardInput, weiXinInput, aliPayInput, couponInput);
if (bool) {
System.out.println(&订单结算成功&);*/
response.setStatus(200);
//return &订单结算成功&;
/* System.out.println(&订单结算失败&);*/
//return &订单结算失败&;
response.setStatus(500);
/* System.out.println(&该订单不存在&);*/
//return &该订单不存在&;
response.setStatus(500);
/*System.out.println(&签名验证失败&);*/
//return &签名验证失败&;
response.setStatus(500);
}四、WebhooksVerifyService
package com.bra.modules.util.
import mon.utils.SystemP
import mons.codec.binary.Base64;
import java.io.*;
import java.security.*;
import java.security.spec.X509EncodedKeyS
* Created by sunkai on 15/5/19. webhooks 验证签名示例
* 该实例演示如何对 Ping++ webhooks 通知进行验证。
* 验证是为了让开发者确认该通知来自 Ping++ ,防止恶意伪造通知。用户如果有别的验证机制,可以不进行验证签名。
* 验证签名需要 签名、公钥、验证信息,该实例采用文件存储方式进行演示。
* 实际项目中,需要用户从异步通知的 HTTP header 中读取签名,从 HTTP body 中读取验证信息。公钥的存储方式也需要用户自行设定。
该实例仅供演示如何验证签名,请务必不要直接 copy 到实际项目中使用。
public class WebhooksVerifyService {
private static String pubKeyPath = File.separator+ SystemPath.getClassPath()+&res&+ File.separator+&pingpp_public_key.pem&;
private static String eventPath = File.separator+SystemPath.getClassPath()+&res&+ File.separator+&webhooks_raw_post_data.json&;
private static String signPath = File.separator+SystemPath.getClassPath()+&res&+ File.separator+&signature.txt&;
* 验证 webhooks 签名,仅供参考
* @param args
* @throws Exception
public static void main(String[] args) throws Exception {
runDemos();
public static void runDemos() throws Exception {
// 该数据请从 request 中获取原始 POST 请求数据, 以下仅作为示例
String webhooksRawPostData = getStringFromFile(eventPath);
System.out.println(&------- POST 原始数据 -------&);
System.out.println(webhooksRawPostData);
// 签名数据请从 request 的 header 中获取, key 为 X-Pingplusplus-Signature (请忽略大小写, 建议自己做格式化)
String signature = getStringFromFile(signPath);
System.out.println(&------- 签名 -------&);
System.out.println(signature);
boolean result = verifyData(webhooksRawPostData, signature, getPubKey());
System.out.println(&验签结果:& + (result ? &通过& : &失败&));
* 读取文件, 部署 web 程序的时候, 签名和验签内容需要从 request 中获得
* @param filePath
* @throws Exception
public static String getStringFromFile(String filePath) throws Exception {
FileInputStream in = new FileInputStream(filePath);
InputStreamReader inReader = new InputStreamReader(in, &UTF-8&);
BufferedReader bf = new BufferedReader(inReader);
StringBuilder sb = new StringBuilder();
line = bf.readLine();
if (line != null) {
if (sb.length() != 0) {
sb.append(&\n&);
sb.append(line);
} while (line != null);
return sb.toString();
* 获得公钥
* @throws Exception
public static PublicKey getPubKey() throws Exception {
String pubKeyString = getStringFromFile(pubKeyPath);
pubKeyString = pubKeyString.replaceAll(&(-+BEGIN PUBLIC KEY-+\\r?\\n|-+END PUBLIC KEY-+\\r?\\n?)&, &&);
byte[] keyBytes = Base64.decodeBase64(pubKeyString);
// generate public key
X509EncodedKeySpec spec = new X509EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance(&RSA&);
PublicKey publicKey = keyFactory.generatePublic(spec);
return publicK
* 验证签名
* @param dataString
* @param signatureString
* @param publicKey
* @throws NoSuchAlgorithmException
* @throws InvalidKeyException
* @throws SignatureException
public static boolean verifyData(String dataString, String signatureString, PublicKey publicKey)
throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, UnsupportedEncodingException {
byte[] signatureBytes = Base64.decodeBase64(signatureString);
Signature signature = Signature.getInstance(&SHA256withRSA&);
signature.initVerify(publicKey);
signature.update(dataString.getBytes(&UTF-8&));
return signature.verify(signatureBytes);
排名:第3084名
(47)(3)(30)(1)(14)(6)(8)(8)(14)(19)(10)(14)(48)(59)(40)(25)(24)(9)(9)(0)(1)你正在使用的浏览器版本过低,将不能正常浏览和使用知乎。

我要回帖

更多关于 支付宝付款条形码 的文章

 

随机推荐