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

addPaymentToOrder is not channel aware #773

Closed
martijnvdbrug opened this issue Mar 18, 2021 · 1 comment
Closed

addPaymentToOrder is not channel aware #773

martijnvdbrug opened this issue Mar 18, 2021 · 1 comment
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@martijnvdbrug
Copy link
Collaborator

Describe the bug
Payments are channel aware, but addPaymentToOrder mutation does not adhere to the channel awareness: It gets the first PaymentMethod by code and enabled=true

To Reproduce
Steps to reproduce the behavior:

  1. Create a payment-method in default channel
  2. Make sure you don't have payments in channel2
  3. addPaymentToOrder on channel2
  4. The order now has a payment from defaultchannel

Expected behavior
An error to be thrown, because no method is found

Environment (please complete the following information):

  • @vendure/core version: 1.0.0-beta-4
  • Nodejs version v12
  • Database (mysql/postgres etc): mysql

Additional context
https://github.com/vendure-ecommerce/vendure/blob/master/packages/core/src/service/services/payment-method.service.ts#L137

@martijnvdbrug martijnvdbrug added the type: bug 🐛 Something isn't working label Mar 18, 2021
@martijnvdbrug
Copy link
Collaborator Author

Currently working on this issue: running the test before creating a PR now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants