#[non_exhaustive]pub struct Buyer {
pub name: Box<str>,
pub surname: Option<Box<str>>,
pub email: Box<str>,
pub phone: Option<Box<str>>,
pub identity_number: Option<Box<str>>,
pub ip: Option<Box<str>>,
pub address: Option<Address>,
}Expand description
The person paying.
Only the name and the email are required here, because they are the two
every provider that asks for a buyer asks for. The rest are Option
because which of them is mandatory is the provider’s own decision — iyzico
refuses a payment without an identity number, PayTR without the payer’s IP
— and an adapter says which one is missing when it needs it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Box<str>Given name. A provider that wants one field takes this.
surname: Option<Box<str>>Family name, where the provider keeps them apart. iyzico does.
email: Box<str>Email address.
phone: Option<Box<str>>Mobile number.
identity_number: Option<Box<str>>Turkish national identity number, or the equivalent. iyzico’s classic API requires one on every hosted form.
ip: Option<Box<str>>The address the request came from, which fraud checks read. PayTR requires it.
address: Option<Address>Where the payer is registered, which iyzico sends as
registrationAddress and PayTR as the payer’s address.