-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Hi.
I get a BadRequest when trying to use the Variables on CreatePaymentRequestParams
It might be a serialization issue caused by a previous change from e.g. NewtonSoft to System.Text.Json.
For example:
createPaymentParams.variables = [
new { name = "Test Name"},
new { street = "Test Street"}
];
This serializes to:
"variables":[{"name":"Test Name"},{"street":"Test Street"}]
And that returns BadRequest from Quickpay API:
{"message":"Validation error","errors":{"variables":["is invalid"]},"error_code":null}
If I change variables to be object and parse in Dictionary<string, object> and do the similar
createPaymentParams.variables = new Dictionary<string, object>()
{
{ "name","Test Name"},
{ "street","Test Street"}
};
I get serialized to:
"variables":{"name":"Test Name","street":"Test Street"}
And this request works for Quickpay, and I can see the variables in the management view.
Metadata
Metadata
Assignees
Labels
No labels
