initPayment method
Future<Payment?>
initPayment({
- required IStoneHandler handler,
- IStoneTechHandler? iStoneTechHandler,
- required String licenceKey,
Function to initialize payment and register the notification handler
Implementation
Future<Payment?> initPayment({
required IStoneHandler handler,
IStoneTechHandler? iStoneTechHandler,
required String licenceKey,
}) async {
if (_payment != null) {
return _payment!;
}
_payment = await Payment.create(
channel: _channel,
paymentHandler: handler,
iStoneTechHandler: iStoneTechHandler,
licenceKey: licenceKey,
);
return _payment;
}