-
Notifications
You must be signed in to change notification settings - Fork 255
Issue #2870040 by mglaman: Remove payment method from order if there ...#719
Open
mglaman wants to merge 3 commits intodrupalcommerce:8.x-2.x from
Open
Issue #2870040 by mglaman: Remove payment method from order if there ... #719mglaman wants to merge 3 commits intodrupalcommerce:8.x-2.x from
mglaman wants to merge 3 commits intodrupalcommerce:8.x-2.x from
Conversation
@bojanz
bojanz
force-pushed
the
8.x-2.x
branch
5 times, most recently
from
April 21, 2017 19:23
1028fc1 to
005e904
Compare
@mglaman
mglaman
force-pushed
the
2870040-decline-order-payment-method
branch
from
April 23, 2017 09:18
69a6f15 to
a0d6592
Compare
Contributor
Author
mglaman
commented
Apr 23, 2017
The test failures have to do with orders which have have payment gateway reference but no payment method.
...is a decline exception
@mglaman
mglaman
force-pushed
the
2870040-decline-order-payment-method
branch
from
April 23, 2017 09:37
a0d6592 to
d705c25
Compare
mglaman
mglaman
commented
Apr 23, 2017
catch (DeclineException $e) {
$message = $this->t('We encountered an error processing your payment method. Please verify your details and try again.');
drupal_set_message($message, 'error');
$this->order->get('payment_gateway')->setValue(NULL);
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bojanz If we do not remove this.. then the chain of logic here fails, which is another bug. Not sure if I should fix here or not.
$default_option = NULL;
if ($order_payment_method) {
$default_option = $order_payment_method->id();
}
elseif ($order_payment_gateway && !($order_payment_gateway instanceof SupportsStoredPaymentMethodsInterface)) {
$default_option = $order_payment_gateway->id();
}
Returns payment gateway... which is not a method.
$selected_option = $pane_form['payment_method'][$default_option];
$payment_gateway = $payment_gateways[$selected_option['#payment_gateway']];
if ($payment_gateway->getPlugin() instanceof SupportsStoredPaymentMethodsInterface) {
This supports no reconciliation for the fact we have a gateway ID. So I suppose the thing to do is remove returning gateway ID?
@bojanz
bojanz
force-pushed
the
8.x-2.x
branch
2 times, most recently
from
April 27, 2017 20:46
6be1d5c to
b8a7444
Compare
@bojanz
bojanz
force-pushed
the
8.x-2.x
branch
from
August 10, 2017 17:37
5b3779b to
2941d08
Compare
@bojanz
bojanz
force-pushed
the
8.x-2.x
branch
from
September 12, 2017 23:36
53ec70a to
3bc1b88
Compare
# Conflicts: # modules/payment/src/Plugin/Commerce/CheckoutPane/PaymentProcess.php
@bojanz
bojanz
force-pushed
the
8.x-2.x
branch
from
October 8, 2018 15:18
807c6e8 to
8898142
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
...is a decline exception