public void OnButtonClicked(Object sender, EventArgs e) { var judo = new Judo() { JudoId = "100583-590", Token = "hZGImISgKx0YYNeC", Secret = "6dbc37c9a11acd021594fbdc8d3518a145ebe67af16a8ae0011f1522187c3b50", Environment = JudoEnvironment.Sandbox, Amount = 0.01m, Currency = "GBP", ConsumerReference = "YourUniqueReference" }; var theme = new Theme { ButtonBackgroundColor = Color.Maroon, EntryTextColor = Color.Black }; judo.Theme = theme; var paymentPage = new PaymentPage(judo); paymentPage.ResultHandler += PaymentResultHandler; Navigation.PushAsync(paymentPage); }
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); }
public void Payment(Judo judo) { Intent intent = new Intent(CrossCurrentActivity.Current.Activity, typeof(AndroidPayActivity)); var json = JsonConvert.SerializeObject(judo); intent.PutExtra(AndroidPayActivity.JudoExtra, json); CrossCurrentActivity.Current.Activity.StartActivity(intent); }
private void BtnCheckOut_Clicked(object sender, EventArgs e) { var judo = new Judo() { JudoId = "100699-396", Token = "vNJCgGYhlY1CSPCh", Secret = "9b9311eadf62a180d8e7f7c9224f831f6fae0dbdb15e61c29f52b85b33deb8a3", Environment = JudoEnvironment.Sandbox, Amount = 1.50m, Currency = "USD", ConsumerReference = "YourUniqueReference" }; var paymentPage = new PaymentPage(judo); Navigation.PushAsync(paymentPage); paymentPage.resultHandler += Handler; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.AndroidPay); _judo = JsonConvert.DeserializeObject <Judo>(Intent.GetStringExtra(JudoExtra)); _paymentService = new PaymentService(_judo); if (savedInstanceState == null) { var walletOptions = new WalletClass.WalletOptions.Builder().SetEnvironment(WalletEnvironment).Build(); _googleApiClient = new GoogleApiClient.Builder(this) .AddApi(WalletClass.API, walletOptions) .EnableAutoManage(this, this) .Build(); CreateWalletFragment(); CheckGooglePayAvailable(); } }