Merge branch 'develop'

master
taylor.dang 6 years ago
commit 64d9ce4048

@ -106,7 +106,60 @@
* @apiError (ERROR_CODE) ORDER_NOT_EXIST 订单不存在 * @apiError (ERROR_CODE) ORDER_NOT_EXIST 订单不存在
* @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配 * @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配
*/ */
/**
* @api {PUT} /api/v1.0/h5_payment/partners/{partner_code}/orders/{order_id} 创建H5支付单(仅支持支付宝)
* @apiName NewMobileH5Pay
* @apiGroup MobileH5
* @apiVersion 1.0.0
* @apiDescription
* <b>
* H5支付适用场景为移动端App或者手机自带浏览器进行支付用户下单后浏览器跳转至微信支付页面并自动拉起支付宝客户端完成支付<br>
* 返回值包括跳转支付地址跳转支付页需要带上签名信息
* 货币类型如果是CNY注意通过汇率转换后不得低于0.01AUD否则订单可以创建成功但支付时会报金额不合法错误<br>
* <img src="img/h5_api_payment.jpg">
* @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=Alipay} channel 支付渠道大小写敏感
* @apiParam (JSON) {String} notify_url 支付通知url详见支付通知api不填则不会推送支付通知
* @apiParam (JSON) {String} operator 操作人员标识
*
* @apiSuccess {String} return_code 执行结果
* @apiSuccess {String} result_code SUCCESS表示创建订单成功EXISTS表示订单已存在
* @apiSuccess {String} partner_code 商户编码
* @apiSuccess {String} channel 支付渠道
* @apiSuccess {String} full_name 商户注册全名
* @apiSuccess {String} partner_name 商户名称
* @apiSuccess {String} order_id RoyalPay订单ID同时也是微信订单ID最终支付成功的订单ID可能不同
* @apiSuccess {String} partner_order_id 商户订单ID
* @apiSuccess {String} pay_url 跳转URL
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配
* @apiError (ERROR_CODE) ORDER_PAID 订单已支付
*
*/
/**
* @api {GET} /api/v1.0/h5_payment/partners/{partner_code}/orders/{order_id}/pay H5支付跳转页
* @apiName MobileH5Pay
* @apiDescription 必须先调用创建H5支付订单接口再进行跳转
* 建议在用户回调到对应页时通过后台查询订单状态接口确认订单的支付状态
* @apiVersion 1.0.0
* @apiGroup MobileH5
* @apiParam (PathVariable) {String} partner_code 必填商户编码由4位大写字母或数字构成
* @apiParam (PathVariable) {String} order_id 必填商户支付订单号要求已预先创建
* @apiUse Sign
* @apiParam (QueryParam) {String} redirect 必填支付成功后跳转页面回调时会带上签名参数用于校验
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_NOT_EXIST 订单不存在
* @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配
*/
/** /**
* @api {PUT} /api/v1.0/jsapi_gateway/partners/{partner_code}/orders/{order_id} 创建JSAPI订单 * @api {PUT} /api/v1.0/jsapi_gateway/partners/{partner_code}/orders/{order_id} 创建JSAPI订单

@ -109,7 +109,62 @@
* @apiError (ERROR_CODE) ORDER_NOT_EXIST Order does not exist * @apiError (ERROR_CODE) ORDER_NOT_EXIST Order does not exist
* @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner
*/ */
/**
* @api {PUT} /api/v1.0/h5_payment/partners/{partner_code}/orders/{order_id} Create H5 PaymentOnly support Alipay
* @apiName NewMobileH5Pay
* @apiGroup MobileH5
* @apiVersion 1.0.0
* @apiDescription
* <b>
* Alipay has no limit at the moment.</b><br>
* H5 Payment is used for payment in Webpage or App on mobile outside WeChat or Alipay App. The browser would redirect to a webpage from WeChat or Alipay and call the App to finish the payment.<br>
* Return value contains a payment page. Partners shall guide users to redirect to this page. Sign params are required.
* If the currency is CNY, equivalent AUD amount shall never less than 0.01AUD,
* otherwise user will get Invalid Amount Error from WeChat when making the payment.<br>
* <img src="img/h5_api_payment.jpg">
* @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=Alipay} channel Payment channel, case sensitive
* @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.
*
* @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} channel Payment channel
* @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.
* @apiSuccess {String} partner_order_id Partner order id
* @apiSuccess {String} pay_url Payment page in RoyalPay.
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner
* @apiError (ERROR_CODE) ORDER_PAID Order has already been paid
*
*/
/**
* @api {GET} /api/v1.0/h5_payment/partners/{partner_code}/orders/{order_id}/pay H5 Payment Page
* @apiName MobileH5Pay
* @apiDescription This page mush be called after payment order has been created.
* When jumping back to redirection URL, it is recommended to call the order query API to make sure the payment has succeeded.
* @apiVersion 1.0.0
* @apiGroup MobileH5
* @apiParam (PathVariable) {String} partner_code Required, Partner code
* @apiParam (PathVariable) {String} order_id Required, Partner order id. It shall have already been created
* @apiUse Sign
* @apiParam (QueryParam) {String} redirect Required, Redirect url when payment succeeded. Contain sign parameters for validation.
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_NOT_EXIST Order does not exist
* @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner
*/
/** /**
* @api {PUT} /api/v1.0/jsapi_gateway/partners/{partner_code}/orders/{order_id} Create JSAPI Payment Order * @api {PUT} /api/v1.0/jsapi_gateway/partners/{partner_code}/orders/{order_id} Create JSAPI Payment Order

@ -88,7 +88,7 @@ $(function () {
} }
}); });
} }
loadLottery(); // loadLottery();
$('.encourage-dialog .close-circle').click(function () { $('.encourage-dialog .close-circle').click(function () {
$('.encourage-dialog').addClass('hide'); $('.encourage-dialog').addClass('hide');
}); });

Loading…
Cancel
Save