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

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.

All fields are optional.

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

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

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

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

↳ card_last_four string

The last four digits of the card.

↳ currency_code string

The currency code in ISO-4217 format.

↳ value float

The decimal value of the transaction in the specified currency.

↳ shipping_value float

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

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

Destination address if this transaction involves shipping a physical item.

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

Address associated with the payment method when applicable.

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

Information about the user paying/initiating the transaction.

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

Information about the user or users fulfilling the transaction.

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

Items purchased in this transaction.

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

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

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

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

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

Returns
TypeDescription
string

setCardBin

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCardLastFour

The last four digits of the card.

Returns
TypeDescription
string

setCardLastFour

The last four digits of the card.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCurrencyCode

The currency code in ISO-4217 format.

Returns
TypeDescription
string

setCurrencyCode

The currency code in ISO-4217 format.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getValue

The decimal value of the transaction in the specified currency.

Returns
TypeDescription
float

setValue

The decimal value of the transaction in the specified currency.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getShippingValue

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

Returns
TypeDescription
float

setShippingValue

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

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getShippingAddress

Destination address if this transaction involves shipping a physical item.

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

hasShippingAddress

clearShippingAddress

setShippingAddress

Destination address if this transaction involves shipping a physical item.

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

getBillingAddress

Address associated with the payment method when applicable.

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

hasBillingAddress

clearBillingAddress

setBillingAddress

Address associated with the payment method when applicable.

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

getUser

Information about the user paying/initiating the transaction.

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

hasUser

clearUser

setUser

Information about the user paying/initiating the transaction.

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

getMerchants

Information about the user or users fulfilling the transaction.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setMerchants

Information about the user or users fulfilling the transaction.

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

getItems

Items purchased in this transaction.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setItems

Items purchased in this transaction.

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

getGatewayInfo

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

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

hasGatewayInfo

clearGatewayInfo

setGatewayInfo

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

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