In this tutorial, we are going to create blank application, then add Paystack payment to the application just created.
It is assumed that you have setup your development environment, if you have not quickly do and if you don’t know how, check my earlier tutorial on getting started with ionic2 before continuing with this tutorial.
1. Create App
Change directory to you project folder in my own case – C:\ionicdon> and run the following command
ionic start myPaystackApp blank
Type Y at the prompt Would you like to integrate your new app with Cordova to target native iOS and Android? (y/N) y and press enter key
Run your App
After installation is done, change directory to the newly created app – myPaystackApp and run
ionic serve –l
The above image shows the output of the targeted devices i.e. iPhone, Android and Windows Phones in a browser
2. Integrate Paystack API
Before you can integrate Paystack API to your ionic application, you need to first create account with paystack at paystack.com
Click on signup as shown in the above diagram. You will be directed to signup page, there you need to fill up all the fields, in my own case I filled the following information
Business / App Name: myPaystackApp
Your Work Email Address: email@example.com
Set a Password: #Ionicdon123
Note that you need to change the above information to suit your desire
Then click Create My account.
At this point, you are in and you need to introduce yourself, i.e. you need to fill up the following field, as usual I filled the fields as follows:
First Name: Laide
Last Name: Lawal
Phone Number: +2348023020838
Are you a software developer?: Yes, I am
How many people work with you at myPaystackApp? Under 10 employees
Then click complete the signup process, you will be directed to your dashboard after.
At your dashboard you will see the following information
Your business is currently in Test Mode – this means there’re a couple more things to finish up before customers can start paying you online. The guides below will show you how to do this
Scroll down the left pane to settings, and click on “API Keys & Webhooks” as shown below
Note down the API keys, because it going to be used in your app later in this tutorial.