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

Separate purchace listener flash #953

Merged

Conversation

umpirsky
Copy link
Contributor

No description provided.

$this->addFlash($state = $payment->getState());

if (in_array($state, array(PaymentInterface::STATE_PENDING, PaymentInterface::STATE_PROCESSING, PaymentInterface::STATE_COMPLETED))) {
if (in_array($event->getSubject()->getState(), array(PaymentInterface::STATE_PENDING, PaymentInterface::STATE_PROCESSING, PaymentInterface::STATE_COMPLETED))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

As you already get $payment please re-use that variable.

@winzou
Copy link
Contributor

winzou commented Feb 3, 2014

@umpirsky can you update the event as well? It's using Sylius\Bundle\PayumBundle\Event\PurchaseCompleteEvent, but this event must be in Core now, not in Payum anymore.

@umpirsky
Copy link
Contributor Author

umpirsky commented Feb 3, 2014

@winzou Done.

@winzou
Copy link
Contributor

winzou commented Feb 3, 2014

Awesome! Good to merge for me if tests are passing.

@stloyd stloyd added this to the 1.0.0-BETA1 milestone Feb 3, 2014
pjedrzejewski pushed a commit that referenced this pull request Feb 3, 2014
@pjedrzejewski pjedrzejewski merged commit d7e11bd into Sylius:master Feb 3, 2014
@pjedrzejewski
Copy link
Member

Thank you Sasha!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants