You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing an error which i assume is out of my hand (in case where i happen to not be missing anything obvious).
For context i am using the .net 6.0 package on a desktop application ,everything works fine except one specific case, the problem occurs when my checkout has a shipping address and i call the API to GET it i get the following error:
InvalidOperationException: Cannot get the value of a token type 'StartObject' as a string.
JsonException: The JSON value could not be converted to System.String. Path: $.shipping_address | LineNumber: 0 | BytePositionInLine: 704.
Now i am familiar with this the first part of the error which means frankly that the runtime was expecting a plain ordinary string but instead got a more complex object of another type.
Hence, i assume the example could be that the expected ShippingAddress value should be something like: ShippingAddress: "Algeria, Algiers"
but instead something like the following is received:
{
country: "Algeria",
state: "Algeirs"
}
I have tried multiple approaches to solve the issue but nothing of the mentioned worked, it's an INTERNAL error quite frankly.
PS note, my checkouts are created with the CollectShippingAddress field set to false, but after i redirect the client to the payment land page and the payment is done, somehow the country field on the checkout's shipping address are set to Algeria out of my will and that's what causes the later-on error.
Also, the country field is set only when the Payment is effectuated, meaning neither on cancel/expire... ect.
At last, here is the function that causes the error, which like i said does not work only when shippingAddress is not null:
I am facing an error which i assume is out of my hand (in case where i happen to not be missing anything obvious).
For context i am using the .net 6.0 package on a desktop application ,everything works fine except one specific case, the problem occurs when my checkout has a shipping address and i call the API to GET it i get the following error:
Now i am familiar with this the first part of the error which means frankly that the runtime was expecting a plain ordinary string but instead got a more complex object of another type.
Hence, i assume the example could be that the expected ShippingAddress value should be something like:
ShippingAddress: "Algeria, Algiers"
but instead something like the following is received:
I have tried multiple approaches to solve the issue but nothing of the mentioned worked, it's an INTERNAL error quite frankly.
PS note, my checkouts are created with the CollectShippingAddress field set to false, but after i redirect the client to the payment land page and the payment is done, somehow the country field on the checkout's shipping address are set to Algeria out of my will and that's what causes the later-on error.
Also, the country field is set only when the Payment is effectuated, meaning neither on cancel/expire... ect.
At last, here is the function that causes the error, which like i said does not work only when shippingAddress is not null:
The text was updated successfully, but these errors were encountered: