Answer the question
In order to leave comments, you need to log in
External service can't get page on yii2?
In general, there is yii2 that works not from the root, but in the /coupons folder. There are redirects in .htaccess to make everything work.
There is a page /coupons/cart/payment that works through the browser.
There is a banking gateway that, upon successful payment, sends a POST request to the /coupons/cart/payment address and receives a 400 error. Here is the server log:
193.93.56.240 - - [20/May/2015:11:43:31 +0300] "POST /coupons/cart/payment HTTP/1.0" 400 16683 "-" "Java/1.6.0_35"
RewriteEngine on
RewriteRule ^static(.*)$ /coupons/web/static$1 [L]
RewriteRule ^uploads(.*)$ /coupons/web/uploads$1 [L]
RewriteRule ^assets(.*)$ /coupons/web/assets$1 [L]
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/].*)?$ /coupons/web/index.php$1
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
Answer the question
In order to leave comments, you need to log in
Everything turned out to be simple - you need to disable the csrf check for the controller:
www.yiiframework.com/doc-2.0/yii-web-controller.ht...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question