Google Cloud Recaptcha Enterprise V1 Client - Class TransactionData (1.8.0)

Reference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class TransactionData.

Transaction data associated with a payment protected by reCAPTCHA Enterprise.

Generated from protobuf message google.cloud.recaptchaenterprise.v1.TransactionData

Namespace

Google \ Cloud \ RecaptchaEnterprise \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ transaction_id string

Unique identifier for the transaction. This custom identifier can be used to reference this transaction in the future, for example, labeling a refund or chargeback event. Two attempts at the same transaction should use the same transaction id.

↳ payment_method string

Optional. The payment method for the transaction. The allowed values are: * credit-card * debit-card * gift-card * processor-{name} (If a third-party is used, for example, processor-paypal) * custom-{name} (If an alternative method is used, for example, custom-crypto)

↳ card_bin string

Optional. The Bank Identification Number - generally the first 6 or 8 digits of the card.

↳ card_last_four string

Optional. The last four digits of the card.

↳ currency_code string

Optional. The currency code in ISO-4217 format.

↳ value float

Optional. The decimal value of the transaction in the specified currency.

↳ shipping_value float

Optional. The value of shipping in the specified currency. 0 for free or no shipping.

↳ shipping_address Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address

Optional. Destination address if this transaction involves shipping a physical item.

↳ billing_address Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address

Optional. Address associated with the payment method when applicable.

↳ user Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User

Optional. Information about the user paying/initiating the transaction.

↳ merchants array<Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User>

Optional. Information about the user or users fulfilling the transaction.

↳ items array<Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item>

Optional. Items purchased in this transaction.

↳ gateway_info Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo

Optional. Information about the payment gateway's response to the transaction.

getTransactionId

Unique identifier for the transaction. This custom identifier can be used to reference this transaction in the future, for example, labeling a refund or chargeback event. Two attempts at the same transaction should use the same transaction id.

Returns
TypeDescription
string

hasTransactionId

clearTransactionId

setTransactionId

Unique identifier for the transaction. This custom identifier can be used to reference this transaction in the future, for example, labeling a refund or chargeback event. Two attempts at the same transaction should use the same transaction id.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPaymentMethod

Optional. The payment method for the transaction. The allowed values are:

  • credit-card
  • debit-card
  • gift-card
  • processor-{name} (If a third-party is used, for example, processor-paypal)
  • custom-{name} (If an alternative method is used, for example, custom-crypto)
Returns
TypeDescription
string

setPaymentMethod

Optional. The payment method for the transaction. The allowed values are:

  • credit-card
  • debit-card
  • gift-card
  • processor-{name} (If a third-party is used, for example, processor-paypal)
  • custom-{name} (If an alternative method is used, for example, custom-crypto)
Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCardBin

Optional. The Bank Identification Number - generally the first 6 or 8 digits of the card.

Returns
TypeDescription
string

setCardBin

Optional. The Bank Identification Number - generally the first 6 or 8 digits of the card.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCardLastFour

Optional. The last four digits of the card.

Returns
TypeDescription
string

setCardLastFour

Optional. The last four digits of the card.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCurrencyCode

Optional. The currency code in ISO-4217 format.

Returns
TypeDescription
string

setCurrencyCode

Optional. The currency code in ISO-4217 format.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getValue

Optional. The decimal value of the transaction in the specified currency.

Returns
TypeDescription
float

setValue

Optional. The decimal value of the transaction in the specified currency.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getShippingValue

Optional. The value of shipping in the specified currency. 0 for free or no shipping.

Returns
TypeDescription
float

setShippingValue

Optional. The value of shipping in the specified currency. 0 for free or no shipping.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getShippingAddress

Optional. Destination address if this transaction involves shipping a physical item.

Returns
TypeDescription
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address|null

hasShippingAddress

clearShippingAddress

setShippingAddress

Optional. Destination address if this transaction involves shipping a physical item.

Parameter
NameDescription
var Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address
Returns
TypeDescription
$this

getBillingAddress

Optional. Address associated with the payment method when applicable.

Returns
TypeDescription
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address|null

hasBillingAddress

clearBillingAddress

setBillingAddress

Optional. Address associated with the payment method when applicable.

Parameter
NameDescription
var Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address
Returns
TypeDescription
$this

getUser

Optional. Information about the user paying/initiating the transaction.

Returns
TypeDescription
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User|null

hasUser

clearUser

setUser

Optional. Information about the user paying/initiating the transaction.

Parameter
NameDescription
var Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User
Returns
TypeDescription
$this

getMerchants

Optional. Information about the user or users fulfilling the transaction.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setMerchants

Optional. Information about the user or users fulfilling the transaction.

Parameter
NameDescription
var array<Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User>
Returns
TypeDescription
$this

getItems

Optional. Items purchased in this transaction.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setItems

Optional. Items purchased in this transaction.

Parameter
NameDescription
var array<Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item>
Returns
TypeDescription
$this

getGatewayInfo

Optional. Information about the payment gateway's response to the transaction.

Returns
TypeDescription
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo|null

hasGatewayInfo

clearGatewayInfo

setGatewayInfo

Optional. Information about the payment gateway's response to the transaction.

Parameter
NameDescription
var Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo
Returns
TypeDescription
$this