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

Billing address is undefined in custom payment provider #10196

Closed
kocendavid opened this issue Nov 21, 2024 · 1 comment
Closed

Billing address is undefined in custom payment provider #10196

kocendavid opened this issue Nov 21, 2024 · 1 comment

Comments

@kocendavid
Copy link

kocendavid commented Nov 21, 2024

Bug report

Describe the bug

The flow is very simple user enters billing address, chooses shipping option and if all then is allowed to go to payment provider. The payment provider is custom and I have implemented initiate payment and update payment.
When selecting payment provider both initiate and update payment are missing billing address in the context even though I can see billing address and billing address id in cart.

Custom payment provider doesnt get billing address in the context in initiate and update functions

System information

"@medusajs/admin": "7.1.14",
"@medusajs/cache-inmemory": "^1.8.8",
"@medusajs/cache-redis": "^1.9.0",
"@medusajs/event-bus-local": "^1.9.6",
"@medusajs/event-bus-redis": "^1.8.9",
"@medusajs/file-local": "^1.0.2",
"@medusajs/medusa": "1.20.0",
"@medusajs/types": "1.11.16",
"@tanstack/react-query": "4.22.0",
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"dotenv": "16.0.3",
"express": "^4.17.2",
"medusa-custom-attributes": "1.0.17",
"medusa-file-minio": "^1.3.0",
"medusa-fulfillment-manual": "^1.1.38",
"medusa-interfaces": "1.3.9",
"medusa-payment-manual": "^1.0.24",
"medusa-payment-stripe": "6.0.9",
"medusa-plugin-sendgrid": "^1.3.13",
"postinstall-postinstall": "^2.1.0",
"prism-react-renderer": "^2.0.4",
"typeorm": "^0.3.16",
"xml2js": "^0.6.2"

Node.js version: 20x
Database:
Operating system: win/mac

Expected behavior

Custom payment provider gets passed billing address everytime its present in cart

@kasperkristensen
Copy link
Contributor

kasperkristensen commented Nov 21, 2024

Hi @kocendavid, when you Initialize a payment session in your storefront, you can pass billing_address in the context field of the payload. We don't automatically populate the field.

See https://docs.medusajs.com/api/store#payment-collections_postpaymentcollectionsidpaymentsessions

@linear linear bot closed this as completed Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants