17
back4app.com Android App With Stripe Payment

Android app with stripe payment

Embed Size (px)

Citation preview

Page 1: Android app with stripe payment

back4app.comAndroid App With Stripe

Payment

Page 2: Android 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/

Page 3: Android app with stripe payment

Android App With Stripe Payment

Page 4: 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

Page 5: Android app with stripe payment

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: Android app with stripe payment

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: Android app with stripe payment

Step 2: Get Stripe API Key

• Go to Account Settings -> API Key

Page 9: Android app with stripe payment

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: Android app with stripe payment

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: Android app with stripe payment

Step 4: Create your Android Client

• Above the onCreate()

Page 12: Android app with stripe payment

Step 4: Create your Android Client

• Inside onCreate()

Page 13: Android app with stripe payment

Step 4: Create your Android Client

• For the Purchasing main function

Page 14: Android app with stripe payment

Step 4: Create your Android Client

• For the Purchasing main function

Page 15: Android app with stripe payment

Step 5: Test

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

1. the Stock is decreased

Page 16: Android app with stripe payment

Step 5: Test

2. the order can be found at Class:Order

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

Page 17: Android app with stripe payment

Step 5: Test

4. Stripe Dashboard has transaction records.