mantis panwar

mantis panwar

  • NA
  • 224
  • 4.9k

Razor PaymentGateway (Xamarin.Android)

Feb 4 2020 3:50 AM
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.
 
  1. public class MediaService : Java.Lang.Object, IMediaService, IPaymentResultWithDataListener  
  2. {  
  3.     public void OnPaymentError(int p0, string p1, PaymentData p2)  
  4.     {  
  5.         throw new NotImplementedException();  
  6.     }  
  7.     public void OnPaymentSuccess(string p0, PaymentData p1)  
  8.     {  
  9.         throw new NotImplementedException();  
  10.     }  
  11.     public async Task Rezorpement()  
  12.     {  
  13.         Checkout checkOut = new Checkout();  
  14.         checkOut.SetKeyID("rzp_test_njHDC3yxiupZqA");  
  15.         MainActivity activity = Forms.Context as MainActivity;  
  16.         try  
  17.         {  
  18.             JSONObject options = new JSONObject();  
  19.             options.Put("description""My Sample Payment activity");  
  20.             options.Put("order_id""order_EAMgUyLXrMfbmL");  
  21.             options.Put("currency""INR");  
  22.             options.Put("amount""100");  
  23.             checkOut.Open(activity, options);  
  24.         }  
  25.         catch (Exception ex)  
  26.         {  
  27.             Console.WriteLine("error in payment");  
  28.         }  
  29.     }  
  30. }  

Answers (2)