RazorpayServices class

A service class to handle Razorpay payment integration

This class manages:

  • Opening Razorpay checkout with required options
  • Handling events like payment success, payment failure, and external wallet selection
  • Triggering either default toast via IncodesListener or a custom user-provided toast
  • Exposing optional callbacks for API calls after payment

Constructors

RazorpayServices.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
razorpay ↔ Razorpay?
Instance of Razorpay SDK
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Dispose Razorpay listeners
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openRazorpay({required String contactNumber, required String emailId, required String razorpayKey, required double amount, required String appName, String? description, String? colorCode, String paymentGatewayName = "Razorpay", dynamic onShowToast()?, dynamic onPaymentSuccess()?, dynamic onPaymentFailure()?, dynamic onExternalWallet()?}) → void
Opens Razorpay checkout screen with provided details.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited