Kurtis
08/17/2022, 6:00 PMCan't verify CSRF token authenticity.
Completed 422 Unprocessable Entity in 1ms (ActiveRecord: 0.0ms | Allocations: 574)
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
Wondering if it’s something to do with a frontend change with tokens vs new solidus front end, or if it’s a Rails 5.2 > Rails 6 issue? Any help massively appreciated. Thanks againRyan Woods
08/18/2022, 12:14 PM:exception for the forgery_protection_strategy on the controller. It seems that your transaction request is coming from the PayPal button? In that case, it uses Ajax:
https://github.com/solidusio/solidus_paypal_braintree/blob/021ff881022d6ce7c165a1c[…]pp/assets/javascripts/solidus_paypal_braintree/paypal_button.js
So maybe you’re missing a /= require jquery_ujs on the JS layout that you use on the payment page?Kurtis
08/18/2022, 6:34 PMSebastian
08/19/2022, 2:49 PMgem 'jquery-rails'
and then required it on checkout/payment like below:
//= require jquery
//= require jquery_ujs
But still same thing happeningRyan Woods
08/19/2022, 2:53 PMSebastian
08/19/2022, 2:54 PMdata: params used for Spree.ajax call