yang5664
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    <style> code { font-size: 0.8rem; } h4 { line-height: 2.5; border-bottom: 1px solid #eee; } .nodes { color: white; } </style> # Golden F 單一錢包介接 Guideline --- ##### 修改歷程 ``` 20210727 修正各接口 request response example 20201211 修正 "/sw/query-translog" response field (trans_id -> trace_id) 20200814 產品代碼列表更改為支持的產品 20200618 新增產品代碼 "TFG" 20200507 查詢交易單據 /sw/query-translog 請求參數新增 "member_account" 20200423 1. "捨棄" wallet_code 錢包代碼 2. "捨棄接口" 領出玩家錢包餘額、歸還玩家錢包餘額 3. "新增" vendor_code 產品代碼、bet_id 注單號、trans_type 交易類別 20200406 "查詢交易單據" 中 "trans_at" 補充說明 20200319 新增 "錯誤代碼" (7000 請求參數錯誤) 20200116 修正“查詢交易單據”說明 20191015 新增錯誤代碼、查詢交易單據API 20190923 新增新增錢包(LBKENO)、Response說明 20190905 新增新增錢包(AG真人、SBO錢包、GPK棋牌) 20190502 新增流程說明、 API清單 20190429 release v1.0 ``` --- ### 錯誤代碼 |代碼|說明|對應欄位| |---|---|---| |0|正常 |7000|請求參數錯誤 |7101|認證碼錯誤|wtoken |7102|產品代碼不存在|vendor_code |7103|玩家代碼不存在|member_account |7104|交易序號重複|trace_id |7105|查詢資料為空| |7201|交易金額須為正數|amount |7202|餘額不足|| ### 產品代碼 |代碼|說明|備註| |---|---|---| |SBO|SBO 體育 |GPSSL|揪客嘉 ### 交易類型 |代碼|說明|備註| |---|---|---| |Stake|下注 |Payoff|派彩 |cancelStake|取消下注 |cancelPayoff|取消派彩 |gameTransferOut|轉帳遊戲轉出|轉帳錢包遊戲 |gameTransferIn|轉帳遊戲轉入|轉帳錢包遊戲 ### 流程說明 ```mermaid sequenceDiagram 營運商->>Golden F:取得遊戲連結 Golden F->>遊戲商: 取得遊戲連結 Golden F->>營運商: 返回遊戲連結 alt 單一錢包 遊戲商-->>Golden F:下注(Stake) Golden F-->>營運商:轉出(TransferOut) Golden F-->>遊戲商:完成下注(Stake) 遊戲商-->>Golden F:派彩(Payoff) Golden F-->>營運商:轉入(Payoff) Golden F-->>遊戲商:完成派彩(Payoff) end ``` ### API清單 |名稱|API-Path|備註| |-|-|-| |[查詢玩家錢包餘額](#查詢玩家錢包餘額)|/sw/player-balance|| |[轉出/下注](#轉出-下注)|/sw/transfer-out|(單一錢包)| |[轉入/派彩](#轉入-派彩)|/sw/transfer-in|(單一錢包)| |[強制 轉出/下注](#強制-轉出-下注)|/sw/force-transfer-out|<span style="color:red;">※提供“交易金額”大於“帳戶餘額”的交易,此情況發生在比賽結果改派。</span>| |[查詢交易單據](#查詢交易單據)|/sw/query-translog|| ### API重點 >1. 我方呼叫貴司 API 時,會傳入 wtoken, 此資料由貴司提供,給貴司驗證是否為我方呼叫 API。 >2. trace_id 為唯一不重複的值,請貴方務必確認其唯一性 >3. 當貴司收到 vendor_code 請自行決定玩家交易的錢包。 >4. 執行交易時,請務必紀錄下交易前後的金額。 >5. API 回應的 Content-Type為 application/json >6. 交易的紀錄格式如下 |參數名稱|說明|備註| |-|-|-| |`wtoken`|驗證用| |`trans_type`|交易類型|[交易類型](#交易類型) |`member_account`|玩家代碼| |`vendor_code`|產品代碼|不同遊戲對應不同[產品代碼](#產品代碼)| |`amount`|交易金額|須為 <span style="color:red;">正數</span>| |`trace_id`|交易序號|唯一不重複<span style="color:red;">長度最多255字元</span>| <pre> #Example success { "data": { "member_account": "testAccount", "vendor_code": "GPSSL" "balance": 100 }, "code": 0 } </pre> ```json #Example failed { "data": null, "code": 7000 } ``` #### 查詢玩家錢包餘額 URL:`/sw/player-balance` Method:`POST` Headers:`Content-Type:application/x-www-form-urlencoded` ##### Request |Parameter|Type|Require|Description| |-|-|-|-| |wtoken|string|Required|給貴司驗證是否為我方呼叫| |member_account|string|Required|玩家代碼| |vendor_code|string|Required|產品代碼| <pre> #Request Example { "wtoken": "ca947da21f92447eadb43c76ee6bdda4", "member_account": "testAccount", "vendor_code": "GPSSL", } </pre> ##### Response |Parameter|Type|Require|Description| |-|-|-|-| |data.member_account|string|Required|玩家代碼| |data.vendor_code|string|Required|產品代码| |data.balance|number|Required|餘額| |code|int|Required|狀態碼| <pre> #Response Example { "data": { "member_account": "testAccount", "vendor_code": "GPSSL", "balance": 100 }, "code": 0 } </pre> #### 轉出 / 下注 URL:`/sw/transfer-out` Method:`POST` Headers:`Content-Type:application/x-www-form-urlencoded` ##### Request | Parameter | Type | Require | Description | | -------------- | ------ | -------- | ------------------------ | | wtoken | string | Required | 給貴司驗證是否為我方呼叫 | | member_account | string | Required | 玩家代碼 | | | vendor_code | string | Required | 產品代碼 | | trans_type | string | Required | 交易類型| | amount | number | Required | 交易金額 | | trace_id | string | Required | 交易單號 | | bet_id| string | Required | 注單號 | <pre> #Request Example { "wtoken": "ca947da21f92447eadb43c76ee6bdda4", "member_account": "testAccount", "vendor_code": "GPSSL", "trans_type": "Stake" "amount": 0.3, "trace_id": "testAccount-traceId-stake-1627376697", "bet_id":"test-1627376697" } </pre> ##### Response |Parameter|Type|Require|Description| |-|-|-|-| |data.member_account|string|Required|玩家代碼| |data.vendor_code|string|Required|產品代码| |data.trans_type|string|Required|交易類型| |data.before_balance|number|Required|交易前餘額| |data.amount|number|Required|交易金額| |data.balance|number|Required|交易後餘額| |code|int|Required|狀態碼| <pre> #Response Example { "data": { "member_account": "testAccount", "vendor_code": "GPSSL", "trans_type": "Stake" "before_balance": 100, "amount": 0.3, "balance": 99.7 }, "code": 0 } </pre> #### 轉入 / 派彩 URL:`/sw/transfer-in` Method:`POST` Headers:`Content-Type:application/x-www-form-urlencoded` ##### Request |Parameter|Type|Require|Description| |-|-|-|-| |wtoken|string|Required|給貴司驗證是否為我方呼叫| |member_account|string|Required|玩家代碼| |vendor_code|string|Required|產品代碼| |trans_type|string|Required|交易類型| |amount|number|Required|交易金額| |trace_id|string|Required|交易單號| |bet_id|string|Required|注單號| <pre> #Request Example { "wtoken": "ca947da21f92447eadb43c76ee6bdda4", "member_account": "testAccount", "vendor_code": "GPSSL" "trans_type": "Payoff" "amount": 1.3, "trace_id": "testAccount-traceId-payoff-1627376697", "bet_id":"test-1627376697" } </pre> ##### Response |Parameter|Type|Require|Description| |-|-|-|-| |data.member_account|string|Required|玩家代碼| |data.vendor_code|string|Required|產品代碼| |data.trans_type|string|Required|交易類型| |data.before_balance|number|Required|交易前餘額| |data.amount|number|Required|交易金額| |data.balance|number|Required|交易後餘額| |code|int|Required|狀態碼| <pre> #Response Example { "data": { "member_account": "testAccount", "vendor_code": "GPSSL" "trans_type": "Payoff" "before_balance": 99.7, "amount": 1.3, "balance": 101 }, "code": 0 } </pre> #### 強制 轉出 / 下注 <span style="color:red;">※提供“交易金額”大於“帳戶餘額”的交易,此情況發生在比賽結果改派。</span> URL:`/sw/force-transfer-out` Method:`POST` Headers:`Content-Type:application/x-www-form-urlencoded` ##### Request |Parameter|Type|Require|Description| |-|-|-|-| |wtoken|string|Required|給貴司驗證是否為我方呼叫| |member_account|string|Required|玩家代碼| |vendor_code|string|Required|產品代碼| |trans_type|string|Required|交易類型| |amount|number|Required|交易金額| |trace_id|string|Required|交易單號| |bet_id|string|Required|注單號| <pre> #Request Example { "wtoken": "ca947da21f92447eadb43c76ee6bdda4", "member_account": "testAccount", "vendor_code": "GPSSL", "trans_type": "cancelPayoff", "amount": 1.3, "trace_id": "testAccount-traceId-cancelpayoff-1627376697", "bet_id":"test-1627376697" } </pre> ##### Response |Parameter|Type|Require|Description| |-|-|-|-| |data.member_account|string|Required|玩家代碼| |data.vendor_code|string|Required|產品代碼| |data.trans_type|string|Required|交易類型| |data.before_balance|number|Required|交易前餘額| |data.amount|number|Required|交易金額| |data.balance|number|Required|交易後餘額| |code|int|Required|狀態碼| <pre> #Response Example { "data": { "member_account": "testAccount", "vendor_code": "GPSSL" "trans_type": "cancelPayoff" "before_balance": 101, "amount": 1.3, "balance": 99.7 }, "code": 0 } </pre> #### 查詢交易單據 URL:`/sw/query-translog` Method:`POST` Headers:`Content-Type:application/x-www-form-urlencoded` ##### Request |Parameter|Type|Require|Description| |-|-|-|-| |wtoken|string|Required|給貴司驗證是否為我方呼叫| |trace_id|string|Required|交易單號| |<span style="color:red">member_account</span>|string|Required|玩家代碼| <pre> #Request Example { "wtoken": "ca947da21f92447eadb43c76ee6bdda4", "trace_id": "testAccount-traceId-cancelpayoff-1627376697", <span style="color:red">"member_account": "testAccount"</span> } </pre> ##### Response |Parameter|Type|Require|Description| |-|-|-|-| |data.trans_at|integer|Required|交易時間戳記 (貴司收到我方請求產生交易的時間)| |data.trace_id|string|Required|交易序號| |data.member_account|string|Required|玩家代碼| |data.vendor_code|string|Required|產品代碼| |data.trans_type|string|Required|交易類型| |data.before_balance|number|Required|交易前餘額| |data.amount|number|Required|交易金額| |data.after_balance|number|Required|交易後餘額| |code|int|Required|狀態碼<span style="color:red;">(※若查詢資料為空時返回7105)</span>| <pre> #Response Example { "data": { "trans_at": 1627376697231, "trace_id": "testAccount-traceId-cancelpayoff-1627376697", "member_account": "testAccount", "vendor_code": "GPSSL", "trans_type": "cancelPayoff", "before_balance": 101, "amount": 1.3, "balance": 99.7 }, "code": 0 } </pre> ##### 查無資料時 ```json #Response Example { "data": null, "code": 7105 } ``` ###### tags: `單一錢包介接`

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully