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

Fixed bug in payment flow #2758

Merged
merged 2 commits into from
May 26, 2015
Merged

Fixed bug in payment flow #2758

merged 2 commits into from
May 26, 2015

Conversation

antonioperic
Copy link
Contributor

I noticed that if you are using CreditCard for payment and if you change your mind on page where you need to enter your credit card, jump back to payment methods and pick something else for example offline that there is bug and you cannot complete payment. This PR fix it

I noticed that if you are using CreditCard for payment and if you change your mind on page where you need to enter your credit card, jump back to payment methods and pick something else for example offline that there is bug and you cannot complete payment. This PR fix it
@pjedrzejewski
Copy link
Member

@makasim WDYT?

@@ -71,6 +71,8 @@ public function createOrderPayment(GenericEvent $event)
{
if (false === $this->getOrder($event)->getLastPayment()) {
$this->paymentProcessor->createPayment($this->getOrder($event));
} else {
$this->getOrder($event)->getLastPayment()->setDetails(array());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not think we have to change the last payment but rather create a new one so an admin can see the whole history, like user selected one payment but than changed his mind and selected another one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

then just remove if and always create new?

Copy link
Contributor

Choose a reason for hiding this comment

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

@antonioperic yeap sounds better

pjedrzejewski pushed a commit that referenced this pull request May 26, 2015
@pjedrzejewski pjedrzejewski merged commit 61ef5ba into Sylius:master May 26, 2015
@pjedrzejewski
Copy link
Member

Thank you Antonio! 👍

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

3 participants