I have placed commerce coupon(7.x-2.0-rc3) and braintree hosted fields(7.x-2.0-rc1) payment method at checkout review page. When I try to complete checkout It always remain on the same page and shows coupon is required error. If I enabled any other payment method like example payment then I can checkout without any issue. It seems braintree is causing some issue due to which it is picking wrong triggering element in form submit due to which commerce coupon submit handlers is called. I can add some checks to prevent the commerce coupon submission handler but in that case although it doesn't show any error but doesn't also process payment. Brain-tree submit handlers is not called in this case.
Comments
Comment #2
rp7 commentedIt appears this bug is also present in the 8.x version (8.x-1.0-beta1 to be more precise).
I'm unable to add coupons to the order if the Braintree form is on the same checkout step. Following error pops up in the logs:
InvalidArgumentException: $payment_details must contain the payment_method_nonce key. in Drupal\commerce_braintree\Plugin\Commerce\PaymentGateway\HostedFields->createPaymentMethod() (line 297 of /var/www/html/web/modules/contrib/commerce_braintree/src/Plugin/Commerce/PaymentGateway/HostedFields.php).It all works fine if I move the coupon redemption pane to a different checkout step than the Braintree form is on. The coupon redemption functionality works fine with other payment gateways.
Anyone care to help?
Comment #3
bojanz commentedThat is a Commerce bug, not a Commerce Braintree bug: #2902408: Applying a coupon saves the other checkout panes.
Comment #4
khiminrm commentedHi!
I've faced with the same issue using Commerce 7.x-1.15 and Commerce Braintree 7.x-3.0. How I can fix it?