Comments (16)
In case it's helpful to you, we observed that the Braintree module would render all transactions error messages in its hosted fields section, even if the transaction error is coming from a vaulted credit card attempt. This was problematic for us because when using a vaulted payment method, the Braintree hosted fields section isn't visible (so neither were the error messages.)
We implemented a workaround where was observe any error messages added to that message container and clone them in a message container that's visible when using vaulted payment methods.
from magento2.
@sims-smith-corona This is the exact problem our site is facing. When placing an order with a vault/stored card that leads to some error, that error will be displayed within the Credit Card payment method which is inactive and hidden. So the customer has no idea why the payment isn't going through. Can you share your fix or what files I need to look at?
It's convoluted but effective.
We override the js/view/payment/method-renderer/vault.js with our own. During the component's initialization, we use setInterval() to fire a function that watches the Braintree Hosted Fields messages container HTML element to identify any new message elements that get injected and insert them into the vaulted payment method's component's messageContainer so they get rendered in the appropriate place on the page.
Here's the function that gets triggered by setInterval:
`copyHostedFieldsErrorMessages: function() {
var self = this;
var sourceMessageContainerElement = $('#braintree-hosted-fields .messages');
if(sourceMessageContainerElement.length == 1) {
var errorMessageElements = $(sourceMessageContainerElement).find('.message-error > div:not(.copied)');
$(errorMessageElements).each(function(messageIndex, messageElement) {
$(messageElement).addClass('copied');
self.messageContainer.addErrorMessage({message: $(messageElement).html(), parameters: []});
});
}
},`
from magento2.
Hi @sumeetmagento. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release- For more details, review the Magento Contributor Assistant documentation.
- Add a comment to assign the issue:
@magento I am working on this
- To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
π You can find the schedule on the Magento Community Calendar page.
π The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
from magento2.
@sims-smith-corona by vaulted payment methods, do you mean payment methods vaulted in Magento (and thereby Braintree as well)? or payment methods vaulted only in Braintree?
To load Braintree only payment methods vaulted, you would require Braintree's customer ID when generating a the braintree client token which is something the current version of the Magento Braintree module does not support for cards.
In this case, your issue is not related to the Braintree magento module but probably a 3rd party or some customisaton?
The module supports vaulting payment methods in Magento (with the token) which do not load the Hosted fields at all during checkout.
Apologies, I was just confused. Maybe a video recording of the issue could be useful?
from magento2.
@gene-roussetos Sorry for any confusion, but I'm not trying to report any issue or problem. I was just commenting to the original poster.
Our checkout is extremely customized which leads to a lot of nonstandard behavior, so that may be to blame, in our case, transaction errors resulting from failed authorizations using a vaulted Braintree credit card method would result in error messages being added to the hosted fields method renderer component's message container rather than vaulted method renderer's.
from magento2.
@sims-smith-corona fair, it is true that if the checkout is customised or using 3rd party modules, some errors might not be picked up straight away as this needs to be accommodated if not hitting the place order (set payment information and place order) API endpoint.
For all I know, in general, during the API place order action, PHP code is triggered to execute the Transaction process and a braintree error should be returned within a Localized exception to the frontend and a 400 error.
Then the checkout message manager displays that error. Not all errors are visible as is, as some might be hidden on purpose and a generic message is displayed. Or in other cases of course, it's been missed and the message is generic while it shouldn't.
from magento2.
Is there any update ?
from magento2.
Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: π
-
- Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
-
- Verify that issue has a meaningful description and provides enough information to reproduce the issue.
-
- Add
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.
- Add
-
- Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
- Verify that the issue is reproducible on
- Join Magento Community Engineering Slack and ask your questions in #github channel.
from magento2.
any update please ?
from magento2.
@magento give me 2.4-develop instance
from magento2.
Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.
from magento2.
Hi @engcom-Dash, here is your Magento Instance: https://502b55784256e05d31c9c262c7f390de.instances-prod.magento-community.engineering
Admin access: https://502b55784256e05d31c9c262c7f390de.instances-prod.magento-community.engineering/admin_c903
Login: 5ce230ee
Password: 0d053f7b8747
from magento2.
Thanks for reporting and collaboration.
Verified the issue on Magento 2.4 dev instance but the issue is not reproducible.
When there are insufficient funds in paypal account we are seeing error message.
Please refer the attached screenrecord
insufficient.balance.1.mov
from magento2.
We have noticed that this issue has not been updated since long time.β¨Hence we assume that this issue is fixed now, so we are closing it. Please feel to raise a fresh ticket or reopen this ticket if you need more assistance on this.
Thanks.
from magento2.
@sims-smith-corona This is the exact problem our site is facing. When placing an order with a vault/stored card that leads to some error, that error will be displayed within the Credit Card payment method which is inactive and hidden. So the customer has no idea why the payment isn't going through. Can you share your fix or what files I need to look at?
from magento2.
First of all, thank you for your reply on this old thread. I was surprised you actually replied and so quickly too. I faced some issues trying to implement this on Friday, but I tried again today and its working partially. It works on the first stored payment method/card. In my case, I have several stored cards and it doesn't show the error on any of the other cards, only the first one.
Update, i worked on it for the past two days and after a whole lot of changes and customizations I was finally able to make it work. Another big issue I faced was that the error was only showing up the first time not any subsequent times the error was triggered. Anyways, its working now, thank you again, your help gave me a good place to start in solving the issue.
from magento2.
Related Issues (20)
- Can't create a new store view in admin 2.4.7-p2 HOT 22
- GraphQl Products result is not cached HOT 1
- Non-Existent Images serving Placeholder Image return 200 Status instead of 404 Status affecting CDNs/Edge Servers/Browser Cache HOT 2
- Error SelectedShippingMethod on mutation setShippingMethodsOnCart is null HOT 5
- Unicode character breaks email template editor HOT 6
- In Backend, default store values for product attributes instead of admin values HOT 14
- Adding multiple products to cart with custom options GraphQL fails to compare custom options properly HOT 2
- Checkbox selection bug in product inventory source assignment: multiple checkboxes selected unexpectedly HOT 2
- GraphQl get configurable variant error HOT 2
- More permissions are needed to save this item on Magento EE 2.4.7p2 HOT 6
- Magento\TestFramework\Annotation\ConfigFixture Error HOT 1
- Moving a category breaks GraphQL filter by URL path HOT 2
- FedEx team blocking our shippings because of wrong imageType HOT 1
- FedEx Shipping unit blocked on LB HOT 1
- Images do not upload when added in the create variations step of a configurable HOT 5
- Backend: Customer grid not filtered accordingly to admin scope HOT 2
- Error 500 CSP HOT 1
- The 'A' in Affirm on website has empty blue box behind it on product listing HOT 14
- GraphQL Api layer is converting arrays to null where that should not happen. HOT 1
- Assign source HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento2.