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
Namespace
Google \ Cloud \ RecaptchaEnterprise \ V1Methods
__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
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 | |
---|---|
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
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
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
The Bank Identification Number - generally the first 6 or 8 digits of the card.
Returns | |
---|---|
Type | Description |
string |
setCardBin
The Bank Identification Number - generally the first 6 or 8 digits of the card.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getCardLastFour
The last four digits of the card.
Returns | |
---|---|
Type | Description |
string |
setCardLastFour
The last four digits of the card.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getCurrencyCode
The currency code in ISO-4217 format.
Returns | |
---|---|
Type | Description |
string |
setCurrencyCode
The currency code in ISO-4217 format.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getValue
The decimal value of the transaction in the specified currency.
Returns | |
---|---|
Type | Description |
float |
setValue
The decimal value of the transaction in the specified currency.
Parameter | |
---|---|
Name | Description |
var |
float
|
Returns | |
---|---|
Type | Description |
$this |
getShippingValue
The value of shipping in the specified currency. 0 for free or no shipping.
Returns | |
---|---|
Type | Description |
float |
setShippingValue
The value of shipping in the specified currency. 0 for free or no shipping.
Parameter | |
---|---|
Name | Description |
var |
float
|
Returns | |
---|---|
Type | Description |
$this |
getShippingAddress
Destination address if this transaction involves shipping a physical item.
Returns | |
---|---|
Type | Description |
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address|null |
hasShippingAddress
clearShippingAddress
setShippingAddress
Destination address if this transaction involves shipping a physical item.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address
|
Returns | |
---|---|
Type | Description |
$this |
getBillingAddress
Address associated with the payment method when applicable.
Returns | |
---|---|
Type | Description |
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address|null |
hasBillingAddress
clearBillingAddress
setBillingAddress
Address associated with the payment method when applicable.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Address
|
Returns | |
---|---|
Type | Description |
$this |
getUser
Information about the user paying/initiating the transaction.
Returns | |
---|---|
Type | Description |
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User|null |
hasUser
clearUser
setUser
Information about the user paying/initiating the transaction.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User
|
Returns | |
---|---|
Type | Description |
$this |
getMerchants
Information about the user or users fulfilling the transaction.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setMerchants
Information about the user or users fulfilling the transaction.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\RecaptchaEnterprise\V1\TransactionData\User>
|
Returns | |
---|---|
Type | Description |
$this |
getItems
Items purchased in this transaction.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setItems
Items purchased in this transaction.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\RecaptchaEnterprise\V1\TransactionData\Item>
|
Returns | |
---|---|
Type | Description |
$this |
getGatewayInfo
Information about the payment gateway's response to the transaction.
Returns | |
---|---|
Type | Description |
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo|null |
hasGatewayInfo
clearGatewayInfo
setGatewayInfo
Information about the payment gateway's response to the transaction.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\RecaptchaEnterprise\V1\TransactionData\GatewayInfo
|
Returns | |
---|---|
Type | Description |
$this |