I'm using the following checkout flow:

Order information
Contact information
Shipping information
Payment information (using Braintree)

Review
Review

Sidebar
Order summary
Coupon redemption

When I enabled a promotion with coupon and the coupon is valid and entered on the Order information page, I get the following error:

InvalidArgumentException: $payment_details must contain the payment_method_nonce key. in Drupal\commerce_braintree\Plugin\Commerce\PaymentGateway\HostedFields->createPaymentMethod() (line 274 of C:\Users\paco\platformsh\sbb\web\modules\contrib\commerce_braintree\src\Plugin\Commerce\PaymentGateway\HostedFields.php).

If I do not enter the coupon code, it moves to the review page properly
If I move the payment pane to the review page, there is no issue. So it seems that the Coupon submit conflicts with the Payment/Braintree pane.

I'm on the latest commerce dev and lates beta Braintree

Comments

francois o created an issue. See original summary.

bojanz’s picture

Status: Active » Closed (duplicate)
EddyFK’s picture

I have the exact same problem on Drupal 7. Does anybody know how to fix that?