Copied!

Transaction data associated with a payment protected by reCAPTCHA Enterprise.

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

CloneableInstantiable
Methods
public __construct( $data = NULL)
 

Constructor.

  • param array $data { Optional. Data for populating the Message object.
    @type string $transaction_id
          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.
    @type string $payment_method
          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)
    @type string $card_bin
          Optional. The Bank Identification Number - generally the first 6 or 8
          digits of the card.
    @type string $card_last_four
          Optional. The last four digits of the card.
    @type string $currency_code
          Optional. The currency code in ISO-4217 format.
    @type float $value
          Optional. The decimal value of the transaction in the specified currency.
    @type float $shipping_value
          Optional. The value of shipping in the specified currency. 0 for free or no
          shipping.
    @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $shipping_address
          Optional. Destination address if this transaction involves shipping a
          physical item.
    @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $billing_address
          Optional. Address associated with the payment method when applicable.
    @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User $user
          Optional. Information about the user paying/initiating the transaction.
    @type array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User>|\Google\Protobuf\Internal\RepeatedField $merchants
          Optional. Information about the user or users fulfilling the transaction.
    @type array<\Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item>|\Google\Protobuf\Internal\RepeatedField $items
          Optional. Items purchased in this transaction.
    @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo $gateway_info
          Optional. Information about the payment gateway's response to the
          transaction.
    
    }
public Google\Protobuf\Internal\Message::__debugInfo()
public Google\Protobuf\Internal\Message::byteSize()
 
  • ignore
public Google\Protobuf\Internal\Message::clear()
 

Clear all containing fields.

  • return null
public clearBillingAddress()
public clearGatewayInfo()
public clearShippingAddress()
public clearTransactionId()
public clearUser()
public Google\Protobuf\Internal\Message::discardUnknownFields()
 

Clear all unknown fields previously parsed.

  • return null
public getBillingAddress()
 

Optional. Address associated with the payment method when applicable.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address|null
public getCardBin()
 

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

Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public getCardLastFour()
 

Optional. The last four digits of the card.

Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public getCurrencyCode()
 

Optional. The currency code in ISO-4217 format.

Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public getGatewayInfo()
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo|null
public getItems()
 

Optional. Items purchased in this transaction.

Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Protobuf\Internal\RepeatedField
public getMerchants()
 

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

Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Protobuf\Internal\RepeatedField
public 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)

Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public getShippingAddress()
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address|null
public getShippingValue()
 

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

Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL];

  • return float
public 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.

Generated from protobuf field optional string transaction_id = 11;

  • return string
public getUser()
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User|null
public getValue()
 

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

Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL];

  • return float
public hasBillingAddress()
public hasGatewayInfo()
public hasShippingAddress()
public hasTransactionId()
public hasUser()
public Google\Protobuf\Internal\Message::jsonByteSize( $options = 0)
 
  • ignore
public Google\Protobuf\Internal\Message::mergeFrom( $msg)
 

Merges the contents of the specified message into current message.

This method merges the contents of the specified message into the current message. Singular fields that are set in the specified message overwrite the corresponding fields in the current message. Repeated fields are appended. Map fields key-value pairs are overwritten. Singular/Oneof sub-messages are recursively merged. All overwritten sub-messages are deep-copied.

  • param object $msg Protobuf message to be merged from.
  • return null
public Google\Protobuf\Internal\Message::mergeFromJsonString( $data, $ignore_unknown = false)
 

Parses a json string to protobuf message.

This function takes a string in the json wire format, matching the encoding output by serializeToJsonString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Json protobuf data.
  • param bool $ignore_unknown
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::mergeFromString( $data)
 

Parses a protocol buffer contained in a string.

This function takes a string in the (non-human-readable) binary wire format, matching the encoding output by serializeToString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Binary protobuf data.
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::parseFromJsonStream( $input, $ignore_unknown)
 
  • ignore
public Google\Protobuf\Internal\Message::parseFromStream( $input)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonString( $options = 0)
 

Serialize the message to json string.

  • return string Serialized json protobuf data.
public Google\Protobuf\Internal\Message::serializeToStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToString()
 

Serialize the message to string.

  • return string Serialized binary protobuf data.
public setBillingAddress( $var)
 

Optional. Address associated with the payment method when applicable.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $var
  • return $this
public setCardBin( $var)
 

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

Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setCardLastFour( $var)
 

Optional. The last four digits of the card.

Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setCurrencyCode( $var)
 

Optional. The currency code in ISO-4217 format.

Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setGatewayInfo( $var)
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo $var
  • return $this
public setItems( $var)
 

Optional. Items purchased in this transaction.

Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item[]|\Google\Protobuf\Internal\RepeatedField $var
  • return $this
public setMerchants( $var)
 

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

Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User[]|\Google\Protobuf\Internal\RepeatedField $var
  • return $this
public setPaymentMethod( $var)
 

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)

Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setShippingAddress( $var)
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address $var
  • return $this
public setShippingValue( $var)
 

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

Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL];

  • param float $var
  • return $this
public setTransactionId( $var)
 

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.

Generated from protobuf field optional string transaction_id = 11;

  • param string $var
  • return $this
public setUser( $var)
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User $var
  • return $this
public setValue( $var)
 

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

Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL];

  • param float $var
  • return $this
Properties
protected $billing_address = NULL
 

Optional. Address associated with the payment method when applicable.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address billing_address = 7 [(.google.api.field_behavior) = OPTIONAL];

protected $card_bin = ''
 

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

Generated from protobuf field string card_bin = 2 [(.google.api.field_behavior) = OPTIONAL];

protected $card_last_four = ''
 

Optional. The last four digits of the card.

Generated from protobuf field string card_last_four = 3 [(.google.api.field_behavior) = OPTIONAL];

protected $currency_code = ''
 

Optional. The currency code in ISO-4217 format.

Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL];

protected $gateway_info = NULL
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.GatewayInfo gateway_info = 10 [(.google.api.field_behavior) = OPTIONAL];

protected $payment_method = ''
 

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)

Generated from protobuf field string payment_method = 1 [(.google.api.field_behavior) = OPTIONAL];

protected $shipping_address = NULL
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.Address shipping_address = 6 [(.google.api.field_behavior) = OPTIONAL];

protected $shipping_value = 0
 

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

Generated from protobuf field double shipping_value = 12 [(.google.api.field_behavior) = OPTIONAL];

protected $transaction_id = NULL
 

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.

Generated from protobuf field optional string transaction_id = 11;

protected $user = NULL
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData.User user = 8 [(.google.api.field_behavior) = OPTIONAL];

protected $value = 0
 

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

Generated from protobuf field double value = 5 [(.google.api.field_behavior) = OPTIONAL];

Methods
protected Google\Protobuf\Internal\Message::hasOneof( $number)
protected Google\Protobuf\Internal\Message::mergeFromArray(array $array)
 

Populates the message from a user-supplied PHP array. Array keys correspond to Message properties and nested message properties.

Example:

$message->mergeFromArray([
    'name' => 'This is a message name',
    'interval' => [
         'startTime' => time() - 60,
         'endTime' => time(),
    ]
]);

This method will trigger an error if it is passed data that cannot be converted to the correct type. For example, a StringValue field must receive data that is either a string or a StringValue object.

  • param array $array An array containing message properties and values.
  • return null
protected Google\Protobuf\Internal\Message::mergeFromJsonArray( $array, $ignore_unknown)
protected Google\Protobuf\Internal\Message::readOneof( $number)
protected Google\Protobuf\Internal\Message::readWrapperValue( $member)
protected Google\Protobuf\Internal\Message::whichOneof( $oneof_name)
protected Google\Protobuf\Internal\Message::writeOneof( $number, $value)
protected Google\Protobuf\Internal\Message::writeWrapperValue( $member, $value)
Properties
private $items = NULL
 

Optional. Items purchased in this transaction.

Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.Item items = 14 [(.google.api.field_behavior) = OPTIONAL];

private $merchants = NULL
 

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

Generated from protobuf field repeated .google.cloud.recaptchaenterprise.v1.TransactionData.User merchants = 13 [(.google.api.field_behavior) = OPTIONAL];

© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration