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

Some properties are missing in the object: "country_code". #16

Open
zallesov opened this issue Jan 8, 2025 · 1 comment
Open

Some properties are missing in the object: "country_code". #16

zallesov opened this issue Jan 8, 2025 · 1 comment

Comments

@zallesov
Copy link

zallesov commented Jan 8, 2025

Capture order throws an error for some users.
Code:

const client = getPaypalClient();
const ordersController = new OrdersController(client);
await ordersController.ordersCapture({ id: orderId });

Error:

Some properties are missing in the object: "country_code".

Given value: {"national_number":"533493751"}
Type: 'object'
Expected type: 'Optional<Lazy<Object<{countryCode,nationalNumber}>>>'
Path: purchase_units › 0 › shipping › phone_number

The response body indeed does not contain country_code in the phone number.
This should not fail order capturing.

@markus-gx
Copy link

Seems like a duplicate to #13
Having the same issue.

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