|
|
@ -235,7 +235,119 @@
|
|
|
|
* @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/gateway/partners/{partner_code}/pre_card_orders/{order_id} Create Card Pre Order
|
|
|
|
|
|
|
|
* @apiName CardPreOrder
|
|
|
|
|
|
|
|
* @apiGroup CardPayment
|
|
|
|
|
|
|
|
* @apiVersion 1.0.0
|
|
|
|
|
|
|
|
* @apiDescription
|
|
|
|
|
|
|
|
* <b>
|
|
|
|
|
|
|
|
* Card payment method is that customer provider their card information to finish payments. Enable card payment require addition compliance process.<br>
|
|
|
|
|
|
|
|
* Card Pre Order is the way merchant create order first and then redirect to the page on royalpay to ask customer input card information and finish payment.<br>
|
|
|
|
|
|
|
|
* Card Pre Order allows customer retry multiple times. So unless merchant call the closing api. Order will exists available until hit the expire time.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @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, Only AUD supported
|
|
|
|
|
|
|
|
* @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) {Boolean} domestic_only Default is false, Due to there is a huge rate difference between domestic cards and international cards. merchants can disable international cards
|
|
|
|
|
|
|
|
* @apiParam (JSON) {Boolean} disable_credit_card Default is false, if merchants want to limit customers not using credit cards. this parameter can be helpful
|
|
|
|
|
|
|
|
* @apiParam (JSON) {String} customer_id Optional, if merchants tokenized customer's card with a customer id, it can reference the card information and customers will only provide cvv2 code then.
|
|
|
|
|
|
|
|
* @apiParam (JSON) {JSON} customer Optional, json object, provide customer's basic information in case there were a charge back happened
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} name customer's name. optional. if not provided system will use card holder name
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} postcode optional
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} address optional
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} city optional,like Sydney
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} state optional, 3-character state name. like NSW
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} country optional, nation code, use 2-character code in ISO-3600-1
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @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 payment channel(Wechat/Alipay) 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 {PUT} /api/v1.0/gateway/partners/{partner_code}/card_orders/{order_id} 创建卡支付订单
|
|
|
|
|
|
|
|
* @apiName CardOrder
|
|
|
|
|
|
|
|
* @apiGroup CardPayment
|
|
|
|
|
|
|
|
* @apiVersion 1.0.0
|
|
|
|
|
|
|
|
* @apiDescription
|
|
|
|
|
|
|
|
* <b>
|
|
|
|
|
|
|
|
* Card payment method is that customer provider their card information to finish payments. Enable card payment require addition compliance process.<br>
|
|
|
|
|
|
|
|
* Card Order is the way merchant import our sdk in payment page and display a encrypting card input view. then collect the encrypted card info from callback and then pass them to royalpay to create order and finish payments<br>
|
|
|
|
|
|
|
|
* Card Order api do not need customers reaction any more. merchants can check payment result directly after created order.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @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, Only AUD supported
|
|
|
|
|
|
|
|
* @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} key_id Required, key_id of encrypted callback
|
|
|
|
|
|
|
|
* @apiParam (JSON) {String} card_info Required, secret of encrypted callback
|
|
|
|
|
|
|
|
* @apiParam (JSON) {Boolean} domestic_only Default is false, Due to there is a huge rate difference between domestic cards and international cards. merchants can disable international cards
|
|
|
|
|
|
|
|
* @apiParam (JSON) {Boolean} disable_credit_card Default is false, if merchants want to limit customers not using credit cards. this parameter can be helpful
|
|
|
|
|
|
|
|
* @apiParam (JSON) {JSON} customer Optional, json object, provide customer's basic information in case there were a charge back happened
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} name customer's name. optional. if not provided system will use card holder name
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} postcode optional
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} address optional
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} city optional,like Sydney
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} state optional, 3-character state name. like NSW
|
|
|
|
|
|
|
|
* @apiParam (customer) {String} country optional, nation code, use 2-character code in ISO-3600-1
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @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 payment channel(Wechat/Alipay) 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/card_payment_view/partners/{partner_code}/orders/{order_id}/view 卡支付跳转页
|
|
|
|
|
|
|
|
* @apiName CardInputView
|
|
|
|
|
|
|
|
* @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 CardPayment
|
|
|
|
|
|
|
|
* @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
|
|
|
|
* @apiName NewJSAPI
|
|
|
|
* @apiName NewJSAPI
|
|
|
|