magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.53k stars 9.31k forks source link

Ordering with Venmo payment method FAIL, but customer Venmo account is CHARGED #34059

Closed n2diving-dgx closed 3 years ago

n2diving-dgx commented 3 years ago

Upon upgrading from M2.3.7-p1 to M2.4.3, customers attempting to checkout and place orders using the Braintree Venmo payment method fail with Error message "Something went wrong with your request. Please try again later." There is no order received by Magento.

However, most IMPORTANTLY, the customer Venmo account is charged even though no order is successfully placed.

Steps to reproduce....

Install vanilla Magento 2.4.3 with Luma store sample data


In Magento 2.4.3 admin, configure Braintree Payments (by GENE Commerce)


Navigate to frontend Luma Store URL on mobile device with Venmo app installed and configured (tested with both iOS 14.7.1 + Safari and Android 11 + Chrome)

Note: Although a live Venmo account must be used to test with the Venmo app, the Sandbox setting in the store Braintree Payments credentials will not actually capture genuine funds from the account. The Sandbox setting will successfully override the genuine account and switch to the "venmojoe" account for sandbox testing.


In Magento Admin, view Sales > Orders and confirm no related order is present.


From CLI, in var/logs view system.log and find the following error for each payment attempt...

main.CRITICAL: Error: Cannot instantiate interface Magento\Vault\Api\Data\PaymentTokenInterfaceFactory in /home/dotdev/www/current/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121
Stack trace:
#0 /home/dotdev/www/current/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Vault\\A...', Array)
#1 /home/dotdev/www/current/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Vault\\A...')
#2 /home/dotdev/www/current/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\\Vault\\A...')
#3 /home/dotdev/www/current/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('PayPal\\Braintre...', Array)
#4 /home/dotdev/www/current/vendor/magento/framework/ObjectManager/TMap.php(140): Magento\Framework\ObjectManager\ObjectManager->create('PayPal\\Braintre...')
#5 /home/dotdev/www/current/vendor/magento/framework/ObjectManager/TMap.php(151): Magento\Framework\ObjectManager\TMap->initObject('vault_details')
#6 /home/dotdev/www/current/vendor/magento/module-payment/Gateway/Response/HandlerChain.php(49): Magento\Framework\ObjectManager\TMap->getIterator()
#7 /home/dotdev/www/current/vendor/paypal/module-braintree-core/Gateway/Command/GatewayCommand.php(116): Magento\Payment\Gateway\Response\HandlerChain->handle(Array, Array)
#8 /home/dotdev/www/current/vendor/paypal/module-braintree-core/Gateway/Command/CaptureStrategyCommand.php(127): PayPal\Braintree\Gateway\Command\GatewayCommand->execute(Array)
#9 /home/dotdev/www/current/vendor/magento/module-payment/Model/Method/Adapter.php(549): PayPal\Braintree\Gateway\Command\CaptureStrategyCommand->execute(Array)
#10 /home/dotdev/www/current/vendor/magento/module-payment/Model/Method/Adapter.php(464): Magento\Payment\Model\Method\Adapter->executeCommand('capture', Array)
#11 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Payment/Operations/ProcessInvoiceOperation.php(83): Magento\Payment\Model\Method\Adapter->capture(Object(Magento\Sales\Model\Order\Payment\Interceptor), 47)
#12 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Payment/Operations/CaptureOperation.php(73): Magento\Sales\Model\Order\Payment\Operations\ProcessInvoiceOperation->execute(Object(Magento\Sales\Model\Order\Payment\Interceptor), Object(Magento\Sales\Model\Order\Invoice\Interceptor), 'capture')
#13 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Payment/Processor.php(85): Magento\Sales\Model\Order\Payment\Operations\CaptureOperation->capture(Object(Magento\Sales\Model\Order\Payment\Interceptor), Object(Magento\Sales\Model\Order\Invoice\Interceptor))
#14 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Payment.php(488): Magento\Sales\Model\Order\Payment\Processor->capture(Object(Magento\Sales\Model\Order\Payment\Interceptor), Object(Magento\Sales\Model\Order\Invoice\Interceptor))
#15 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Invoice.php(346): Magento\Sales\Model\Order\Payment->capture(Object(Magento\Sales\Model\Order\Invoice\Interceptor))
#16 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Payment/Operations/AbstractOperation.php(73): Magento\Sales\Model\Order\Invoice->capture()
#17 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Payment/Operations/CaptureOperation.php(65): Magento\Sales\Model\Order\Payment\Operations\AbstractOperation->invoice(Object(Magento\Sales\Model\Order\Payment\Interceptor))
#18 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Payment/Processor.php(85): Magento\Sales\Model\Order\Payment\Operations\CaptureOperation->capture(Object(Magento\Sales\Model\Order\Payment\Interceptor), NULL)
#19 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Payment.php(488): Magento\Sales\Model\Order\Payment\Processor->capture(Object(Magento\Sales\Model\Order\Payment\Interceptor), NULL)
#20 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Payment.php(468): Magento\Sales\Model\Order\Payment->capture(NULL)
#21 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order/Payment.php(385): Magento\Sales\Model\Order\Payment->processAction('authorize_captu...', Object(Magento\Sales\Model\Order\Interceptor))
#22 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order.php(992): Magento\Sales\Model\Order\Payment->place()
#23 /home/dotdev/www/current/vendor/magento/module-sales/Model/Order.php(1214): Magento\Sales\Model\Order->_placePayment()
#24 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Model\Order->place()
#25 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\Order\Interceptor->___callParent('place', Array)
#26 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\Order\Interceptor->Magento\Framework\Interception\{closure}()
#27 /home/dotdev/www/current/generated/code/Magento/Sales/Model/Order/Interceptor.php(32): Magento\Sales\Model\Order\Interceptor->___callPlugins('place', Array, Array)
#28 /home/dotdev/www/current/vendor/magento/module-sales/Model/Service/OrderService.php(209): Magento\Sales\Model\Order\Interceptor->place()
#29 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Model\Service\OrderService->place(Object(Magento\Sales\Model\Order\Interceptor))
#30 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Model\Service\OrderService\Interceptor->___callParent('place', Array)
#31 /home/dotdev/www/current/vendor/magento/module-inventory-sales/Plugin/Sales/OrderManagement/AppendReservationsAfterOrderPlacementPlugin.php(195): Magento\Sales\Model\Service\OrderService\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Sales\Model\Order\Interceptor))
#32 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(135): Magento\InventorySales\Plugin\Sales\OrderManagement\AppendReservationsAfterOrderPlacementPlugin->aroundPlace(Object(Magento\Sales\Model\Service\OrderService\Interceptor), Object(Closure), Object(Magento\Sales\Model\Order\Interceptor))
#33 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\Service\OrderService\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Sales\Model\Order\Interceptor))
#34 /home/dotdev/www/current/generated/code/Magento/Sales/Model/Service/OrderService/Interceptor.php(32): Magento\Sales\Model\Service\OrderService\Interceptor->___callPlugins('place', Array, Array)
#35 /home/dotdev/www/current/vendor/magento/module-quote/Model/QuoteManagement.php(575): Magento\Sales\Model\Service\OrderService\Interceptor->place(Object(Magento\Sales\Model\Order\Interceptor))
#36 /home/dotdev/www/current/vendor/magento/module-quote/Model/QuoteManagement.php(456): Magento\Quote\Model\QuoteManagement->submitQuote(Object(Magento\Quote\Model\Quote\Interceptor), Array)
#37 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteManagement->submit(Object(Magento\Quote\Model\Quote\Interceptor))
#38 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteManagement\Interceptor->___callParent('submit', Array)
#39 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteManagement\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Quote\Model\Quote\Interceptor))
#40 /home/dotdev/www/current/generated/code/Magento/Quote/Model/QuoteManagement/Interceptor.php(23): Magento\Quote\Model\QuoteManagement\Interceptor->___callPlugins('submit', Array, Array)
#41 /home/dotdev/www/current/vendor/magento/module-quote/Model/QuoteManagement.php(414): Magento\Quote\Model\QuoteManagement\Interceptor->submit(Object(Magento\Quote\Model\Quote\Interceptor))
#42 /home/dotdev/www/current/vendor/magento/module-checkout/Model/PaymentInformationManagement.php(125): Magento\Quote\Model\QuoteManagement->placeOrder(14)
#43 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Checkout\Model\PaymentInformationManagement->savePaymentInformationAndPlaceOrder(14, Object(Magento\Quote\Model\Quote\Payment\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))
#44 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callParent('savePaymentInfo...', Array)
#45 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->Magento\Framework\Interception\{closure}(14, Object(Magento\Quote\Model\Quote\Payment\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))
#46 /home/dotdev/www/current/generated/code/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(23): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)
#47 [internal function]: Magento\Checkout\Model\PaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder(14, Object(Magento\Quote\Model\Quote\Payment\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))
#48 /home/dotdev/www/current/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#49 /home/dotdev/www/current/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#50 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#51 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#52 /home/dotdev/www/current/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#53 /home/dotdev/www/current/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#54 /home/dotdev/www/current/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#55 /home/dotdev/www/current/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#56 /home/dotdev/www/current/pub/index.php(29): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#57 {main} [] []

Login to Sandbox Braintree Gateway URL


The expected behavior is customer is able to checkout with Venmo payment method to place a Magento order successfully with an order number being displayed.

Unfortunately, the actual results when attempting to place order in Magento with Braintree Venmo payment method are only that the customer Venmo account will be sandbox "charged" for the total amount of the order. However, no order is received and recorded by Magneto and no order success page with an order number is displayed to the customer. Instead the customer receives an error message instructing them to try again. Multiple attempts by customer to place order using the "Pay with Venmo" button will result in multiple sandbox charges to customer but no orders.

Behavior is similar in Production mode on our live store with live Braintree credentials. Other Braintree payment methods in our live store (ApplePay, GooglePay, PayPal, and cards) work as expected, issue appears to be limited to Venmo payment method. Problem was discovered after customers asked WISMO because their Venmo account had actually been charged and funds collected, in some cases multiple times.

This is a SERIOUS high priority S1 bug, customers funds are collected but no order or audit trail, and if not an existing customer then not even any customer contact information at all, in Magento. Only work around for Magento 2.4.3 is to disable the Venmo payment method which was working for us in Magento 2.3.7-p1 (and seemingly tested OK in 2.4.2 but was never in production). An emergency MQP patch will be required to use the Venmo payment method with Magento 2.4.3

m2-assistant[bot] commented 3 years ago

Hi @n2diving-dgx. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 3 years ago

Hi @engcom-November. 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: :point_down:

charanjitvision commented 3 years ago

This following issue is only happening with Venmo.

When a customer places an order using Venmo:

1.) They are not brought to the order success screen that provides them with an order number.

2.) They are not emailed an order confirmation.

3.) The order does not show up in Magento.

4.) The payment IS taken/received and it shows up correctly in Braintree. An order number is assigned correctly and shows in Braintree only, but the rest of the order process/experience with Venmo/Magento is broken.

n2diving-dgx commented 3 years ago

Support at Gene Commerce, the ultimate maintainer of this component has advised "The team confirmed that ​this issue will be fixed with the next Magento release which will roll out on the 12th of October. " I assume they mean M2.4.3-p1