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
The serialization of the paymentMethod property in the NewPayment class is not producing the desired JSON format. The generated JSON encompasses the payment method object in quotes, treating it as a string. This is being caused by the type in NewPayment where it defines the NewPayment property in itself. It annotates the object as "mixed" but it should be "TheLogicStudio\ExactPayments\Models\Operations\PaymentMethod".
The effect of the "mis-serialization" is the exact server returning a 400 Bad request & not being able to process the payment.
A simple change of the annotation in Models\Shared\NewPayment.php fixes the issue. I would've made a pull request but as this repo is handled by speakeasy I wasn't sure of the procedure 🙌
The serialization of the paymentMethod property in the NewPayment class is not producing the desired JSON format. The generated JSON encompasses the payment method object in quotes, treating it as a string. This is being caused by the type in NewPayment where it defines the NewPayment property in itself. It annotates the object as "mixed" but it should be "TheLogicStudio\ExactPayments\Models\Operations\PaymentMethod".
The effect of the "mis-serialization" is the exact server returning a 400 Bad request & not being able to process the payment.
Expected JSON request:
{
...
"paymentMethod": {"token": "$TOKEN"}
}
Actual Behavior
{
"paymentMethod": "{"token":"$TOKEN"}"
}
A simple change of the annotation in Models\Shared\NewPayment.php fixes the issue. I would've made a pull request but as this repo is handled by speakeasy I wasn't sure of the procedure 🙌
https://github.com/speakeasy-sdks/exactpayments-php/issues
The text was updated successfully, but these errors were encountered: