BigCommerce - Hello World App - 回拨URL
我想从bigcommerce/hello-world-app-php-silex安装BigCommerce Hello World App。当我尝试在我的试用商店中安装应用程序时,它显示应用程序文件夹的索引。 。BigCommerce - Hello World App - 回拨URL
的说明是不明确的东西进入这里,所以我进入:
- 验证回调URL:https://localhost/bigcommerce/hello-world-app-php-silex
- 负载回调:网址: https://localhost/bigcommerce/hello-world-app-php-silex
- 卸载回调网址: https://localhost/bigcommerce/hello-world-app-php-silex
index.php is位于bigcommerce/hello-world-app-php-silex
我应该为回调URL输入什么内容?
此外,这是我在环境变量的.env文件中输入的内容。
BC_AUTH_SERVICE和BC_CALLBACK_URL
更新:好吧,我能得到的index.php默认加载。
在Apache24/conf/httpd.conf中,我将“AllowOverride None”更改为“AllowOverride FileInfo”,取消了“LoadModule rewrite_module modules/mod_rewrite.so”的注释,并在项目根目录下的.htaccess文件中, “/”进行index.php所以它现在说“RewriteRule ^(。*)$ index.php/$ 1 [L]”。因为项目不在根目录中,所以需要删除“/”。
现在我得到两个错误。它看起来像这个项目被写入根目录,所以我把它放在根目录中,把“/”放回到.htaccess中,更新了URL,并且我仍然得到相同的两个错误。
在你的项目根目录下添加的.htaccess与此代码
RewriteEngine on
#RewriteBase/
# only rewrite if the requested file doesn't exist
RewriteCond %{REQUEST_FILENAME} !-s
# pass the rest of the request into index.php to handle
RewriteRule ^(.*)$ /index.php/$1 [L]
# Prevent the web from seeing the readme.md just to be safe
RewriteRule ^README\.MD$ - [L,F]
不要转储代码。解释OP的问题并解释你的答案如何解决这个问题。 – CodeCaster
根目录中有一个.htaccess文件,其中包含该确切内容。 – Matt
回调网址需要包括路径/负载/ auth /中回调。
- 验证回调URL:https://localhost/auth/callback
- 负载回调:网址:https://localhost/load
- 卸载回调网址:https://localhost/uninstall
他们没有路径的文件夹,它们是路径的资源。这就是为什么错误是ResourceNotFound。
中的回调URL。ENV需要是:
BC_CALLBACK_URL = https://localhost/auth/callback
我会这么多次我会利用一切可能性,但错误没有解决,让我知道你在你的情况下解决这个错误。
https://i.stack.imgur.com/9nLKu.jpg
Here My .env file :
BC_AUTH_SERVICE=https://login.bigcommerce.com
BC_CLIENT_ID=My client id
BC_CLIENT_SECRET=My secret id
BC_CALLBACK_URL=https://localhost/bigcommerce/callback/load
Here My Server path in dev tools file:
Auth Callback URL - more info
https://localhost/bigcommerce/callback
Load Callback URL - more info
https://localhost/bigcommerce/load
Uninstall Callback URL - more info
https:/localhost/bigcommerce/uninstall
Let me folder structure of Silex
My localhost is Right now [ HTTPS ] : https://localhost/bigcommerce/index.php
为什么怀疑回调网址是问题的原因是什么?问题在于您的Web服务器未配置为执行PHP文件。无论如何,您需要用服务器的DNS名称或IP地址替换localhost,以便客户端可以访问它。 – CodeCaster
@CodeCaster我测试了一个使用卷发验证的测试.php文件的Web服务器,所以我知道它的工作原理。另外,我正尝试将它安装在我的试用商店中,从我的计算机安装,我的Web服务器已设置好,localhost工作正常。 – Matt
您看到包含'index.php'文件的目录列表的事实证明,您的Web服务器(至少在此目录中)未设置为执行PHP文件。 – CodeCaster