public PaymentService(JudoPayApi judoAPI, Judo judo) { _judoAPI = judoAPI; _judo = judo; clientService = DependencyService.Get<IClientService>(); CycleSession(); }
public JudoPKPaymentAuthorizationViewControllerDelegate(Judo judo, ApplePayModel applePayModel, JudoSuccessCallback success, JudoFailureCallback failure, IApplePayRequest applePayRequest) { _successCallBack = success; _failureCallback = failure; _applePayModel = applePayModel; _judo = judo; _applePayRequest = applePayRequest; }
public TokenPaymentPage(Judo judo, TokenPaymentDefaultsViewModel model) : base(judo, model) { tokenViewModel.Amount = Judo.Amount; tokenViewModel.JudoID = Judo.JudoId; tokenViewModel.Currency = Judo.Currency; tokenViewModel.ConsumerReference = Judo.ConsumerReference; tokenViewModel.Token = model.CardToken; tokenViewModel.ConsumerToken = model.ConsumerToken; }
public void payment(Judo judo) { Intent intent = new Intent(Xamarin.Forms.Forms.Context, typeof(AndroidPayActivity)); var json = JsonConvert.SerializeObject(judo); intent.PutExtra(AndroidPayActivity.JudoExtra, json); Xamarin.Forms.Forms.Context.StartActivity(intent); }
protected static Judo GetJudo() { var config = new Judo(); config.ApiToken = Credentials.Token; config.ApiSecret = Credentials.Secret; config.JudoId = Credentials.JudoId; config.Environment = JudoEnvironment.Sandbox; return config; }
public CardEntryPage(Judo judo) { PaymentService = new ServiceFactory().GetPaymentService(judo); Judo = judo; _acceptedCardNetworks = _cardNetworkDiscoverer.GetAvailableCardNetworks(); Presenter = new TransactionPresenter(this); InitializeComponent(); InitializeView(); }
public PaymentPage(Judo judo, PaymentDefaultsViewModel defaults) : base(judo, defaults) { if (!Judo.AmexAccepted) { SetAmexAsUnaccepted(); } if (!Judo.MaestroAccepted) { SetMaestroAsUnaccepted(); } }
public bool IsApplePayAvailable(Judo judo) { var paymentNetworks = new List<NSString>(); paymentNetworks.Add(PKPaymentNetwork.Visa); paymentNetworks.Add(PKPaymentNetwork.MasterCard); if (judo.AmexAccepted) { paymentNetworks.Add(PKPaymentNetwork.Amex); } return PKPaymentAuthorizationViewController.CanMakePayments && PKPaymentAuthorizationViewController.CanMakePaymentsUsingNetworks(paymentNetworks.ToArray()); }
void PerformApplePayAction(Judo judo, ApplePayModel model, JudoSuccessCallback success, JudoFailureCallback failure, IApplePayRequest applePayRequest) { try { PKPaymentRequest request = GetPKPaymentRequest(model); var rootView = GetCurrentViewController(); var pkDelegate = new JudoPKPaymentAuthorizationViewControllerDelegate(judo, model, success, failure, applePayRequest); PKPaymentAuthorizationViewController pkController = new PKPaymentAuthorizationViewController(request) { Delegate = pkDelegate }; rootView.PresentViewController(pkController, true, null); } catch (Exception e) { var judoError = new JudoError { Exception = e.InnerException }; failure(judoError); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.AndroidPay); _judo = JsonConvert.DeserializeObject<Judo>(Intent.GetStringExtra(JudoExtra)); _paymentService = new ServiceFactory().GetPaymentService(_judo); if (savedInstanceState == null) { _googleApiClient = new GoogleApiClient.Builder(this) .AddApi(WalletClass.API, new WalletClass.WalletOptions.Builder() .SetEnvironment(WalletEnvironment) .Build()) .EnableAutoManage(this, this) .Build(); CreateWalletFragment(); CheckAndroidPayAvailable(); } }
public RegisterCardPage(Judo judo) : this(judo, new PaymentDefaultsViewModel()) { }
public CardEntryPage(Judo judo, TokenPaymentDefaultsViewModel defaults) : this(judo) { _isTokenPayment = true; SetUpDefaults(defaults); }
public CardEntryPage(Judo judo, PaymentDefaultsViewModel defaults) : this(judo) { SetUpDefaults(defaults); }
internal IPaymentService GetPaymentService(Judo judo) { var factory = new ServiceFactory(); return factory.GetPaymentService(judo); }
public IPaymentService GetPaymentService (Judo judo) { var judoApi = JudoPaymentsFactory.Create (judo.Environment, judo.ApiToken, judo.ApiSecret); return new PaymentService (judoApi, judo); }
IPaymentService GetPaymentService(Judo judo) { return new ServiceFactory().GetPaymentService(judo); }
public void PreAuth(Judo judo, ApplePayModel model, JudoSuccessCallback success, JudoFailureCallback failure) { var paymentService = GetPaymentService(judo); PerformApplePayAction(judo, model, success, failure, new ApplePayPreAuthRequest(paymentService)); }
public PaymentPage(Judo judo) : this(judo, new PaymentDefaultsViewModel()) { }