Struct paystack_transaction::PaymentBuilder
source · pub struct PaymentBuilder { /* private fields */ }Implementations§
source§impl PaymentBuilder
impl PaymentBuilder
pub fn init_payment(email: String, amount: f64, key: String) -> Self
sourcepub fn build(self) -> InitialisePay
pub fn build(self) -> InitialisePay
Build your PaymentBuilder object to be used to by InitialisePay to initiate Paystack payment
sourcepub fn amount(&self) -> f64
pub fn amount(&self) -> f64
Amount in the subunit of the supported currency you are debiting customer. Do not pass this if creating subscriptions.
sourcepub fn channel(&mut self, channel: Channel)
pub fn channel(&mut self, channel: Channel)
An array of payment channels to control what channels you want to make available to the user to make a payment with. Available channels include; [‘card’, ‘bank’, ‘ussd’, ‘qr’, ‘mobile_money’, ‘bank_transfer’]
sourcepub fn currency(&mut self, currency: Currency)
pub fn currency(&mut self, currency: Currency)
On of the supported currency [ NGN, USD, GHS, ZAR, KES]. The charge should be performed in. It defaults to your integration currency.
sourcepub fn metadata(&mut self, metadata: String)
pub fn metadata(&mut self, metadata: String)
Object containing any extra information you want recorded with the transaction. Fields within the custom_field object will show up on merchant receipt and within the transaction information on the Paystack Dashboard.
sourcepub fn label(&mut self, label: String)
pub fn label(&mut self, label: String)
String that replaces customer email as shown on the checkout form
sourcepub fn reference(&mut self, reference: String)
pub fn reference(&mut self, reference: String)
Unique case sensitive transaction reference. Only -,., =and alphanumeric characters allowed. If you do not pass this parameter, Paystack will generate a unique reference for you.
sourcepub fn add_fallback(&self, _f: fn())
pub fn add_fallback(&self, _f: fn())
Add runtime funtions such as callback, onClose and onBankTransferConfirmationPending