@ -0,0 +1,6 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY openapi/* /usr/share/nginx/html/
|
||||
COPY default.conf /etc/nginx/conf.d/
|
||||
|
||||
EXPOSE 80
|
@ -0,0 +1,13 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _ default;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html/;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location =/ {
|
||||
rewrite / /cn/ redirect;
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 180 KiB |
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 139 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>RoyalPay Document</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
|
||||
|
||||
<!--
|
||||
ReDoc doesn't change outer page styles
|
||||
-->
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<redoc spec-url='document.yml' expand-responses="200" hide-download-button></redoc>
|
||||
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,410 @@
|
||||
|
||||
orderBasic:
|
||||
required:
|
||||
- description
|
||||
- currency
|
||||
- price
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
maxLength: 128
|
||||
description: Order title(Max 128 characters. Will cut automatically if too long.)
|
||||
price:
|
||||
type: integer
|
||||
description: Order price. Minimal unit of currency. eg, 100 for AUD 1.00
|
||||
currency:
|
||||
type: string
|
||||
enum:
|
||||
- AUD
|
||||
- CNY
|
||||
notify_url:
|
||||
type: string
|
||||
description: payment notification url. for details please visit notify api. will not post notifications if leave it null. Recommended to call order query api to confirm order status when received notification.
|
||||
operator:
|
||||
type: string
|
||||
description: mark of operator
|
||||
orderWithChannel:
|
||||
allOf:
|
||||
- $ref: '#/orderBasic'
|
||||
- properties:
|
||||
channel:
|
||||
type: string
|
||||
description: order channel. case sensitive
|
||||
enum:
|
||||
- Alipay
|
||||
- Wechat
|
||||
type: object
|
||||
required:
|
||||
- channel
|
||||
cardCustomerParam:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: customer name. will use card holder name if leave it empty
|
||||
postcode:
|
||||
type: string
|
||||
example: 2000
|
||||
address:
|
||||
type: string
|
||||
city:
|
||||
type: string
|
||||
example: Sydney
|
||||
state:
|
||||
type: string
|
||||
example: VIC
|
||||
country:
|
||||
type: string
|
||||
description: 2-character country code
|
||||
example: AU
|
||||
|
||||
cardCustomerInfo:
|
||||
type: object
|
||||
title: Card customer info
|
||||
properties:
|
||||
bank:
|
||||
type: string
|
||||
description: bank name who issued the card. may be empty
|
||||
card_type:
|
||||
type: string
|
||||
description: card type
|
||||
example: credit/debit
|
||||
card_alias:
|
||||
type: string
|
||||
description: part of card number. for customers to recognize which card they used
|
||||
example: 424242...242
|
||||
card_scheme:
|
||||
description: card scheme who issued the card
|
||||
type: string
|
||||
example: VISA/MASTER
|
||||
card_country:
|
||||
description: nation code who issued the card
|
||||
type: string
|
||||
example: AU
|
||||
customer_id:
|
||||
type: string
|
||||
description: customer id. if you provided customer_id param or passed tokenize=true param. it will appear
|
||||
orderBasicResponse:
|
||||
type: object
|
||||
properties:
|
||||
return_code:
|
||||
type: string
|
||||
description: execute result
|
||||
result_code:
|
||||
type: string
|
||||
description: SUCCESS/EXISTS all means success. EXISTS means the order_id was not first time to commit
|
||||
channel:
|
||||
type: string
|
||||
description: payment channel
|
||||
partner_code:
|
||||
type: string
|
||||
description: merchant code
|
||||
full_name:
|
||||
type: string
|
||||
description: merchant full name
|
||||
partner_name:
|
||||
type: string
|
||||
description: merchant name
|
||||
order_id:
|
||||
type: string
|
||||
description: RoyalPay order ID, Will be channel order ID same time.
|
||||
partner_order_id:
|
||||
type: string
|
||||
description: order id applied by merchant
|
||||
orderStatus:
|
||||
type: object
|
||||
properties:
|
||||
return_code:
|
||||
type: string
|
||||
description: execute result
|
||||
example:
|
||||
SUCCESS
|
||||
result_code:
|
||||
type: string
|
||||
description: |
|
||||
order status code
|
||||
- PAYING: waiting for payment
|
||||
- CREATE_FAIL: creation failed(final status, can be actived again if submitted another create order with same order id)
|
||||
- CLOSED: order closed(final status, can be actived again if submitted another create order with same order id)
|
||||
- PAY_FAIL: payment failed(final status, can be actived again if submitted another create order with same order id)
|
||||
- PAY_SUCCESS: payment success(final status)
|
||||
- PARTIAL_REFUND: payment success and partial refunds happened(final status)
|
||||
- FULL_REFUND: payment success and was full refunded(final status)
|
||||
If necessary. you can use same order id to call create order api in same gateway. but when origin order is paid or paying status will be failure
|
||||
enum:
|
||||
- PAYING
|
||||
- CREATE_FAIL
|
||||
- CLOSED
|
||||
- PAY_FAIL
|
||||
- PAY_SUCCESS
|
||||
- PARTIAL_REFUND
|
||||
- FULL_REFUND
|
||||
order_id:
|
||||
type: string
|
||||
description: RoyalPay order ID, Will be channel order ID same time.
|
||||
partner_order_id:
|
||||
type: string
|
||||
description: order id applied by merchant
|
||||
channel_order_id:
|
||||
type: string
|
||||
description: transaction id from payment channel
|
||||
total_fee:
|
||||
type: integer
|
||||
description: order amount. minimal unit of the currency.
|
||||
real_fee:
|
||||
type: integer
|
||||
description: customer actual paid amount. minimal unit of the currency.(equals to total_fee at this moment. in case there were some discounts in the future)
|
||||
currency:
|
||||
type: string
|
||||
rate:
|
||||
type: number
|
||||
description: exchange rate of trading. 1AUD=?CNY
|
||||
pay_time:
|
||||
type: string
|
||||
format: 'date-time'
|
||||
pattern: yyyy-mm-dd HH:mm:ss
|
||||
description: paid time(yyyy-MM-dd HH:mm:ss, GMT+10)
|
||||
create_time:
|
||||
type: string
|
||||
format: 'date-time'
|
||||
pattern: yyyy-mm-dd HH:mm:ss
|
||||
description: order creation time(yyyy-MM-dd HH:mm:ss, GMT+10)
|
||||
channel:
|
||||
type: string
|
||||
description: payment channel
|
||||
customer_info:
|
||||
anyOf:
|
||||
- description: Alipay User Info
|
||||
title: Alipay Users
|
||||
type: object
|
||||
properties:
|
||||
alipay_user_id:
|
||||
type: string
|
||||
description: Alipay user id
|
||||
alipay_account:
|
||||
type: string
|
||||
description: user account
|
||||
- $ref: 'components_order.yml#/cardCustomerInfo'
|
||||
refundStatus:
|
||||
type: object
|
||||
properties:
|
||||
return_code:
|
||||
type: string
|
||||
description: Execute result
|
||||
example:
|
||||
SUCCESS
|
||||
result_code:
|
||||
type: string
|
||||
description: |
|
||||
Refund status
|
||||
- WAITING: Submitting
|
||||
- CREATE_FAILED: Submit failed
|
||||
- SUCCESS: Submit success. waiting for bank processing(for Wechat, it's final status)
|
||||
- FAILED: Refund failed
|
||||
- FINISHED: Refund success (final status)
|
||||
enum:
|
||||
- WATING
|
||||
- CREATE_FAILED
|
||||
- SUCCESS
|
||||
- FAILED
|
||||
- FINISHED
|
||||
refund_id:
|
||||
type: string
|
||||
description: RoyalPay Refund ID
|
||||
partner_refund_id:
|
||||
type: string
|
||||
description: Refund id submitted by merchant
|
||||
amount:
|
||||
type: integer
|
||||
description: refund amount. minimal unit of the currency.
|
||||
currency:
|
||||
type: string
|
||||
example:
|
||||
AUD
|
||||
transactionItem:
|
||||
type: object
|
||||
properties:
|
||||
transaction_time:
|
||||
type: string
|
||||
format: 'date-time'
|
||||
pattern: yyyyMMddHHmmss
|
||||
description: trading time, format is yyyyMMddHHmmss, GMT+10
|
||||
partner_code:
|
||||
type: string
|
||||
description: transaction related partner code
|
||||
order_id:
|
||||
type: string
|
||||
description: RoyalPay order id
|
||||
partner_order_id:
|
||||
type: string
|
||||
description: merchant order id
|
||||
channel_order_id:
|
||||
type: string
|
||||
description: channel order id
|
||||
refund_id:
|
||||
type: string
|
||||
description: RoyalPay refund id (only exists on refund or refund failure payback transactions)
|
||||
partner_refund_id:
|
||||
type: string
|
||||
description: merchant submitted refund id (only exists on refund or refund failure payback transactions)
|
||||
gateway:
|
||||
type: integer
|
||||
description: |
|
||||
gateway
|
||||
- 0: RoyalPay EftPOS with payment code (scanning payment code provided by customer)
|
||||
- 1: RoyalPay EftPOS with collection code (customer scan qr code provided by EftPOS)
|
||||
- 2: RoyalPay Merchant's static QR Code
|
||||
- 3: QRCode Gateway
|
||||
- 4: JSAPI Gateway
|
||||
- 5: Third EftPOS payment code gateway
|
||||
- 6: Third EftPOS collection code gateway
|
||||
- 7: RoyalPay Merchant's static QR Code(deprecated)
|
||||
- 8: H5 Gateway
|
||||
- 9: WEB Gateway
|
||||
- 10: SDK order Gateway
|
||||
- 11: RoyalPay Bill QR Code
|
||||
- 12: Mini Program Gateway
|
||||
- 13: Native QR Code Gateway
|
||||
- 14: RoyalPay Bill link
|
||||
- 15: Native JSAPI Gateway
|
||||
- 16: Card Order(Pre order mode)
|
||||
- 17: Card Order
|
||||
- 18: DirectDebit
|
||||
channel:
|
||||
type: string
|
||||
description: Trading channel
|
||||
type:
|
||||
type: string
|
||||
description: Transaction type
|
||||
enum:
|
||||
- Credit
|
||||
- Debit
|
||||
currency:
|
||||
type: string
|
||||
example:
|
||||
AUD
|
||||
total_amount:
|
||||
type: integer
|
||||
description: Total amount for order. minimal unit of the currency.
|
||||
input_amount:
|
||||
type: integer
|
||||
description: Input amount for order. minimal unit of the currency.
|
||||
customer_payment_amount:
|
||||
type: integer
|
||||
description: Customer actual paid amount. minimal unit of the currency.
|
||||
settle_amount:
|
||||
type: integer
|
||||
description: Amount calculated to merchant. note that it did not sub surcharge and GST yet. AUD currency. minimal unit of the currency.
|
||||
transfer_amount:
|
||||
type: integer
|
||||
description: Pay amount to merchant. settle_amount - surcharge - GST. AUD currency. minimal unit of the currency.
|
||||
surcharge:
|
||||
type: integer
|
||||
description: surcharge for this transaction. AUD currency. minimal unit of the currency.
|
||||
gst:
|
||||
type: integer
|
||||
description: GST. AUD currency. minimal unit of the currency.
|
||||
exchange_rate:
|
||||
type: number
|
||||
description: used exchange rate.
|
||||
remark:
|
||||
type: string
|
||||
description: transaction remark
|
||||
customInfo:
|
||||
type: object
|
||||
properties:
|
||||
report_id:
|
||||
type: string
|
||||
description: RoyalPay customs report id
|
||||
client_report_id:
|
||||
type: string
|
||||
description: merchant submitted customs report id
|
||||
report_status:
|
||||
type: string
|
||||
description: report status
|
||||
enum:
|
||||
- PROCESSING
|
||||
- SUBMITED
|
||||
- FAILED
|
||||
- SUCCESS
|
||||
channel:
|
||||
type: string
|
||||
description: payment channel
|
||||
custom:
|
||||
type: string
|
||||
description: customs code
|
||||
mch_custom_no:
|
||||
type: string
|
||||
description: merchant's customs no registered in customs system
|
||||
mch_custom_name:
|
||||
type: string
|
||||
description: merchant's name registered in customs system
|
||||
order_id:
|
||||
type: string
|
||||
description: RoyalPay order id
|
||||
transaction_id:
|
||||
type: string
|
||||
description: channel transaction id
|
||||
order_currency:
|
||||
type: string
|
||||
description: order currency
|
||||
order_amount:
|
||||
type: number
|
||||
description: order amount
|
||||
report_time:
|
||||
type: string
|
||||
format: 'date-time'
|
||||
description: report customs time
|
||||
creation_date:
|
||||
format: 'date-time'
|
||||
type: string
|
||||
description: report create time
|
||||
last_update_date:
|
||||
type: string
|
||||
format: 'date-time'
|
||||
description: update time
|
||||
error_code:
|
||||
type: string
|
||||
description: error code
|
||||
error_msg:
|
||||
type: string
|
||||
description: error message
|
||||
verify_department:
|
||||
type: string
|
||||
verify_department_trade_id:
|
||||
type: string
|
||||
sub_orders:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
sub_order_no:
|
||||
type: string
|
||||
description: merchant's sub order no
|
||||
fee_type:
|
||||
type: string
|
||||
description: currency code
|
||||
default: CNY
|
||||
enum:
|
||||
- CNY
|
||||
order_fee:
|
||||
type: number
|
||||
description: sub order fee
|
||||
transport_fee:
|
||||
type: number
|
||||
description: sub order transport fee
|
||||
verify_department:
|
||||
type: string
|
||||
verify_department_trade_id:
|
||||
type: string
|
||||
report_status:
|
||||
type: string
|
||||
description: report status
|
||||
enum:
|
||||
- PROCESSING
|
||||
- SUBMITED
|
||||
- FAILED
|
||||
- SUCCESS
|
||||
error_code:
|
||||
type: string
|
||||
error_msg:
|
||||
type: string
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 190 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>RoyalPay Document</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
|
||||
|
||||
<!--
|
||||
ReDoc doesn't change outer page styles
|
||||
-->
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<redoc spec-url='document.yml' expand-responses="200" hide-download-button></redoc>
|
||||
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"></script>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 12 KiB |