-
Notifications
You must be signed in to change notification settings - Fork 2
Performing a Payment
James Goodwin edited this page Mar 24, 2017
·
14 revisions
Check that you have initialized the SDK before attempting to make a payment.
var judo = new Judo()
{
JudoId = "<JUDO_ID>",
ApiToken = "<API_TOKEN>",
ApiSecret = "<API_SECRET>",
Environment = JudoEnvironment.Sandbox,
Amount = 1.50m,
Currency = "GBP",
ConsumerReference = "YourUniqueReference"
};
Note: Please make sure that you are using a unique Consumer Reference for each different consumer.
var paymentPage = new PaymentPage(judo);
Navigation.PushAsync(paymentPage);
paymentPage.resultHandler += async (sender, result) =>
{
if ("Success".Equals(result.Response.Result))
{
// handle successful payment
// close payment page
await Navigation.PopAsync();
}
};