Payum Paypal Rest config_path

2023-11-30

我正在尝试使用 symfony (3.1.4) 中的 payum 包来实现 paypal-rest 支付。 我需要在我的 Symfony 应用程序中运行 PayPal Plus。 因此我读了这篇文章https://github.com/Payum/Payum/blob/master/docs/paypal/rest/get-it-started.md

现在 - 我无法弄清楚“config_path”参数要设置什么以及在此 config_path 中必须提供什么。

Symfony 状态

'The config_path fields are required.'

我的 payum 配置看起来像这个 atm

payum:
    security:
        token_storage:
            AppBundle\Entity\PaymentToken: { doctrine: orm }

    storages:
        AppBundle\Entity\Payment: { doctrine: orm }

    gateways:
        paypal_express_payment:
            factory: paypal_express_checkout
            username:  "%ppe_uname%"
            password:  "%ppe_pw%"
            signature: "%ppe_signature%"
            sandbox: false
        paypal_rest_payment:
            factory: paypal_rest
            client_id:      "%ppr_cid%"
            client_secret:  "%ppr_sec%"
            sandbox: true

paypal_express_ payment 部分工作正常。

如果我只添加一个像“my_config.txt”这样的随机配置路径,Symfony 会指出

Request GetHumanStatus{model: ArrayObject} is not supported. Make sure the gateway supports the requests and there is an action which supports this request (The method returns true). There may be a bug, so look for a related issue on the issue tracker.

那么 - config_path 的含义是什么?

非常欢迎任何可以引导正确方向的更多文档的帮助或提示。


这本来就是sdk_config.ini来自 PayPal-PHP-SDK

gateways:
    paypal_rest:
        factory: paypal_rest
        client_id:  '%paypal_rest.client_id%'
        client_secret:  '%paypal_rest.client_secret%'
        config_path: '%kernel.root_dir%/config/sdk_config.ini'

更新:我认为 Payum PaypalRest 插件不支持 Doctrine ORM 存储。PaypalRest\Action\CaptureAction要求模型(Payment)继承自 PayPal\Api\Payment,然后使用其创建和执行方法来捕获付款。我认为从 Doctrine 实体中的 PayPal\Api\Payment 扩展不是一个好主意。

我能够通过使用消除这个错误Payum\Paypal\Rest\型号\PaymentDetails作为支付和文件系统作为存储:

payum:
    storages:
        Payum\Paypal\Rest\Model\PaymentDetails:
            filesystem:
                storage_dir: %kernel.root_dir%/Resources/payments
                id_property: idStorage
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Payum Paypal Rest config_path 的相关文章

随机推荐