stripe payment integration with android app
TRANSCRIPT
back4app.comAndroid App With Stripe
Payment
Android App With Stripe Payment
• In this Tutorial, we will create a ONE CLICK PURCHASE BUTTON with Stripe Payment.
• To View Whole Project Code:
• https://github.com/dominwong4/Back4app-Stripe-Android-Tutorial
• You can read the original publication on:• http://docs.back4app.com/docs/integrations/android-app-with-stripe-payme
nt/
Android App With Stripe Payment
Step 1: Setup Dashboard• go to Your Parse Dashboard and• create a Class : Item• insert the following columns:• ItemName• Price• quantityAvailable• insert a sample item record• ItemName: test• price: 10• quantityAvailable: 10
Android App With Stripe Payment• create a Class : Order• insert the following colums:• Name• Email• Address• Zip• city_state• Item• Size• fulfilled : Boolean• charged : Boolean• stripePaymentId
Step 2: Get Stripe API Key
• Create an account and login
• Go to this link: https://manage.stripe.com/account/apikeys
• if it does not work follow below instruction.
Step 2: Get Stripe API Key
• Go to Account Settings -> API Key
Step 3: Creat Cloud Code for Stripe Payment
• https://github.com/dominwong4/Back4app-Stripe-Android-Tutorial/blob/master/CloudCode/main.js
• main.js (replace Stripe.initialize to your secret key)
• Click here to view how to upload your CloudCode
Step 4: Create your Android Client Application
1. add parse and stripe package to your project
• go to build.gradle and add following code:
• and then click Sync now
• then go to AndroidManifest.xml
Step 4: Create your Android Client
2. To implement Stripe Payment, the follow is the mandatory functions are needed.
• View Whole Code:
• https://github.com/dominwong4/Back4app-Stripe-Android
• Tutorial/blob/master/app/src/main/java/dominwong4/scm/back4app_stripe_android_tutorial/MainActivity.java
Step 4: Create your Android Client
• Above the onCreate()
Step 4: Create your Android Client
• Inside onCreate()
Step 4: Create your Android Client
• For the Purchasing main function
Step 4: Create your Android Client
• For the Purchasing main function
Step 5: Test
• If the things going well, there are few things can be judged.
1. the Stock is decreased
Step 5: Test
2. the order can be found at Class:Order
3. the charged -> true and stripePaymentId != undefined at Class:Order
Step 5: Test
4. Stripe Dashboard has transaction records.