Note to devs: Add any details you think might be useful :)
- Create a new
Filein theappdirectory calledapikeys.gradle(it is a git ignored file local to your machine). This file will contain your private Stripe API keys. - Add one line to the file like this, and specify your Stripe Publishable API key:
ext.STRIPE_API_CLIENT_KEY = '"your_publishable_api_key"' - Add one line to the file like this, and specify your Stripe Secret API key:
ext.STRIPE_API_SERVER_KEY = '"your_secret_api_key"' - References to these keys are generated by the
app/build.gradlecommands and are accessible from theBuildConfigclass in debug builds. - You will need these keys to process Credit Card payments through the Stripe platform.
// Publishable API Key for the Android Client
ext.STRIPE_API_CLIENT_KEY = '"pk_test_superSekrit"'
// Secret API Key for the Java Server
ext.STRIPE_API_SERVER_KEY = '"sk_test_superDuperSekrit"'
https://stripe.dev/stripe-android
- Consistency
- Readability
- Well-Organized
- Self-Documenting Code
- Appropriate Use of Annotations
- Use / Address Analyzer Warnings
https://source.android.com/setup/contribute/code-style
// Room Database
def room_version = "2.2.4"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
// Google Gson
implementation 'com.google.code.gson:gson:2.8.5'
// Square Retrofit HTTP Library - https://square.github.io/retrofit/
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
// Stripe Java SDK (Server)
implementation "com.stripe:stripe-java:17.16.0"
// Stripe Android SDK (Client)
implementation 'com.stripe:stripe-android:14.0.0'