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

Mismatch between stripe transaction total and order total #1824

Merged

Conversation

carlowens
Copy link
Contributor

When purchasing products using multiple currencies and the Stripe payment method, the total amount of the order within Stripe is always using the base currency amount.

e.g. If I buy a product which is £60 (and default currency is GBP), and I purchase it in Euros, the correct amounts are shown within Sylius (say 90 euros), however it seems that purchasing the product then using the Stripe payment method, the total amount sent to the Stripe API is calculated using the default currency. So Stripe will receive 60 Euros not 90.

@pjedrzejewski
Copy link
Member

Thanks for catching this, I think we should use CurrencyConverter instead of templating helper. It is just matter of injecting different service here. Could you update the PR? :)

@carlowens
Copy link
Contributor Author

Updated :)
updated

/**
* @param CurrencyConverter $currencyConverter
*/
public function __construct(CurrencyConverter $currencyConverter)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the interface here, not the implementation. :)

@carlowens
Copy link
Contributor Author

updated

pjedrzejewski pushed a commit that referenced this pull request Aug 26, 2014
…ch-total

Mismatch between stripe transaction total and order total
@pjedrzejewski pjedrzejewski merged commit c1a49c1 into Sylius:master Aug 26, 2014
@pjedrzejewski
Copy link
Member

Haha, thanks Carl! 👍

pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
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

Successfully merging this pull request may close these issues.

2 participants