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

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
Name Description
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 TransactionData\Address

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

↳ billing_address TransactionData\Address

Optional. Address associated with the payment method when applicable.

↳ user TransactionData\User

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

↳ merchants array<TransactionData\User>

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

↳ items array<TransactionData\Item>

Optional. Items purchased in this transaction.

↳ gateway_info 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
Type Description
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
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var string
Returns
Type Description
$this

getCardBin

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

Returns
Type Description
string

setCardBin

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

Parameter
Name Description
var string
Returns
Type Description
$this

getCardLastFour

Optional. The last four digits of the card.

Returns
Type Description
string

setCardLastFour

Optional. The last four digits of the card.

Parameter
Name Description
var string
Returns
Type Description
$this

getCurrencyCode

Optional. The currency code in ISO-4217 format.

Returns
Type Description
string

setCurrencyCode

Optional. The currency code in ISO-4217 format.

Parameter
Name Description
var string
Returns
Type Description
$this

getValue

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

Returns
Type Description
float

setValue

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

Parameter
Name Description
var float
Returns
Type Description
$this

getShippingValue

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

Returns
Type Description
float

setShippingValue

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

Parameter
Name Description
var float
Returns
Type Description
$this

getShippingAddress

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

Returns
Type Description
TransactionData\Address|null

hasShippingAddress

clearShippingAddress

setShippingAddress

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

Parameter
Name Description
var TransactionData\Address
Returns
Type Description
$this

getBillingAddress

Optional. Address associated with the payment method when applicable.

Returns
Type Description
TransactionData\Address|null

hasBillingAddress

clearBillingAddress

setBillingAddress

Optional. Address associated with the payment method when applicable.

Parameter
Name Description
var TransactionData\Address
Returns
Type Description
$this

getUser

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

Returns
Type Description
TransactionData\User|null

hasUser

clearUser

setUser

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

Parameter
Name Description
var TransactionData\User
Returns
Type Description
$this

getMerchants

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

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setMerchants

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

Parameter
Name Description
var array<TransactionData\User>
Returns
Type Description
$this

getItems

Optional. Items purchased in this transaction.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setItems

Optional. Items purchased in this transaction.

Parameter
Name Description
var array<TransactionData\Item>
Returns
Type Description
$this

getGatewayInfo

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

Returns
Type Description
TransactionData\GatewayInfo|null

hasGatewayInfo

clearGatewayInfo

setGatewayInfo

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

Parameter
Name Description
var TransactionData\GatewayInfo
Returns
Type Description
$this