我正在尝试通过我的 Zend 框架(2.4 版)应用程序使用 Paypal 快速结账。
回调 URL 设置为 http://localhost/tjla/store/payment-confirm.php
StoreController.php 中有一个函数叫做 paymentConfirmAction
我的 module.config.php 中的子路由如下所示:
'store' => array(
'type' => 'Segment',
'options' => array(
'route' => '/store[/:action]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'controller' => 'Tjla\Controller\Store',
'action' => 'index',
),
),
),
当 Paypal 操作完成时,它用 http://localhost/tjla/store/payment-confirm.php?token=xxxxxxxxxxx&PayerID=xxxxxxxxx 回调
但这会产生 404 Page Not Found 错误
我错过了什么/做错了什么?
最佳答案
如果您的操作是 paymentConfirmAction
,http://localhost/tjla/store/payment-confirm?token=xxxxxxxxxxx&PayerID=xxxxxxxxx
应该与您的路线匹配。 .php
没有,这就是您目前收到 404 的原因。
关于php - 如何从 Paypal 在 ZF2 中设置回调 URL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31798888/