Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array to string conversion CardBrand error #19

Open
james-ingold opened this issue Nov 26, 2024 · 1 comment
Open

Array to string conversion CardBrand error #19

james-ingold opened this issue Nov 26, 2024 · 1 comment

Comments

@james-ingold
Copy link

Error can occur after a capture response when returning the transaction back to the UI and having to json serialize it. Need to properly handle the availableNetworks array. I don't have a debug id but here is the relevant call stack:

paypal-server-sdk/src/Models/CardResponse.php in PaypalServerSdkLib\Models\CardResponse::jsonSerialize at line 298
paypal-server-sdk/src/Models/CardBrand.php in PaypalServerSdkLib\Models\CardBrand::checkValue at line 115

Patch fix is here

@LeonarthusMectus
Copy link

@james-ingold

As per usual, thank you for the report. I think the fix seems quite reasonable and I'm going to see if/when we can get this worked into the SDK generator.

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

No branches or pull requests

2 participants