Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment example doesn't work without a name for the pointer #54

Closed
WouterJanson opened this issue Dec 16, 2017 · 1 comment
Closed

Payment example doesn't work without a name for the pointer #54

WouterJanson opened this issue Dec 16, 2017 · 1 comment

Comments

@WouterJanson
Copy link
Contributor

Steps to reproduce:

Follow payment sample

What should happen:

should work just fine

What happens:

Bunq.Sdk.Exception.BadRequestException has been thrown
Pointer has no name set

Extra info:

Adding a name parameter to the constructor would fix it, sample should be rewritten to accommodate the new parameter.
see #53

@OGKevin OGKevin closed this as completed Dec 16, 2017
@OGKevin
Copy link
Contributor

OGKevin commented Dec 16, 2017

Hey @WouterJanson,
The sample, as you can see by these constants

        private const string COUNTERPARTY_POINTER_TYPE = "EMAIL";
        private const string COUNTERPARTY_EMAIL = "bravo@bunq.com";

is written to make a payment to an email address 👍.

Based on the error message you're getting I'm guessing that you tried to make a payment to an IBAN. In this case you must set the pointer name by doing the following:

            var pointer = new Pointer("The IBAN nr", "IBAN");
            pointer.Name = "The name of the receiver";

Because this is not an actual bug, ill close this issue. Feel free to comment nevertheless 🌈.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants