BuyerProvidedInfo
in package
Information collected from the buyer during the process of paying an invoice. Initially this object is empty.
Tags
Table of Contents
Properties
- $emailAddress : string|null
- $name : string|null
- $phoneNumber : string|null
- $selectedTransactionCurrency : string|null
- $selectedWallet : string|null
- $sms : string|null
- $smsVerified : bool|null
Methods
- __construct() : mixed
- getEmailAddress() : string|null
- Gets email address
- getName() : string|null
- Gets name
- getPhoneNumber() : string|null
- Gets phone number
- getSelectedTransactionCurrency() : string|null
- Gets selected transaction currency
- getSelectedWallet() : string|null
- Gets selected wallet
- getSms() : string|null
- Gets sms
- getSmsVerified() : bool|null
- Gets verification status of SMS (ie. have they passed the challenge).
- setEmailAddress() : void
- Sets email address
- setName() : void
- Sets name
- setPhoneNumber() : void
- Sets phone number
- setSelectedTransactionCurrency() : void
- Sets selected transaction currency
- setSelectedWallet() : void
- Sets selected wallet
- setSms() : void
- Sets sms
- setSmsVerified() : void
- Sets verification status of SMS (ie. have they passed the challenge).
- toArray() : array<string|int, mixed>
- Gets BuyerProvidedInfo as array
Properties
$emailAddress
protected
string|null
$emailAddress
= null
$name
protected
string|null
$name
= null
$phoneNumber
protected
string|null
$phoneNumber
= null
$selectedTransactionCurrency
protected
string|null
$selectedTransactionCurrency
= null
$selectedWallet
protected
string|null
$selectedWallet
= null
$sms
protected
string|null
$sms
= null
$smsVerified
protected
bool|null
$smsVerified
= null
Methods
__construct()
public
__construct() : mixed
getEmailAddress()
Gets email address
public
getEmailAddress() : string|null
Populated with the buyer's email address if passed in the buyer object, otherwise this field is not returned in the response.
Return values
string|null —the email address
getName()
Gets name
public
getName() : string|null
Populated with the buyer's name address if passed in the buyer object by the merchant
Return values
string|null —the name
getPhoneNumber()
Gets phone number
public
getPhoneNumber() : string|null
Populated with the buyer's phone number if passed in the buyer object by the merchant
Return values
string|null —the phone number
getSelectedTransactionCurrency()
Gets selected transaction currency
public
getSelectedTransactionCurrency() : string|null
This field will be populated with the cryptocurrency selected to pay the BitPay invoice, current supported values are "BTC", "BCH", "ETH", "GUSD", "PAX", "BUSD", "USDC", "XRP", "DOGE", "DAI" and "WBTC". If not yet selected, this field will not be returned.
Return values
string|null —the selected transaction currency
getSelectedWallet()
Gets selected wallet
public
getSelectedWallet() : string|null
This field contains the name of the cryptocurrency wallet selected by the shopper to complete the payment.
Return values
string|null —the selected wallet
getSms()
Gets sms
public
getSms() : string|null
SMS provided by user for communications. This is only used for instances where a buyers email (primary form of buyer communication) is can not be gathered.
Return values
string|null —the sms
getSmsVerified()
Gets verification status of SMS (ie. have they passed the challenge).
public
getSmsVerified() : bool|null
Return values
bool|null —the sms verified
setEmailAddress()
Sets email address
public
setEmailAddress(string $emailAddress) : void
Populated with the buyer's email address if passed in the buyer object, otherwise this field is not returned in the response.
Parameters
- $emailAddress : string
-
the email address
setName()
Sets name
public
setName(string $name) : void
Populated with the buyer's name address if passed in the buyer object by the merchant
Parameters
- $name : string
-
the name
setPhoneNumber()
Sets phone number
public
setPhoneNumber(string $phoneNumber) : void
Populated with the buyer's phone number if passed in the buyer object by the merchant
Parameters
- $phoneNumber : string
-
the phone number
setSelectedTransactionCurrency()
Sets selected transaction currency
public
setSelectedTransactionCurrency(string $selectedTransactionCurrency) : void
This field will be populated with the cryptocurrency selected to pay the BitPay invoice, current supported values are "BTC", "BCH", "ETH", "GUSD", "PAX", "BUSD", "USDC", "XRP", "DOGE", "DAI" and "WBTC". If not yet selected, this field will not be returned.
Parameters
- $selectedTransactionCurrency : string
-
the selected transaction currency
setSelectedWallet()
Sets selected wallet
public
setSelectedWallet(string|null $selectedWallet) : void
This field contains the name of the cryptocurrency wallet selected by the shopper to complete the payment.
Parameters
- $selectedWallet : string|null
-
the selected wallet
setSms()
Sets sms
public
setSms(string $sms) : void
SMS provided by user for communications. This is only used for instances where a buyers email (primary form of buyer communication) is can not be gathered.
Parameters
- $sms : string
-
the sms
setSmsVerified()
Sets verification status of SMS (ie. have they passed the challenge).
public
setSmsVerified(bool $smsVerified) : void
Parameters
- $smsVerified : bool
-
the sms verified
toArray()
Gets BuyerProvidedInfo as array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —BuyerProvidedInfo as array