public void UserDidCancelPayPalProfileSharingViewController(PayPalProfileSharingViewController profileSharingViewController) { Debug.WriteLine("PayPal Profile Sharing Authorization Canceled"); profileSharingViewController?.DismissViewController(true, null); OnCancelled?.Invoke(); OnCancelled = null; }
public void UserDidCancelPayPalProfileSharingViewController(PayPalProfileSharingViewController profileSharingViewController) { Debug.WriteLine("PayPal Profile Sharing Authorization Canceled"); profileSharingViewController?.DismissViewController(true, null); _onCancelled?.Invoke(); _onCancelled = null; if (!_formsConfig.StoreUserData) { ClearUserData(); } }
public void PayPalProfileSharingViewController(PayPalProfileSharingViewController profileSharingViewController, NSDictionary profileSharingAuthorization) { Debug.WriteLine("PayPal Profile Sharing Authorization Success!"); profileSharingViewController.DismissViewController(true, () => { NSError err = null; NSData jsonData = NSJsonSerialization.Serialize(profileSharingAuthorization, NSJsonWritingOptions.PrettyPrinted, out err); NSString first = new NSString(""); if (err == null) { first = new NSString(jsonData, NSStringEncoding.UTF8); } else { Debug.WriteLine(err.LocalizedDescription); } OnSuccess?.Invoke(first.ToString()); OnSuccess = null; }); }