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

[Payum] Use converted amount for generic capture #6275

Merged
merged 2 commits into from
Oct 5, 2016

Conversation

inssein
Copy link
Contributor

@inssein inssein commented Oct 4, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Related tickets partially #6258
License MIT

*
* @return float
*/
private function convertAndFormatPrice($price, $currencyCode)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think convertPrice would be fine :)

$payumPayment->setTotalAmount($order->getTotal());
$payumPayment->setTotalAmount(
$this->convertAndFormatPrice($order->getTotal(), $order->getCurrencyCode())
);
$payumPayment->setCurrencyCode($order->getCurrencyCode());
$payumPayment->setClientEmail($order->getCustomer()->getEmail());
$payumPayment->setClientId($order->getCustomer()->getId());
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also fix the total that is included in the description (not visible in this diff, it's below this line).

@inssein
Copy link
Contributor Author

inssein commented Oct 4, 2016

@michalmarcinkowski done :)

@michalmarcinkowski
Copy link
Contributor

@Arminek does it look good?

@Arminek
Copy link
Contributor

Arminek commented Oct 5, 2016

👍

@pjedrzejewski pjedrzejewski merged commit e9f21ef into Sylius:master Oct 5, 2016
@pjedrzejewski
Copy link
Member

Thanks Hussein! :)

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.

None yet

4 participants