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)

這個應用程式允許用於交易的任何發卡機構的卡片。根據預設,系統支援 Amex、Visa、MC 和 Discover。已淘汰:請改用 facilitationSpecification 欄位。

prepaidCardDisallowed
(deprecated)

boolean

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

billingAddressRequired
(deprecated)

boolean

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

facilitationSpecification

string

此 JSON blob 會擷取以下規格:Google 如何進行 integrators 付款,"https://developers.google.com/pay/api/web/reference/object#PaymentDataRequest

PaymentMethodTokenizationParameters

已淘汰:請改用 V3 Proto。如果交易會使用使用者儲存在 Google 的付款方式,合作夥伴必須指定代碼化參數。合作夥伴應可從其「支付閘道」取得這些參數。

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

enum (PaymentMethodTokenizationType)

這是必填欄位。

parameters

map (key: string, value: string)

如果 TokenizationType 設為 PAYMENT_GATEWAY,則參數清單應包含權杖化付款方式所需的付款閘道特定參數,以及名為「gateway」的參數,且值必須設為我們支援的其中一個閘道 (例如「stripe」或「braintree」)。用於 Stripe 的權杖化設定範例 (JSON 格式)。{ "gateway" : "stripe", "stripe:publishableKey" : "pk_1234", "stripe:version" : "1.5" } 以 JSON 格式用於 Braintree 的權杖化設定範例。{ "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": "base64 編碼..."}

這個物件中包含 "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 而言,費用可以是「貨到付款」。