Giter VIP home page Giter VIP logo

adyen-android-online-payments's Introduction

Adyen online payment integration for Android

This repository includes examples of Android application integrations for online payments with Adyen. Within this demo app, you'll find a simplified version of an e-commerce cart and checkout, complete with commented code to highlight key features and concepts of Adyen's API. Have a look at the underlying code to see how you can integrate Adyen in your Android application to give your shoppers the option to pay with their preferred payment methods, all in a seamless checkout experience. The Android integration is done using Kotlin.

Card checkout demo

Supported Demo Integrations

Make sure the payment methods you want to use in the demo are enabled for your account. Refer to the documentation to add missing payment methods.

Demos of the following Android client-side integrations are currently available in this repository:

  • Drop-in

    • Ideal
    • Credit card
    • Credit card 3DS2
    • PaySafeCard
    • Klarna Pay later
  • Component

    • Ideal
    • Credit card
    • Credit card 3DS2

Each demo leverages Adyen's Library for Android (GitHub | Docs) and the Golang API library (GitHub | Docs) on the server side.

Requirements

  • Android 9+
  • Android Studio
  • Android Emulator

Installation & Usage

  1. Clone this repo:
git clone https://github.com/adyen-examples/adyen-android-online-payments.git
  1. Navigate to the adyen-android-online-payments/server directory to configure and run the backend server:

    1. Create a .env file with your API key, Client public Key, server URL, and merchant account name (all credentials are in string format):

      If you are using the emulator, the server url can be http://10.0.2.2:3000. If you use a real Android device, connect it to same network you have the server running and use the local IP of your network or WiFi router instead of 10.0.2.2

      ADYEN_API_KEY="YOUR_API_KEY"
      ADYEN_MERCHANT="YOUR_MERCHANT_ACCOUNT"
      CLIENT_PUBLIC_KEY="YOUR_CLIENT_PUBLIC_KEY"
      SERVER_URL="YOUR_BACKEND_SERVER_URL"
      
    2. Run the backend server:

      We have a minimal server written in Golang. The server runs on port 3000.

      You can run the prebuilt binary if you don't have Go installed.

      # on mac
      ./app-macOS
      # on Linux
      ./app-linux

      You can also run go run -v . if you have Go installed.

  2. Build & Start the Android app:

    Open the project in Android Studio and run the app/src/main/java/com/example/adyen/checkout/MainActivity.kt from the context menu. To do this, you must configure an emulator or setup a real device on Android Studio. You can follow this guide for instructions.

    Alternatively you can install the APK in the app/release/ folder.

  3. Visit the Android app called "Adyen Checkout Demo" on the emulated/real device and select Drop-in or Component from the bottom tab and choose a payment type.

    To try out integrations with test card numbers and payment method details, see Test card numbers.

Contributing

We commit all our new features directly into our GitHub repository. Feel free to request or suggest new features or code changes yourself as well!

License

MIT license. For more information, see the LICENSE file in the root directory.

Find out more in our Contributing guidelines.

adyen-android-online-payments's People

Contributors

deepu105 avatar gcatanese avatar jlengrand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

adyen-android-online-payments's Issues

3DS1 implementation

Is it planned to add the 3DS1 implementation example?

Also sorry for the off topic, but I'm trying to test 3DS1 and all the 3DS1 test cards I use don't return the necessary data for the 3DS1 redirect, but the 3DS2 works fine. Is there any special cards to use to test the 3DS1?

Support Flutter

Please give some example support for Flutter Framework, I have found some library in pub.dev but these packages not working properly.

The "Save for my next payment" button works with a delay

Saved card data isn't available immidately after payment. For example when I pay first time with credit card and set togler for saving card data, immidiately after success payment I try to pay one more time I don't see saved data from previous payment. Saved card data will be available later after some time.
As for me it would be better if saved card data will be available immidately after success payment

env config different with go

In readme, env config should be like
API_KEY="YOUR_API_KEY" MERCHANT_ACCOUNT="YOUR_MERCHANT_ACCOUNT" CLIENT_PUBLIC_KEY="YOUR_CLIENT_PUBLIC_KEY" SERVER_URL="YOUR_BACKEND_SERVER_URL"

But I check the main.go file. In the main method
`client = adyen.NewClient(&common.Config{
ApiKey: os.Getenv("ADYEN_API_KEY"),
Environment: common.TestEnv,
})

merchantAccount = os.Getenv("ADYEN_MERCHANT")`

main.go use "ADYEN_API_KEY" and "ADYEN_MERCHANT" to load config.It is different with readme.
It's confusing.

Outdated example

Hi,

The android example is using an outdated version of Adyen (3.6.5), which was released Apr 30, 2020, and the newest version available of Adyen is 4.10.0.

Specifically it's 33 months old, and it's way outdated and does not match the documentation and the implementation required in the newest version of Adyen.

To say the least, the example is currently useless, and it needs to be updated so it can be used as a reference when implementing Adyen on Android.

Any hope in seeing an up-to-date example of how to use Adyen on Android in the near future?

@jlengrand @deepu105 @gcatanese @caiofaustino

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.