gpt4 book ai didi

php - 如何从 Paypal 在 ZF2 中设置回调 URL?

转载 作者:太空宇宙 更新时间:2023-11-03 16:00:16 26 4
gpt4 key购买 nike

我正在尝试通过我的 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 错误
我错过了什么/做错了什么?

最佳答案

如果您的操作是 paymentConfirmActionhttp://localhost/tjla/store/payment-confirm?token=xxxxxxxxxxx&PayerID=xxxxxxxxx 应该与您的路线匹配。 .php 没有,这就是您目前收到 404 的原因。

关于php - 如何从 Paypal 在 ZF2 中设置回调 URL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31798888/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com