新增原生码接口

master
taylor.dang 5 years ago
parent f8ddc5abc0
commit 28f43ef26c

@ -12,6 +12,7 @@
"Overview",
"QRCode",
"NewQRCode",
"NativeQRCode",
"QRCodePay",
"JSApi",
"NewJSAPI",

@ -93,6 +93,45 @@
* @apiError (ERROR_CODE) ORDER_PAID 订单已支付
*
*/
/**
* @api {PUT} /api/v1.0/gateway/partners/{partner_code}/native_orders/{order_id} 创建Native QRCode支付单
* @apiName NativeQRCode
* @apiGroup QRCode
* @apiVersion 1.0.0
* @apiDescription
* QRCode支付单适用于PC端网页/应用进行支付用户使用微信/支付宝客户端扫描下单后生成的二维码完成支付<br>
* <img src="img/qroce_process_ch.png"><br>
* 返回值包括二维码字符串二维码图片支付地址商户可以自行决定直接展示二维码或跳转支付页跳转支付页需要带上签名信息
* 货币类型如果是CNY注意通过汇率转换后不得低于0.01AUD否则订单可以创建成功但支付时会报金额不合法错误
* @apiHeader Accept application/json
* @apiHeader Content-Type application/json
* @apiParam (PathVariable) {String} partner_code 必填商户编码由4-6位大写字母或数字构成
* @apiParam (PathVariable) {String} order_id 必填商户支付订单号要求同一商户唯一
* @apiUse Sign
* @apiParam (JSON) {String} description 必填订单标题最大长度128字符超出自动截取
* @apiParam (JSON) {int} price 必填金额单位为货币最小单位例如使用100表示1.00 AUD
* @apiParam (JSON) {String=AUD,CNY} currency=AUD 币种代码
* @apiParam (JSON) {String=Alipay,Wechat} channel 支付渠道大小写敏感
* @apiParam (JSON) {String} notify_url 支付通知url详见支付通知api不填则不会推送支付通知
* @apiParam (JSON) {String} operator 操作人员标识
*
* @apiSuccess {String} return_code 执行结果
* @apiSuccess {String} result_code SUCCESS表示创建订单成功EXISTS表示订单已存在
* @apiSuccess {String} channel 支付渠道
* @apiSuccess {String} partner_code 商户编码
* @apiSuccess {String} full_name 商户注册全名
* @apiSuccess {String} partner_name 商户名称
* @apiSuccess {String} order_id GlobalFreePay订单ID同时也是微信订单ID最终支付成功的订单ID可能不同
* @apiSuccess {String} partner_order_id 商户订单ID
* @apiSuccess {String} code_url 支付码字符串商户可以据此自行生产二维码
* @apiSuccess {String} qrcode_img Base64封装的二维码图片可直接作为img的src属性
* @apiSuccess {String} pay_url 跳转URL
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配
* @apiError (ERROR_CODE) ORDER_PAID 订单已支付
*
*/
/**
* @api {GET} /api/v1.0/gateway/partners/{partner_code}/orders/{order_id}/pay QRCode支付跳转页
* @apiName QRCodePay

@ -12,6 +12,7 @@
"Overview",
"QRCode",
"NewQRCode",
"NativeQRCode",
"QRCodePay",
"JSApi",
"NewJSAPI",

@ -95,6 +95,46 @@
* @apiError (ERROR_CODE) ORDER_PAID Order has already been paid
*
*/
/**
* @api {PUT} /api/v1.0/gateway/partners/{partner_code}/native_orders/{order_id} Create QR Code Payment
* @apiName NativeQRCode
* @apiGroup QRCode
* @apiVersion 1.0.0
* @apiDescription
* QR Code Payment is used for webpage/application on PC. Customers use WeChat or Alipay app to scan QR Code generated when creating order and finish the payment.<br>
* <img src="img/qrcode_process_en.png"><br>
* Return value contains QR Code string, QR Ccode image and payment page address. Partners can decide how to finish the payment.
* If the currency is CNY, equivalent AUD amount shall never less than 0.01 AUD,
* otherwise user will get Invalid Amount Error from WeChat when making the payment.
* @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. Shall be unique for the same partner. If repeated, order will be recognized as an existing order.
* @apiUse Sign
* @apiParam (JSON) {String} description Required, Description of an order.
* @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,Wechat} 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} channel Payment channel
* @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 GlobalFreePay, 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} code_url QR Code string. Partners can create the payment QR Code according to this value.
* @apiSuccess {String} qrcode_img QR Code image formatted in Base64. Can be used as the src attribute on img element
* @apiSuccess {String} pay_url Payment page in GlobalFreePay
*
* @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/gateway/partners/{partner_code}/orders/{order_id}/pay QR Code Payment Page in RoyalPay
* @apiName QRCodePay

Loading…
Cancel
Save