master
wangning 7 years ago
parent e3c7927bab
commit c72c0936d8

@ -795,6 +795,44 @@
* @apiError (ERROR_CODE) ORDER_PAID 订单已支付
*
*/
/**
* @api {PUT} /api/v1.0/gateway/partners/{partner_code}/app_orders/{order_id} 创建微信SDK订单
* @apiName WechatSDK
* @apiDescription
* 用于移动端APP调用微信SDK支付调用API创建订单得到微信SDK调用参数将参数传递给SDK拉起微信支付并由微信客户端直接返回支付结果
* <b>强烈建议获得支付结果后再调用RoyalPay订单查询API确认完成支付后再进行后续流程避免因超时自动撤单导致资金损失</b><br>
* <img src="img/sdk_wechat_api_payment_cn.png"><br>
*
* @apiVersion 1.0.0
* @apiGroup SDKPayment
* @apiHeader Accept application/json
* @apiHeader Content-Type application/json
* @apiParam (PathVariable) {String} partner_code 必填商户编码由4位大写字母或数字构成
* @apiParam (PathVariable) {String} order_id 必填商户支付订单号要求同一商户唯一
* @apiUse Sign
* @apiParam (JSON) {String} description 必填订单标题最大长度128字符超出自动截取
* @apiParam (JSON) {int} price 必填金额单位为货币最小单位例如使用100表示AUD1.00
* @apiParam (JSON) {String=AUD,CNY} currency=AUD 币种代码
* @apiParam (JSON) {String} notify_url 支付通知url详见支付通知api不填则不会推送支付通知
* @apiParam (JSON) {String} operator 操作人员标识
* @apiParam (JSON) {String=android,iphone,ipad} system 客户端操作系统类型可选参数
* @apiParam (JSON) {String} version 客户端版本号可选参数
* @apiParam (JSON) {String} appid 微信 appid
*
* @apiSuccess {String} return_code 执行结果
* @apiSuccess {String} result_code SUCCESS表示创建订单成功EXISTS表示订单已存在
* @apiSuccess {String} partner_code 商户编码
* @apiSuccess {String} full_name 商户注册全名
* @apiSuccess {String} partner_name 商户名称
* @apiSuccess {String} order_id RoyalPay订单ID同时也是微信订单ID最终支付成功的订单ID可能不同
* @apiSuccess {String} partner_order_id 商户订单ID
* @apiSuccess {String} sdk_params 调用SDK的参数字符串
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配
* @apiError (ERROR_CODE) ORDER_PAID 订单已支付
*
*/
function apis() {
}

@ -808,6 +808,45 @@
* @apiError (ERROR_CODE) ORDER_PAID Order has already been paid
*
*/
/**
* @api {PUT} /api/v1.0/gateway/partners/{partner_code}/app_orders/{order_id} Create Wechat SDK Order
* @apiName WechatSDK
* @apiDescription
* Used for mobile Apps calling Wechat payment with Wechat SDK. Call this api to create order and get param string for SDK calling. Call SDK api with the param to start payment and get payment result from Wechat app
* <b>It is strongly advised to request RoyalPay order query Api to confirm that the order has been paid in order to cancelling order by system at the same time.</b><br>
* <img src="img/sdk_wechat_api_payment_en.png"><br>
* @apiVersion 1.0.0
* @apiGroup SDKPayment
* @apiHeader Accept application/json
* @apiHeader Content-Type application/json
* @apiParam (PathVariable) {String} partner_code Required, Partner code
* @apiParam (PathVariable) {String} order_id Required, Partner order id
* @apiUse Sign
* @apiParam (JSON) {String} description Required, Order description
* @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency.
* @apiParam (JSON) {String=AUD,CNY} currency=AUD Currency
* @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds
* @apiParam (JSON) {String} operator Note for the operator who created this order.
* @apiParam (JSON) {String=android,iphone,ipad} system os type of client app, optional
* @apiParam (JSON) {String} version client app version, optional
* @apiParam (JSON) {String} appid wechat appid
*
* @apiSuccess {String} return_code Execution result
* @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed.
* @apiSuccess {String} partner_code Partner code
* @apiSuccess {String} full_name Partner's full company name when registered
* @apiSuccess {String} partner_name Partner's name
* @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. The final order id which is paid may be different from this one
* @apiSuccess {String} partner_order_id Partner order id
* @apiSuccess {String} sdk_params param string for calling SDK
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner
* @apiError (ERROR_CODE) ORDER_PAID Order has already been paid
*
*/
function apis() {
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Loading…
Cancel
Save