Skip to content

Conversation

@ithielnor
Copy link

There is no extra dependency on Json in RestSharp.

Breaking Change: removed AmountInDecimal from ProcessPaymentRequest.

Also removed AmountInDecimal from ProcessPaymentRequest. I don't think
the api wrapper should try to handle currency corrections. User should
know what the Spreedly currency unit is for their case.
Also fix build error in PaymentModule
@ithielnor
Copy link
Author

Just realized that I didn't redo the serialization on the domain. Maybe we need to use the default Xml libraries instead of RestSharp's implementation.

@philjones88
Copy link
Owner

These 2 PR's are interesting. I should get time soon to run these through several projects unit tests and integration tests to try and spot any issues with the swap over.

Are you using this in a project that is live? Or are you desperately waiting on updated nuget packages :)

@ithielnor
Copy link
Author

I'm working on a new features for an existing project that we are converting to Spreedly. Nothing live yet.

I'm gonna see if I can modify these PRs to use System.Xml.Serialization instead of RestSharp.Serialize as you've got a lot of attribute mapping which could be hard to convert to RestSharp.

@philjones88
Copy link
Owner

Yeh. I wanted clean C#, hence the attributes. The original names from the spreedly API aren't very C# friendly with underscores etc. Is there not something similar in RestSharp?

@ithielnor
Copy link
Author

Yes, but only with one attribute: SerializeAs and they don't support for ignoring properties.

Regardless, I've created a RequestWrapper which uses the system XmlSerializer. So long as all requests are created with RequestWrapper instead of RestRequest it should be good.

All tests are passing, and I've confirmed I can create and redact gateways using the web sample. I haven't tested payments on the sample yet as I have to configure a public site to test it on.

@ithielnor
Copy link
Author

Just tested payments and they are working too.

Also update request names to verbs
This is ugly, but I don't know of a better work around except
IXmlSerializable
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

Successfully merging this pull request may close these issues.

2 participants