PayproPaypro
  • ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia
  • ๐Ÿ‡ต๐Ÿ‡ฐ Pakistan
  • ๐Ÿ‡ป๐Ÿ‡ณ Vietnam
  • ๐Ÿ‡ต๐Ÿ‡ญ Philippines
  • ๐Ÿ‡ฐ๐Ÿ‡ช Kenya
  • ๐Ÿ‡ช๐Ÿ‡ฌ Egypt
  • ๐Ÿ‡ง๐Ÿ‡ท Brazil
  • ๐Ÿ‡ฒ๐Ÿ‡ฝ Mexico
  • ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia
  • ๐Ÿ‡ต๐Ÿ‡ฐ Pakistan
  • ๐Ÿ‡ป๐Ÿ‡ณ Vietnam
  • ๐Ÿ‡ต๐Ÿ‡ญ Philippines
  • ๐Ÿ‡ฐ๐Ÿ‡ช Kenya
  • ๐Ÿ‡ช๐Ÿ‡ฌ Egypt
  • ๐Ÿ‡ง๐Ÿ‡ท Brazil
  • ๐Ÿ‡ฒ๐Ÿ‡ฝ Mexico
  • Mexico

    • Overview
    • Error Code
    • Payment API
    • PaymentPage API
    • Payout API
    • Payment Query API
    • Payout Query API
    • Balance Inquiry API
    • Payment Notify API
    • Bank List

Overview

    Brief description

    • This section describes the parameters that need to be prepared before docking

    Trader number

    • The sandbox account information is provided by the operator, please contact the operator.
    • The official environment account will be opened after the sandbox environment is integrated. The following account-related information can be obtained from the dashboard.
    ParameterDescription
    Merchant dashboardhttp://business.paypro.tech/admin/login
    Merchant NOA 10-digit merchant ID (Example: 0000001)
    Merchant Bdashboard AccountUsually logs in via email
    Merchant dashboard PasswordCheck the designated email for the password; it is recommended to change it after logging in
    Merchant KeyCan be obtained from the homepage after logging into the system

    API Request Address

    • Sandbox URL๏ผšhttps://openapi-sa-test.paypro.tech/mex-pay
    • Sandbox merchant number: Please contact the business development officer
    • Sandbox key: Please contact the business development officer
    • Production environment address: Please contact the business development officer
    When processing the API response, first check whether the first layer indicates a successful request. 
    Only if the request is successful should you proceed to examine the second layer for the transaction result.
    
    

    Signature Logic

    • 1๏ผšThe API request must include the sign parameter, following the signing logic. Step 1: Arrange all request parameters in ascending order based on the first letter of the parameter names (a-z) and concatenate them in the format:key1=value1key2=value2......
    List<String> keys = Lists.newArrayList(map.keySet());
    Collections.sort(keys);
    StringBuilder request = new StringBuilder();
    for (String key : keys) {
      String value = String.valueOf(map.get(key));
      if (StrUtil.isNotEmpty(value) && !"sign".equals(key)) {
        request.append(key).append("=").append(value);
      }
    }
    log.error("encrypt string : {}", request);
    
    

    Step2๏ผšUse the app secret as a salt to perform MD5 encryption. SIGN_TYPE๏ผšMD5 CHARSET_NAME๏ผšUTF-8 salt๏ผšPrivate key

    try {
     MessageDigest md5 = MessageDigest.getInstance(SIGN_TYPE);
     md5.update((str + salt).getBytes(CHARSET_NAME));
     return byte2hex(md5.digest());
    } catch (Exception e) {
     if (log.isDebugEnabled()) {
       log.debug("md5 cryptographic anomaly", e);
     }
    }
    return "";
    
    
    public static String byte2hex(byte\[\] bytes) {  
      StringBuilder sign = new StringBuilder();  
      for (int i = 0; i < bytes.length; i++) {  
        String hex = Integer.toHexString(bytes\[i\] & 0xFF);  
        if (hex.length() == 1) {  
          sign.append("0");  
        }  
        sign.append(hex.toLowerCase());  
      }  
      return sign.toString();  
    }
    
    • 2๏ผšThe requested merchant number is required to be added in the header submission.
    • 3: IP whitelist needs to be added during the testing process, please contact paypro business for this operation.

    Request Parameter Getting[timestamp]

    
    public static Long getMilliByTime(LocalDateTime time) {
     return time.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
    }
    
    
    Last Updated:
    Contributors: wsc
    Next
    Error Code