-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Impossible to configure custom availability gateway validator #5857
Comments
Hi @ytorbyk, please, post DI configuration for virtual type of your custom payment adapter. |
Here it is: You can check this bug even on Braintree payment method, just try to add availability validator to the braintree validator pool. |
Looks like configuration is correct. We will investigate this issue, but strange behaviour because on the latest develop branch the |
I tested locally on the latest commit on the develop branch with the same result. https://dl.dropboxusercontent.com/u/2008499/Screen%20Shot%202016-07-28%20at%2016.21.50.png Thank for quick response. |
Could you check the same behaviour for one of Magento payments, for example, Braintree? Just to check |
Yes, I have checked on Braintree payment method. The result on the those screenshots, |
Hi, @ytorbyk.
I've created internal ticket MAGETWO-56115. |
Yes, thank you. One more thing, availability validator should be called even if payment isn't set to quote yet, shouldn't it? Moreover, quote has to be always passed to the validator if it is already created. Is it correct? |
In the current implementation - no, because
Not quote, but payment. |
So if payment is not set to quote the validator cannot reach quote, correct? If yes. |
Validator works with quote payment, not with a quote https://github.com/magento/magento2/blob/develop/app/code/Magento/Payment/Model/Method/Adapter.php#L274.
This logic should be specified in the quote module, not in payment. Payment shouldn't depend on quote details. |
…lity gateway validator - Added check for payment info instance availability
Fixed issues: - MAGETWO-56344: [Github] #5902 Braintree doesn't work when using table prefixing - MAGETWO-55953: Exception occurs when tracking shipment with invalid FedEx tracking number - MAGETWO-56801: [GITHUB] Fixed column description for "website_id" column #4388 - MAGETWO-56745: [Github] PayPal Express Checkout "Display on Shopping Cart -> NO" does not work - MAGETWO-56467: Free shipping threshold fields are mixed up in UPS and Fedex configurations - MAGETWO-56342: [Github] #5910 Braintree sandbox errors when using alternative Merchant Account ID - MAGETWO-56115: [Github] #5857 Impossible to configure custom availability gateway validator - MAGETWO-54134: CE module depends on EE code - MAGETWO-56447: UPS not providing shipping rates for Puerto Rico
Hi @ytorbyk Fix for MAGETWO-56115 ticket is already merged to develop branch. |
Resolved Issues: - MC-34467: Updated jQuery File Upload plugin - MC-34174: Adding sorting validation - MC-35076: Catalog Event Update
Preconditions
Magento 2.1.0 is used
Steps to reproduce
I try to add custom availability validator to gateway validator pool
<virtualType name="MyPaymentValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool"> <arguments> <argument name="validators" xsi:type="array"> <item name="availability" xsi:type="string">Vendor\Name\Gateway\Validator\AvailabilityValidator</item> </argument> </arguments> </virtualType>
Expected result
Actual result
It is caused because result of $this->getInfoInstance() method call is always null (inside the
\Magento\Payment\Model\Method\Adapter::isAvailable method).
The text was updated successfully, but these errors were encountered: