-
Notifications
You must be signed in to change notification settings - Fork 2
Performing a Pre Authorization
James Goodwin edited this page Mar 24, 2017
·
4 revisions
Check that you have initialized the SDK before attempting to make a pre-authorization.
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 preAuthPage = new PreAuthPage(judo);
Navigation.PushAsync(preAuthPage);
preAuthPage.resultHandler += async (sender, result) =>
{
if ("Success".Equals(result.Response.Result))
{
// handle successful payment
// close pre authorization page
await Navigation.PopAsync();
}
};