Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Payment
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 May 2018 at 20:24 UTC
Updated:
21 May 2018 at 21:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mglamanThe problem can be seen in #2965800: After update to latest dev, "paymentProfileId' element is invalid" error.
When there is no "owner ID" we assume the user is anonymous. So we try to extract the remote customer profile ID and remote payment ID from the payment method ID. When the user is logged in, the payment method remote ID is only the remote payment profile ID.
We can do a fix in Authorize.net but we should be filtering payment methods.
After
We should then filter out payment methods whose
payment_gateway_modedo not match the payment gateway'sgetModeresult.Comment #3
thejacer87 commentedupon initial testing, this seemed to filter out the methods for me
Comment #4
bojanz commentedWouldn't it make more sense to perform the filtering here, in PaymentMethodStorage::loadReusable()? That would also allow it to be performed on the query level.
Comment #5
thejacer87 commentedhere's the new patch, pretty sure
$payment_gateway->getPluginConfiguration()['mode']is the best way to get the gateway's modeComment #6
mglamanI'd like to have test coverage here. I think we're missing generic coverage of our payment gateway mode logics.
Comment #8
mglamanWe should use
$payment_gateway->getPlugin()->getMode(). Writing tests and wrapping this up.Comment #9
mglamanHere is fix using proper method and tests that changing the payment gateway's mode does not load the previous payment methods as being reusable.
Comment #11
mglamanFixed!