stripe payment integration with android app

17
back4app.com Android App With Stripe Payment

Upload: george-batschinski

Post on 12-Feb-2017

108 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Stripe payment integration with Android app

back4app.comAndroid App With Stripe

Payment

Page 2: Stripe payment integration with Android app

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/

Page 3: Stripe payment integration with Android app

Android App With Stripe Payment

Page 4: Stripe payment integration with Android app

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

Page 5: Stripe payment integration with Android app

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

Page 6: Stripe payment integration with Android app

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.

Page 7: Stripe payment integration with Android app

Step 2: Get Stripe API Key

• Go to Account Settings -> API Key

Page 9: Stripe payment integration with Android app

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

Page 10: Stripe payment integration with Android app

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

Page 11: Stripe payment integration with Android app

Step 4: Create your Android Client

• Above the onCreate()

Page 12: Stripe payment integration with Android app

Step 4: Create your Android Client

• Inside onCreate()

Page 13: Stripe payment integration with Android app

Step 4: Create your Android Client

• For the Purchasing main function

Page 14: Stripe payment integration with Android app

Step 4: Create your Android Client

• For the Purchasing main function

Page 15: Stripe payment integration with Android app

Step 5: Test

• If the things going well, there are few things can be judged.

1. the Stock is decreased

Page 16: Stripe payment integration with Android app

Step 5: Test

2. the order can be found at Class:Order

3. the charged -> true and stripePaymentId != undefined at Class:Order

Page 17: Stripe payment integration with Android app

Step 5: Test

4. Stripe Dashboard has transaction records.