PaystackHQ / paystack-ios

Paystack SDK for iOS. Accept Payments on iOS
http://paystack.com
MIT License
26 stars 26 forks source link

Payment UI for iOS and Android App #3

Closed learnwithgabbar closed 8 years ago

learnwithgabbar commented 8 years ago

I have created a test account to integrate this lib in our app. And i found a payment page in the dashboard, My question is that can we access this payment page through app and how we can access this page through the app as there is no example regarding this feature in the demo application include in this repo. Is it possible than how. Or we have to create own UI for payment through the application Please revert as soon as possible Thanks

ibrahimlawal commented 8 years ago

Hello @techmehra, At this time, you will need to create your own payment forms for our Mobile SDKs, Our Payment pages are hosted urls that allow you receive payments without doing any dev work. How do you intend to use them in your app?

learnwithgabbar commented 8 years ago

@ibrahimlawal , Thanks for the fast reply, I have integrated Kongapay in one of my application and that sdk we have to pass the reference number and rest is handle by the sdk, You can take a look on that sdk for reference. I have implement my own UI for payment but not able to validate the CVV number as it require cardbrand how can I get that , Also in you example you just implement one textfield to achieve all of you need but in my case I have different text field for input.

ibrahimlawal commented 8 years ago

What SDK in particular are you referring to here:

I have implement my own UI for payment but not able to validate the CVV number as it require cardbrand how can I get that , Also in you example you just implement one textfield to achieve all of you need but in my case I have different text field for input.

learnwithgabbar commented 8 years ago

ios SDK

ibrahimlawal commented 8 years ago

Hi @techmehra

Sorry for the tardy response. Here is how you would start in case you are using your own inputs.

At this time, you only use the card object of you would like to validate the parameters provided by the user.

let pstckCardParams = PSTCKCardParams.init();

// then set parameters thus from card
pstckCardParams.number = card.number;
pstckCardParams.cvc = card.cvc;
pstckCardParams.expYear = card.expYear;
pstckCardParams.expMonth = card.expMonth;

// or directly
pstckCardParams.number = "2963781976222";
pstckCardParams.cvc = "289";
pstckCardParams.expYear = 2018;
pstckCardParams.expMonth = 9;

Then you can call createToken as always:

PSTCKAPIClient.shared().createToken(withCard: pstckCardParams, completion:

Hope that helps.