Comments (6)
Can you disable CSRF protection on Craft and see if that fixes your issue? It's mentioned only in Stripe gateway docs (https://github.com/craftcms/commerce-stripe#disabling-csrf-for-webhooks), but I suppose we should mention it for all gateways that complete payment via a callback.
from commerce-paypal.
Wouldn't it be nice to add this to the plugin itself?
class PluginController extends Controller
{
// Disable CSRF validation for the entire controller
public $enableCsrfValidation = false;
...
In addition, it should at least be mentioned in the setup instructions of the plugin. It took me some time to find this post.
from commerce-paypal.
Closing due to inactivity.
from commerce-paypal.
I'm sorry for not replying - adding the callback action to the CSRF-disabling code indeed fixed this issue... FYI
from commerce-paypal.
For more information as to why CSRF must be disabled for PayPal routes: https://docs.craftcms.com/commerce/v2/payment-gateways.html#csrf-protection-issues
from commerce-paypal.
Fixed in Commerce. See craftcms/commerce#900
Also removed the instructions in docs.
from commerce-paypal.
Related Issues (20)
- PayPal Instant Payment Notifications (IPN) Issue(s) HOT 6
- The total of the cart amounts do not much order amounts.
- PayPal Express `datePaid` is always null HOT 3
- How to implement HOT 2
- cancelUrl is ignored?
- PayPal Pro and PSD2 / SCA support HOT 1
- PayPal Subscriptions HOT 4
- Passing Address to PayPal Express HOT 7
- Paypal Express: test payments HOT 4
- Multiple Forms HOT 1
- Environment based Sandbox HOT 1
- Question: does the response object from successfull transactions contain the object payout_currency_conversion
- Return URL does not route to "commerce/payments/complete-payment" HOT 2
- $ losing reference HOT 1
- Abandoned but no replacement? HOT 5
- Paypal Pay in 3 HOT 2
- Paypal Plus Support HOT 1
- Correlation id: unknown HOT 2
- Paypal Express configuration HOT 3
- Update to PayPal Checkout HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commerce-paypal.