Convergence payment APP + technical solution introduction

1. Timing diagram
insert image description here

Merchants need two steps to use UnionPay's APP+ solution:
Step 1:
Request the payment interface of UnionPay, https://www.joinpay.com/trade/uniPayApi.action
to obtain the returned key parameter rc_Result.
Step 2:
The Merchant APP invokes the mini program by using the return parameters of Convergence Payment according to the SDK specification of WeChat.
(See below for details)
Ps: Subsequent consumers' payment operations on the Mini Program do not need to be processed by merchants. 2. Interface parameter description

  1. Convergence: payment interface
    Important request parameter
    q1_FrpCode: WEIXIN_APP3
    q7_AppId: upload and report the appid of the applet (that is, the applet that connects to Convergence APP + payment)
    important return parameter
    rc_Result: This will be used later when the APP calls the applet
    Example:
{ "r7_TrxNo":"100219083040543045", "rb_CodeMsg":"", 
"r2_OrderNo":"LJ0620190830185403646565", "r3_Amount":"0.01", 
"r6_FrpCode":"WEIXIN_APP3", "rc_Result":"
{"order_amout":"0.01","payee_name":小微", 
"original_id":"gh_2e171ff94d82","trx_no":"100219090545163135",
"product_name":" 旺仔","app_id":"d3hhM2I0OWFlYWRjYzg3Mjk4"}", 
"ra_Code":100, "hmac":"B3116B12B5F593B9F4046D48FA02BBD2", 
"rd_Pic":"", "r4_Cur":"1", "r0_Version":"1.0", 
"r1_MerchantNo":"888108700005609"
}
  1. WeChat: APP Launch Mini Program
    WeChat officially provides an SDK for developers to launch mini programs in their APP. The specific WeChat document address is as follows:
    https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Launching_a_Mini_Program/Android_Development_example.html
    PS: WeChat’s SDK currently only supports native APP launch, so apps packaged in H5 need
    Use native page development on please pay pages.

1) Before developing Android , you need to download the Android Development Kit (SDK), download it from the address above, and integrate and merge the Auto Market SDK
according to the official process of WeChat . Call interface: WXLaunchMiniProgram The mobile application jumps to the mini program. The calling parameters are as follows: String appId = “wxd930ea5d5a258f4f”; // Fill in the AppId of the mobile application (App), and the AppID of the non-mini program IWXAPI api = WXAPIFactory.createWXAPI(context, appId) ; WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req(); req.userName = “gh_d43f693ca31f”; // Fill in the original id of the applet, corresponding to rc_Result.original_id req.path = path; Specific splicing, see the example below









//Example【Important】: (Need to combine the parameters returned by rc_Result)
Path="/pages/payIndex/payIndex?rc_result={"order_amout":"0.01","payee_name":"Yingzi Fashion"
,"original_id":" gh_2e171ff94d82", "trx_no": "100219090444567177", "product_desc": "Wangzai Brand", "app_id": "d3hhM2I0OWFlYWRjYzg3Mjk4"}"

2) iOS
The code example for launching the applet is as follows: (The parameter specification is shown above)
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = userName; //The username of the launched applet
launchMiniProgramReq.path = path; The path that can be used to launch the mini program page,
launchMiniProgramReq.miniProgramType = miniProgramType; //The type of the mini program
return [WXApi sendReq:launchMiniProgramReq];

Guess you like

Origin blog.csdn.net/withkai44/article/details/130850019