RazorPayWeb constructor
RazorPayWeb(
- Map options, {
- ResponseListener<
RazorPayResponse> ? listener,
Implementation
RazorPayWeb(Map<dynamic, dynamic> options,
{ResponseListener<RazorPayResponse>? listener})
: razorPayJs = Razorpay(RazorPayptions(
key: options["key"],
amount: options["amount"],
currency: options["currency"],
name: options["name"],
description: options["description"],
image: options["image"],
order_id: options["order_id"],
handler: allowInterop((var response) {
listener?.onResponseReceive(RazorPayResponse(
StatusConstant.SUCCESS.value,
RezorPayData(
RazorpaySuccessResponse(
response.razorpay_payment_id,
response.razorpay_order_id,
response.razorpay_signature),
null)));
// print(response);
}),
prefill: Prefill(
name: options["name"],
email: options["email"],
contact: options["contact"]),
notes: Notes(address: options["address"]),
theme: RazorTheme(color: options["color"])));