Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Payment
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Sep 2017 at 18:11 UTC
Updated:
8 Nov 2017 at 15:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jackbravo commentedHere is the patch.
And also the PR: https://github.com/drupalcommerce/commerce/pull/783
Comment #3
bojanz commentedI think it would be more natural to pass the payment instead.
"Here's this pending thing, show how to complete it".
It still gives you the order via $payment->getOrder(), of course.
Comment #4
jackbravo commentedI agree. But I'm not sure how to get the payment from the order =P.
This is the code we have on commerce_payment_preprocess_commerce_checkout_completion_message(&$variables):
Maybe it is just querying the database for the last payment for that order?
Comment #5
bojanz commentedRetitling. Updating status.
We need something like:
Comment #6
jackbravo commentedThis is the new patch with this changes. I have also updated the PR.
Comment #7
jackbravo commentedThat piece of code worked just as intended =). Thanks!
The PR is updated now and here is the patch.
Comment #8
mglamanI went ahead and rebased your PR and changed the commit message to match the Drupal.org commit message suggestion. Want to make sure bojanz thumbs up this.
Comment #10
bojanz commentedThanks!
Comment #11
ndf commentedNote that this can break modules that implement the RC2 interface. (The RC2 interface does not have the $payment parameter).
Unless on the implementing side you use:
When you use this interface and want to support commerce-RC2, you should use the
= NULLdefault value.Comment #13
fathershawnAs noted in #11 this was a breaking change after entering RC - was there a change record created? I did not find one.
Comment #14
bojanz commentedLooks like we forgot to add one. The change was introduced in RC3.
Would you like to do the honors?
Comment #15
fathershawnSure, thanks! Draft created for your review: https://www.drupal.org/node/2921869
Comment #16
bojanz commentedThanks! Published.