This is quick post about an error that I encountered during the checkout process using Sitecore Experience Commerce 9 storefront. The error happened as I entered incorrect Braintree sandbox account values during the installation process. The installation was successful but the checkout process didn’t work as expected.
After installation, I added some products to the cart and tried to checkout using the standard process. On the Billing Page, when I clicked on ‘Validate Payment‘ button, I received this error:
“A public action method ‘ShoppingCartLines’ was not found on controller ‘Sitecore.Commerce.XA.Feature.Cart.Controllers.CartController’.
The Billing Page:
The Error Page:
Sitecore Slack community came to help and thanks to Kautilya Prasad who suggested to check the Braintree account values. Also, Sitecore support team came back with the same answer pointing towards incorrect Braintree sandbox values. If you are seeing this error as well then it means that either you have not entered the sandbox values for Braintree account or have entered them incorrectly during the installation process.
In order to fix the issue, please:
- Make sure that you use valid parameters for braintree policy in the PlugIn.Payments.Braintree.PolicySet-1.0.0 config file.
- Make sure that valid parameters for braintree policy are bootstrapped to Global database.
Confirm values are present and correct in the config file:
Bootstrap the values to global database:
If your Braintree account is configured correctly, you will see ‘Credit Card‘ form next to the validate payment button like this: (which I was not seeing it during the checkout process earlier)
The Billing Page with Credit Card Info:
Hope this helps!