Binu Thayamkery - 127 - Mar 12, 2014

Servicestack.Stripe, when creating a customer, i get error “Received unknown parameter: accountBalance”. The same code runs with no errors from my test project, but fails when run from the site… 

Any clue why this might be the case?

Are you using any global JsConfig in your AppHost?

Binu Thayamkery:

Yes. 
ServiceStack.Text.JsConfig.EmitCamelCaseNames = true;
Do you think this creates an issue when serializing the request to Stripe?

If it’s the exact same code that’s failing I’m guessing it does, can you try testing after removing it so we can confirm?
Stripe expects lowercase_underscore naming, I can probably override that configuration when talking to Stripe.

Binu Thayamkery:

Yeah…this is the one killing me…i added this in my test and now test fails, resetting it made the test pass…
If I reset this in my service end point, and set it back whats the implication globally? since this is a global setting? Whats the scope of ServiceStack.Test settings from a per call basis?

Binu Thayamkery:

If you can do it in Stripe, that will be the cleanest I guess, since its a requirement from Stripe (being defensive)

Yep it should be possible to override using the JsConfig Scopes when talking to Stripe, I’ll look into it after I wake up.

Binu Thayamkery:

Does this mean you are replying to this while you are asleep :slight_smile:
Thanks for you continual support!

Close, I was making my way to sleep :). 
Should be fixed in this commit: https://github.com/ServiceStack/Stripe/commit/a8adce71b24d4f14b6a3b9b6282538f83da91f67

It’s currently deployed to MyGet:
https://github.com/ServiceStack/ServiceStack/wiki/MyGet

If you don’t want to use MyGet you can just include the StripeGateway.cs file until the next release on NuGet:
https://github.com/ServiceStack/Stripe/blob/master/src/Stripe/StripeGateway.cs

Binu Thayamkery:

Thanks Demis.
__________