Registering a Card

James Goodwin edited this page Mar 24, 2017 · 3 revisions

Check that you have initialized the SDK before attempting to make a Card registration.

1. Configuring the Judo instance

var judo = new Judo()
    JudoId = "<JUDO_ID>",
    ApiToken = "<API_TOKEN>",
    ApiSecret = "<API_SECRET>",
    Environment = JudoEnvironment.Sandbox,
    ConsumerReference = "YourUniqueReference"

Note: Please make sure that you are using a unique Consumer Reference for each different consumer.

2. Create a PaymentPage to show the card entry screen

var registerCardPage = new RegisterCardPage(judo);

3. Receive the payment result

registerCardPage.resultHandler += async (sender, result) =>
    if ("Success".Equals(result.Response.Result))
        // save card token for future use
        var receipt = result.Response as PaymentReceiptModel;

        // close register card page
        await Navigation.PopAsync();
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.