注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > API类目 > 飞猪机票前台类目

alitrip.flight.external.alipay.encrypt (支付宝小程序明文加密)

支付宝小程序明文加密

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
alipay_encrypt_req AlipayEncryptReq 必须 入参结构体
  • └ source_content
  • String
  • 必须
  • 123456
  • 待加密明文
  • └ external_applet_biz_code
  • String
  • 必须
  • shanxing
  • 业务代码

响应参数

名称 类型 示例值 描述
result String ****** 明文加密后的密文
is_success Boolean true 是否请求成功
error_msg String error_msg_0 请求失败描述

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripFlightExternalAlipayEncryptRequest req = new AlitripFlightExternalAlipayEncryptRequest();
AlitripFlightExternalAlipayEncryptRequest.AlipayEncryptReq obj1 = new AlitripFlightExternalAlipayEncryptRequest.AlipayEncryptReq();
obj1.setSourceContent("123456");
obj1.setExternalAppletBizCode("shanxing");
req.setAlipayEncryptReq(obj1);
AlitripFlightExternalAlipayEncryptResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alitrip_flight_external_alipay_encrypt_response>
    <result>******</result>
    <is_success>true</is_success>
    <error_msg>error_msg_0</error_msg>
</alitrip_flight_external_alipay_encrypt_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部