帮助中心

请求参数加密算法

  1. 请求参数加密算法

    1. 所有请求参数转换为json后

       {

               "user":"test",

               "order_no":"12345662136414",

               "fiat":"CNY",

               "type":1,

               "exchange_rate":6.42,

               "amount":100,

               "lang":"en",

               "note":"1"

       }


      2. 通过AES (AES-128-CBC), 对json加密


 UHAWEh+SwglPSm95AvasWzZ67JMBX04Psq2gFCyM2pFtYGsaQerp6
VQdscWs+oFw6nGJfM2y632CFUeMJFgU+mMb3BOr2K+6+S3MNuMcCnzOJYq
jQ34aQmCryvBH3KoQdU3rr85Kg0qyIid6IYnB/QcmfC3pX9RTyTzfpFc72
U4=


      3. 得到加密结算后,封装参数进行请求

    {

           "merchant_id":9",

           "params":" UHAWEh+SwglPSm95AvasWzZ67JMBX04Psq2gF

CyM2pFtYGsaQerp6VQdscWs+oFw6nGJfM2y632CFUeMJFgU+mMb3

BOr2K+6+S3MNuMcCnzOJYqjQ34aQmCryvBH3KoQdU3rr85Kg0qyIid6IYnB/QcmfC3pX9RTyTzfpFc72U4="

    }