Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wcoder/worldpay-access-checkout-android-xamarin
Worldpay Access Checkout SDK for Xamarin.Android. Port of
https://github.com/wcoder/worldpay-access-checkout-android-xamarin
android csharp-library payments worldpay xamarin xamarin-android-binding
Last synced: about 1 month ago
JSON representation
Worldpay Access Checkout SDK for Xamarin.Android. Port of
- Host: GitHub
- URL: https://github.com/wcoder/worldpay-access-checkout-android-xamarin
- Owner: wcoder
- License: mit
- Created: 2020-01-07T18:33:00.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-20T21:42:20.000Z (almost 5 years ago)
- Last Synced: 2024-12-17T14:55:40.544Z (about 1 month ago)
- Topics: android, csharp-library, payments, worldpay, xamarin, xamarin-android-binding
- Language: C#
- Homepage: https://github.com/Worldpay/access-checkout-android
- Size: 261 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Access Checkout Android SDK
![version](http://img.shields.io/badge/original-v1.2.0-brightgreen.svg?style=flat)
[![NuGet Badge](https://buildstats.info/nuget/Xamarin.Droid.Worldpay.Access.Checkout?includePreReleases=true)](https://www.nuget.org/packages/Xamarin.Droid.Worldpay.Access.Checkout/)Port of [Worldpay/access-checkout-android](https://github.com/Worldpay/access-checkout-android) SDK for Xamarin.Android.
A lightweight library and sample app that generates a Worldpay session reference from payment card data.
It includes, optionally, custom Android views that identifies card brands and validates payment cards and card expiry dates.## Setup
#### NuGet:
```
Install-Package Xamarin.Droid.Worldpay.Access.Checkout
```## Integration
### Basics
The main step required in order to use the Access Checkout SDK is the initialisation of an instance of `AccessCheckoutClient`.
Interaction with this class will allow developers to obtain a session state from Access Worldpay services.This can be achieved by invoking the `Init()` method of this class and by providing the required dependencies, more details provided in the following sections.
`AccessCheckoutCard` is the coordinator class between the view inputs, the (optional) validators of those inputs, and the callback of those validation results to an implementation of `CardListener`
The SDK is fully customizable and provides default card views that implement the required interfaces out of the box. For advanced styling, it is possible to override some of the default implementations or to provide fully customized implementations of the required interfaces. The interfaces are described at the end of the section.
Firstly, a layout configuration file with the card views is defined as below:
```xml
```
// TODO
#### Initialisation parameters
- Base API URL: Base URL for Access Worldpay services
- Merchant ID: Your registered Access Worldpay Merchant ID
- SessionResponseListener: Reference to the listener which will receive the session response (or any service/API errors)
- Context: [Android Context](https://developer.android.com/reference/android/content/Context)
- LifecycleOwner: [Android LifecycleOwner](https://developer.android.com/reference/android/arch/lifecycle/LifecycleOwner)### Validation
In order to take advantage of the in-built validation on the card fields, there are additional setup steps.
// TODO
#### Receiving the Session State
When the request for a session state starts, the `ISessionResponseListener` is notified via the `OnRequestStarted()` callback method.
When a result becomes available, the implementing class of `ISessionResponseListener` will receive the callback holding the session state or an exception describing the error.
`OnRequestFinished(srting sessionState, AccessCheckoutException error)`
#### When things go wrong: `AccessCheckoutException`
If there is a problem, `ISessionResponseListener` will be notified through the same `OnRequestFinished(srting sessionState, AccessCheckoutException error)` callback, this time with a `null` sessionState and non-null error.
// TODO