v0.0.12
jpay-user-proto
jpay/user/v1/base.proto
Error
Invoice
| Field | Type | Label | Description |
|---|---|---|---|
| type | Invoice.Type | type: 發票類型 | |
| number | string | optional | number: 發票號碼 |
| code | string | optional | code: 發票隨機碼 |
| comment | string | comment: 發票其它文字,例如:雲端發票已簡訊發送 |
Error.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| AccessTokenInvalid | 1 |
Invoice.Type
| Name | Number | Description |
|---|---|---|
| NotSet | 0 | |
| Text | 1 | |
| 2 | ||
| Ecpay | 3 |
PaymentType
| Name | Number | Description |
|---|---|---|
| Domestic_Type | 0 | |
| Foreign_Type | 1 | |
| Diamond_Type | 2 | |
| ATM_Type | 3 | |
| CSV_Type | 4 | |
| NOT_SET_Type | 5 | |
| Jpoint_Type | 6 | |
| Cash_Type | 7 | |
| Jkopay_Type | 8 | |
| Jkopay_Authpay_Type | 9 |
TransactionStatus
| Name | Number | Description |
|---|---|---|
| TS_NotSet | 0 | |
| Created | 1 | 訂單創建 |
| Succeed | 2 | 訂單成功 |
| CallbackCompleted | 3 | 訂單成功,且已通知產品端 |
| InvoiceCompleted | 4 | 已開立發票 |
| Failed | 5 | 訂單交易失敗 |
| FailedCallbackCompleted | 6 | 訂單交易失敗,且已通知產品端 |
| RefundWithoutWithdrawal | 7 | 已要求退款,但尚未執行 |
| Refund | 8 | 已退款 |
| Overdue | 9 | 訂單逾期 |
| OverdueCallbackCompleted | 10 | 訂單逾期,且已通知產品端 |
| PaymentNotSetOverdue | 11 | 訂單未設定支付方式,超過指定時間 |
| PaymentNotSetOverdueCallbackCompleted | 12 | 訂單未設定支付方式,超過指定時間,且已通知產品端 |
jpay/user/v1/record_query.proto
GetCompletedOrdersReq
| Field | Type | Label | Description |
|---|---|---|---|
| pan_access_token | string | 要查詢資料的用戶的access token | |
| page_number | int64 | 指定頁數 | |
| page_size | int64 | 指定每頁筆數 |
GetCompletedOrdersRes
| Field | Type | Label | Description |
|---|---|---|---|
| records | GetCompletedOrdersRes.Record | repeated | |
| current_page | int64 | 當前頁數 | |
| total_page | int64 | 總頁數 | |
| total_count | int64 | 總筆數 |
GetCompletedOrdersRes.Record
| Field | Type | Label | Description |
|---|---|---|---|
| trade_id | string | ||
| app_display_name | string | 產品端顯示名稱 | |
| app_icon_url | string | 產品端icon的url path | |
| product_name | string | 產品名稱 | |
| amount | int64 | 訂單總金額 | |
| status | TransactionStatus | 只會是2或3 | |
| payment_type | PaymentType | 支付方式類別 | |
| invoice | Invoice | 如果prefix是http要request,帶trade_id和access token | |
| system_comment | string | 系統性註解,目前只有使用jpoint折抵時才會有註解 | |
| completed_at | google.protobuf.Timestamp | 完成交易時間 |
GetInvoicePDFReq
| Field | Type | Label | Description |
|---|---|---|---|
| pan_access_token | string | ||
| trade_id | string | 要獲取發票pdf的訂單trade_id |
GetInvoicePDFRes
| Field | Type | Label | Description |
|---|---|---|---|
| data | bytes | pdf的bytes,需要由前端以blob decode |
RecordQueryService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetCompletedOrders | GetCompletedOrdersReq | GetCompletedOrdersRes | 查詢該用戶已完成訂單,只會查CallbackCompleted或InvoiceCompleted的,不會包含現金或鑽石支付的訂單,以完成訂單時間倒序排列 |
| GetInvoicePDF | GetInvoicePDFReq | GetInvoicePDFRes | 查詢指定trade_id的發票pdf |