Posts

Showing posts with the label example

Stripe Integration in Android - Kotlin

Image
Stripe is one of the simplest payment gateway to be used. It enables us to process payments in minutes. Let's see how to integrate Stripe in Android using Kotlin. Operational Flow:             1. App should provide order details to Stripe server and the order total will be returned to App.             2. Then the user will enter the payment/card details. That will be sent to Stripe server and the result of the request will be sent back to the App. Create Stripe Account: (a) Go to  https://dashboard.stripe.com/register and enter all your details and create account.   (b) Click API in side tab. Make sure that the Account is in Test mode. And make a note of          Publishable Key and Secret Key for use. Code: build.gradle:   compile 'com.stripe:stripe-android:5.1.0' Layout files: main_layout.xml: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:an

Braintree Integration in Android - Kotlin

Image
Let’s learn how to integrate Braintree in Android app with Kotlin. Braintree is a subsidary of PayPal. It focuses in helping businesses of all size and to help maximize business growth. Braintree accepts the following payments: * Credit Cards                             * Venmo                             * Android Pay                             * Apple Pay                             * PayPal Operation Flow: 1. App have to request token from the server. 2. Server have to generate a token using Braintree’s SDK and send that to the requested App. 3. With that Token, app should allow user to pay, which will be validated by Braintree’s server and then the payment nonce will be received. 4. That received payment nonce and paid amount will be sent to our own server. There the payment will be checked whether its successful or not and the response will be s