Ping++ 支付接口对接

Posted AI算法攻城狮

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ping++ 支付接口对接相关的知识,希望对你有一定的参考价值。

一、请求charge对象

package com.bra.modules.util.pingplusplus;

import com.bra.common.utils.SystemPath;
import com.pingplusplus.Pingpp;
import org.springframework.stereotype.Service;

import java.io.File;

/**
 * Created by Afon on 16/4/26.
 */
@Service
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 = apiKey;

        // 设置私钥路径,用于请求签名
        Pingpp.privateKeyPath = p

以上是关于Ping++ 支付接口对接的主要内容,如果未能解决你的问题,请参考以下文章