When we implement the on the android then it give me an error, Error: onPaymentError probably not implemented in your activate. this is my code which implemented by the xamarin android.
- public class MediaService : Java.Lang.Object, IMediaService, IPaymentResultWithDataListener
- {
- public void OnPaymentError(int p0, string p1, PaymentData p2)
- {
- throw new NotImplementedException();
- }
- public void OnPaymentSuccess(string p0, PaymentData p1)
- {
- throw new NotImplementedException();
- }
- public async Task Rezorpement()
- {
- Checkout checkOut = new Checkout();
- checkOut.SetKeyID("rzp_test_njHDC3yxiupZqA");
- MainActivity activity = Forms.Context as MainActivity;
- try
- {
- JSONObject options = new JSONObject();
- options.Put("description", "My Sample Payment activity");
- options.Put("order_id", "order_EAMgUyLXrMfbmL");
- options.Put("currency", "INR");
- options.Put("amount", "100");
- checkOut.Open(activity, options);
- }
- catch (Exception ex)
- {
- Console.WriteLine("error in payment");
- }
- }
- }