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

RequestOptions missing ClientSecret properties #1378

Closed
alessandroghizzardi opened this issue Nov 8, 2018 · 3 comments
Closed

RequestOptions missing ClientSecret properties #1378

alessandroghizzardi opened this issue Nov 8, 2018 · 3 comments
Assignees

Comments

@alessandroghizzardi
Copy link

I've read in the documentation che Stripe.NET is intended to be used client side, and so any source retrieved with SourceService.Get method should have the private key provided. Calling a Source using the public key and source id returns a "missing client secret" error.
This behaviour doesn't consider the use of Stripe.NET in Xamarin as a client side library for Stripe enabled mobile application. Here we need to use Public key to tokenize a credit card, and use a 3D Secure source to check if it's available. We cannot retrieve back the 3D Secure source to check if the authorization has been provided or not. Right now we switched back to the REST API that allow passing the client secret.

Suggested changes are

  • Add a property ClientSecret to the RequestOptions Object
  • In Requestor.GetRequestMessage (or in SourceInstance.InstanceUrl, or where applicable) read the ClientSecret value and add it to the request
@remi-stripe
Copy link
Contributor

@alessandroghizzardi Thanks for the report! I think we will instead change the prototype of Get to allow you to pass a custom Options class that would have ClientSecret. We're going to work on a fix and hopefully release it next week.

@ob-stripe
Copy link
Contributor

@alessandroghizzardi As of v21.2.0, you can do something like this:

var options = new SourceGetOptions
{
  ClientSecret = "src_client_secret_123",
};
var source = sourceService.Get(sourceId, options);

@alessandroghizzardi
Copy link
Author

@alessandroghizzardi As of v21.2.0, you can do something like this:

var options = new SourceGetOptions
{
  ClientSecret = "src_client_secret_123",
};
var source = sourceService.Get(sourceId, options);

Top! Thank you!

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

3 participants