PaymentOptions

已淘汰:請改用 V3 Proto。訂單關聯付款選項。

JSON 表示法
{

  // Union field payment_option can be only one of the following:
  "googleProvidedOptions": {
    object (GoogleProvidedPaymentOptions)
  },
  "actionProvidedOptions": {
    object (ActionProvidedPaymentOptions)
  }
  // End of list of possible types for union field payment_option.
}
欄位
聯集欄位 payment_option。付款方式。payment_option 只能是下列其中一項:
googleProvidedOptions

object (GoogleProvidedPaymentOptions)

Google 提供付款方式的規定。

actionProvidedOptions

object (ActionProvidedPaymentOptions)

由動作提供的付款方式用於收據上。

GoogleProvidedPaymentOptions

已淘汰:請改用 V3 Proto。Google 提供付款方式的相關規定。

JSON 表示法
{
  "tokenizationParameters": {
    object (PaymentMethodTokenizationParameters)
  },
  "supportedCardNetworks": [
    enum (CardNetwork)
  ],
  "prepaidCardDisallowed": boolean,
  "billingAddressRequired": boolean,
  "facilitationSpecification": string
}
欄位
tokenizationParameters
(deprecated)

object (PaymentMethodTokenizationParameters)

要求 Google 提供付款方式的必填欄位。這些代碼化參數將用來產生付款權杖,並用於交易。應用程式應從付款閘道取得這些參數。已淘汰:請改用 facilitationSpecification 欄位。

supportedCardNetworks[]
(deprecated)

enum (CardNetwork)

應用程式允許在這裡使用此處所列任何發卡機構的卡片進行交易。根據預設,系統支援美國運通、Visa、MC 和探索。已淘汰:請改用 facilitationSpecification 欄位。

prepaidCardDisallowed
(deprecated)

boolean

如果為 true,則禁止在交易中使用預付卡。已淘汰:請改用 facilitationSpecification 欄位。

billingAddressRequired
(deprecated)

boolean

如果設為 true,系統會傳回帳單地址。已淘汰:請改用 facilitationSpecification 欄位。

facilitationSpecification

string

這個 JSON blob 會擷取 Google 協助整合商付款作業的規格,即 https://developers.google.com/pay/api/web/reference/object#PaymentDataRequest 中定義的 PaymentDataRequest 物件。例如:{ "apiVersion": 2, "apiVersionMinor": 0, "merchantInfo": { "merchantName": "範例商家"}, "allowedPaymentMethods": [ { "type": "CARD", "parameters": { "allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"], "allowedCardNetworks": ["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"] }, "tokenizationSpecification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "example", "gatewayMerchantId": "exampleGatewayMerchantId"} } } ], "transactionInfo": { "totalPriceStatus": "ESTIMATED", "totalPrice": "12.34", "currencyCode": "USD"} }

PaymentMethodTokenizationParameters

已淘汰:請改用 V3 Proto。如果交易中使用使用者透過 Google 儲存的付款方式,合作夥伴必須指定代碼化參數。合作夥伴應該要能在自家的付款閘道中取得這些參數。

JSON 表示法
{
  "tokenizationType": enum (PaymentMethodTokenizationType),
  "parameters": {
    string: string,
    ...
  }
}
欄位
tokenizationType

enum (PaymentMethodTokenizationType)

必填。

parameters

map (key: string, value: string)

如果 codeizationType 設為 PAYMENT_GATEWAY,參數清單應包含權杖化付款方式所需的付款閘道專屬參數,以及名稱為「gateway」的參數,並將值設為我們支援的其中一個閘道,例如「條紋」或「布林樹」用於 Stripe 的權杖化設定範例,採用 JSON 格式。{ "gateway" : "stripe", "stripe:publishableKey" : "pk_1234", "stripe:version" : "1.5" } 用於 Braintree 的 JSON 代碼化設定範例。{ "gateway" : "braintree", "braintree:merchantId" : "abc" "braintree:sdkVersion" : "1.4.0" "braintree:apiVersion" : "v1" "braintree:clientKey" : "production_a12b34" "braintree:authorizationFingerprint" : "production_a12b34" }:用於 Adyen 的 JSON 格式範例設定。{ "gateway" : "adyen", "gatewayMerchantId" : "gateway-merchant-id" }如果 tokenizationType 設為 DIRECT,整合服務供應商必須指定名為「publicKey」的參數,其中包含採用未壓縮點格式和 Base64 編碼的橢圓曲線公開金鑰。Google 將使用這個公開金鑰加密付款資訊。參數範例,採用 JSON 格式:{ "publicKey": "base64encoded..."}

這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

ActionProvidedPaymentOptions

已淘汰:請改用 V3 Proto。動作所提供付款方式的相關規定。

JSON 表示法
{
  "paymentType": enum (PaymentType),
  "displayName": string
}
欄位
paymentType

enum (PaymentType)

付款方式。必填。

displayName

string

收據上所顯示付款方式的名稱。這是動作提供的付款資訊所需要的。如果是 PAYMENT_CARD,這個值可以是「VISA-1234」。如果是 BANK,它可以是「Chase Check-1234」。如果是 LOYALTY_PROGRAM,可以是「星巴克的積分」。對 ON_FULFILLMENT 來說,狀態可以是「貨到付款」。