AmazonPay class
Amazon Pay wallet/paylater linking support.
Usage: final razorpay = Razorpay(); razorpay.initilizeSDK('rzp_xxx');
// 1. Check availability bool available = await razorpay.amazonPay.isAvailable();
// 2. Link Amazon Pay account razorpay.amazonPay.startAuthorization( customerId: 'cust_xxx', onLinkingSuccessful: (data) => print('Linked!'), onLinkingFailed: (error) => print('Failed: $error'), );
// 3. Pay — uses existing razorpay.submit(), nothing new needed razorpay.submit({ 'key': 'rzp_xxx', 'method': 'wallet', 'wallet': 'amazonpay', ...payment options... });
Constructors
- AmazonPay(MethodChannel _channel, EventEmitter _eventEmitter)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isAvailable(
) → Future< bool> - Returns true if the Amazon Pay plugin is available on this device.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startAuthorization(
{required String customerId, required dynamic onLinkingSuccessful(Map data), required dynamic onLinkingFailed(Map error)}) → Future< void> - Initiates the Amazon Pay account linking flow.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- EVENT_LINKING_ERROR → const String
- EVENT_LINKING_SUCCESS → const String