public WebVerificationPage(PaymentRequiresThreeDSecureModel model, EventHandler<CardVerificationResult> handler, string loadingTextLabel) { this.model = model; this.handler = handler; this.loadingTextLabel = loadingTextLabel; InitializeComponent(); LoadWebPage(); }
public void OnDisplay3dSecure(PaymentRequiresThreeDSecureModel result) { WebVerificationPage webVerificationPage = new WebVerificationPage(result, async (sender, webResult) => { Presenter.HandleResult(await PaymentService.Complete3DSecure(result.ReceiptId, webResult.paRes, webResult.md)); await Navigation.PopModalAsync(); }); Navigation.PushModalAsync(webVerificationPage); }
public WebVerificationPage(PaymentRequiresThreeDSecureModel model, EventHandler<CardVerificationResult> handler) : this(model, handler, "Verifying card") { }
public static void SummonThreeDSecure (PaymentRequiresThreeDSecureModel threedDSecureReceipt, SecureWebView secureWebView) { secureWebView.ReceiptID = threedDSecureReceipt.ReceiptId; NSCharacterSet allowedCharecterSet = NSCharacterSet.FromString (@":/=,!$&'()*+;[]@#?").InvertedSet; NSString paReq = new NSString (threedDSecureReceipt.PaReq); var encodedPaReq = paReq.CreateStringByAddingPercentEncoding (allowedCharecterSet); NSString termUrl = new NSString ("judo1234567890://threedsecurecallback"); var encodedTermUrl = termUrl.CreateStringByAddingPercentEncoding (allowedCharecterSet); NSUrl url = new NSUrl (threedDSecureReceipt.AcsUrl); NSMutableUrlRequest req = new NSMutableUrlRequest (url); NSString postString = new NSString ("MD=" + threedDSecureReceipt.Md + "&PaReq=" + encodedPaReq + "&TermUrl=" + encodedTermUrl + ""); NSData postData = postString.Encode (NSStringEncoding.UTF8); req.HttpMethod = "POST"; req.Body = postData; try { DispatchQueue.MainQueue.DispatchAfter (DispatchTime.Now, () => { secureWebView.LoadRequest (req); JudoSDKManager.HideLoading (); secureWebView.Hidden = false; }); } catch (Exception e) { if (secureWebView._failureCallback != null) { var judoError = new JudoError { Exception = e }; secureWebView._failureCallback (judoError); } } }