package com.razorpay.rn.custom;

import android.app.Activity;

import com.razorpay.PaymentResultWithDataListener;
import com.razorpay.Razorpay;

/**
 * Razorpay subclass used by the native OTP flow: the flow runs headless on the
 * module's instance (no submit() call), so the payment result listener has to
 * be registered through the protected field inherited from the SDK.
 */
public class RnRazorpay extends Razorpay {

    public RnRazorpay(Activity activity) {
        super(activity);
    }

    public RnRazorpay(Activity activity, String key) {
        super(activity, key);
    }

    public void setPaymentResultListener(PaymentResultWithDataListener listener) {
        this.paymentResultWithDataListener = listener;
    }
}
