我正在尝试配置PHPFox以允许用户升级到付费订阅。单击/ subscribe页面上的Purchase按钮应显示一个显示支付网关的弹出窗口,默认为Paypal,但它会显示一个空的弹出窗口。
我已经调试了,可以看到它确实调用了相同的核心模块块,模块/ api / include / component / block / gateway / form.class.php作为注册过程,但是这个调用:
'aGateways' => Phpfox::getService('api.gateway')->get($aGatewayData),
找不到任何支付网关。它似乎只在用户未登录时找到支付网关。
有人可以帮我吗?
更新,这是我的错。我正在创建一个新的支付网关并出现此错误:
Fatal error: Uncaught InvalidArgumentException: Unexpected service gateway.api.stripes in /Users/dotred/Applications/PHPFox/DMSoc2/PF.Base/include/library/phpfox/phpfox/support.php:148 Stack trace: #0 /Users/dotred/Applications/PHPFox/DMSoc2/PF.Base/include/library/phpfox/phpfox/support.php(75): Phpfox_Service_Container->build('gateway.api.str...') #1 /Users/dotred/Applications/PHPFox/DMSoc2/PF.Base/include/library/phpfox/phpfox/phpfox.class.php(437): Phpfox_Service_Container->get('gateway.api.str...') #2 /Users/dotred/Applications/PHPFox/DMSoc2/PF.Base/include/library/phpfox/gateway/gateway.class.php(58): Phpfox::getLib('gateway.api.str...') #3 /Users/dotred/Applications/PHPFox/DMSoc2/PF.Base/module/api/include/service/gateway/gateway.class.php(121): Phpfox_Gateway->load('stripes', Array) #4 /Users/dotred/Applications/PHPFox/DMSoc2/PF.Base/module/api/include/component/block/gateway/form.class.php(17): Api_Service_Gateway_Gateway->get(Array) #5 /Users/dotred/Applications/PHPFox/DMSoc2/PF.Base/include/library/phpfox/module in /Users/dotred/Applications/PHPFox/DMSoc2/PF.Base/start.php on line 685
当用户未登录时,它不会抛出此错误...
更新2: 添加以下行:
'gateway.api.stripes' => \Phpfox_Gateway_Api_Stripes::class,
到文件PF.Base / include / package.config.php修复错误。所以问题是,如何在不更改核心代码的情况下将包安全地添加到此列表中?