POST api/MyBillingPay/AuthGlobal

3.1 客户端调用-交易授权码

Request Information

URI Parameters

None.

Body Parameters

AuthGlobalClientInfo
NameDescriptionTypeAdditional information
TradeType

*交易模式 1:Android SDK (手遊適用) 2:WEB

string

None.

CustomerId

*用户编号,浣熊用户ID

string

None.

ProductName

*产品名称

string

None.

Amount

*交易金额,测试值150

string

None.

Currency

*币别(TWD/HKD/USD),暂用(TWD)

string

None.

SandBoxMode

*是否為測試環境 true/false

string

None.

ItemCode

*品項代碼

string

None.

ClientType

客户端类型 0 = Wap (默认) 1 = PC

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "TradeType": "sample string 1",
  "CustomerId": "sample string 2",
  "ProductName": "sample string 3",
  "Amount": "sample string 4",
  "Currency": "sample string 5",
  "SandBoxMode": "sample string 6",
  "ItemCode": "sample string 7",
  "ClientType": 8
}

application/xml, text/xml

Sample:
<AuthGlobalClientInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ThirdPart.Models.MyCard.MyBillingPay">
  <Amount>sample string 4</Amount>
  <ClientType>8</ClientType>
  <Currency>sample string 5</Currency>
  <CustomerId>sample string 2</CustomerId>
  <ItemCode>sample string 7</ItemCode>
  <ProductName>sample string 3</ProductName>
  <SandBoxMode>sample string 6</SandBoxMode>
  <TradeType>sample string 1</TradeType>
</AuthGlobalClientInfo>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

AuthGlobalResponseInfo
NameDescriptionTypeAdditional information
InGameSaveType

※儲值服務的使用者介面: 1: server-side; 2: web-side 當交易模式為 WEB 即 TradeType 為 2 和付費 方式為卡片儲值即 PaymentType 為 INGAME 時,需判斷該值。 若 InGameSaveType = 1,CP 需自行開發儲值的 頁面,並於用戶輸入 MyCard 卡號密碼後執行

string

None.

ReturnCode

1 成功 MBP001 ※參數有誤,檢查所有傳入的參數格式或長度是否正確,不正確會,回傳此代碼。 MBP002 ※查詢資料失敗 MBP003 ※Hash 值不正確 MBP004 ※授權失敗詳細原因可參考 ReturnMsg 內容描述 MBP099 ※授權失敗通常是發生例外錯誤

string

None.

ReturnMsg

ReturnCode 訊息描述

string

None.

AuthCode

交易授权码 將授權碼傳至 測試 http(s)://test.mycard520.com.tw/MyCardPay/ 正式 https://www.mycard520.com.tw/MyCardPay/ 使用 HTTP GET 傳送參數

string

None.

TradeSeq

MyCard 交易序號

string

None.

Response Formats

application/json, text/json

Sample:
{
  "InGameSaveType": "sample string 1",
  "ReturnCode": "sample string 2",
  "ReturnMsg": "sample string 3",
  "AuthCode": "sample string 4",
  "TradeSeq": "sample string 5"
}

application/xml, text/xml

Sample:
<AuthGlobalResponseInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ThirdPart.Models.MyCard.MyBillingPay">
  <AuthCode>sample string 4</AuthCode>
  <InGameSaveType>sample string 1</InGameSaveType>
  <ReturnCode>sample string 2</ReturnCode>
  <ReturnMsg>sample string 3</ReturnMsg>
  <TradeSeq>sample string 5</TradeSeq>
</AuthGlobalResponseInfo>