Then you are all set. Pentecost handles the birthday field by showing a datepicker dialog when the user taps.

Handling OTP and Phone Token

Paystack's pay with bank is a three step process where the user is asked to input his/her OTP sent from the bank and then the token sent to the registered phone number with the paying account. Ideally you can show your own OTP and Phone Token views but since you already have the Paystack SDK added, we can just borrow views from there to use.

Send bank details and birthday to server which then sends to Paystack.

Save the reference gotten from the response and show the OTP view. Send response to your server. Your server hits Paystack

You can save the reference again from the response or if you are hard guy, you can fetch the previously saved one. Show the Phone Token view. Send response to your server. Your server hits Paystack.

Paystack's OTP views makes use of sync locks to wait for user input, so you have to run in an asynctask.

Set Background Color

Set Billable Header

Set Billable Amount

This shows the amount the user is paying, including the currency. This would be different from the value you would be sending to PayStack, which is in kobo

paymentView.setBillContent('')

Set Card Number

paymentView.setCardNumber('')

Set CardCVV

paymentView.setCardCVV('')

Set Card Expiry Date

paymentView.setCardExpDate('')

Get Card Number

paymentView.getCardNumber()

Get CardCVV

paymentView.getCardCVV()

Get Card Expiry Date

paymentView.getCardExpDate()

Get Selected Bank

paymentView.getBankName()

Get entered Account Number

paymentView.getAccountNumber()

Get entered birthday (Paystack needs this for payments using banks)

paymentView.getAccountHolderBirthday()

Put PaymentView in loading mode

This can be used when the transaction is being made to PayStack or to indicate an initiated action is in progress

paymentView.showLoader();

Remove PaymentView from loading mode

paymentView.hideLoader();

Get PaymentView Pay Button

This returns a Button. You can add a click listener to it and process events.

paymentView.getPayButton()

Set Pay Button listener

This sets the event that should fire when the user clicks the pay button either paying with card or bank. Pentecost already checks for empty views, so don't worry your action won't fire if user leaves the fields empty.