A React Native module to handle interfacing with the Adyen iOS and Android Drop-In SDKs, written in Typescript, Swift and Kotlin.
Adyen is a platform for accepting payments, using a variety of methods (like Credit Cards, Google Pay, Apple Pay, etc.). They have provided SDKs for Android and iOS.
This library attempts to provide a simple API for React Native that presents the Drop-In component.
Android min Version: 28 // TODO comfirm
iOS min Version: 12.0
Add this project as a dependency to your React Native project
With Yarn
yarn add @murrple_1/react-native-adyen
With NPM
npm install --save @murrple_1/react-native-adyen
Add to your UIApplicationDelegate
:
import Adyen
// ...snip...
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
RedirectComponent.applicationDidOpen(from: url)
return true
}
The library exports only 2 functions:
async function startPayment(options: StartPaymentOptions): Promise<string>;
and
async function _getPaymentMethodsJsonStr(
options: _GetPaymentMethodsJsonStrOptions,
): Promise<string>;
- Making a note here (though I'm not sure if it is a common problem)...
Make sure your Android styles.xml has a theme like:
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
- Currently, Adyen iOS SDK does not build on the
arm64
architecture (see Adyen/adyen-ios#291).
// TODO we haven't yet release a usable version, please consider any releases ALPHA for now
This project is licensed under the MIT License - see the LICENSE
file for details
Many inspirations from mkharibalaji/react-native-adyen-payment. Honestly, this project wouldn't have been started if that project a) supported Typescript, b) was more easily buildable for development in my environment