繁体   English   中英

Payum贝宝剩余config_path

[英]Payum Paypal Rest config_path

我正在尝试使用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的位置和位置是什么?

我们非常欢迎您提供任何有助于正确指导的帮助或提示,以获取更多文档资料。

它应该是来自PayPal-PHP-SDK的sdk_config.ini

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要求从PayPal \\ Api \\ Payment继承模型(付款),然后使用其创建和执行方法进行付款捕获。 我认为从Doctrine实体的PayPal \\ Api \\ Payment扩展不是一个好主意。

通过使用Payum \\ Paypal \\ Rest \\ Model \\ PaymentDetails作为付款和文件系统作为存储,我能够消除此错误:

payum:
    storages:
        Payum\Paypal\Rest\Model\PaymentDetails:
            filesystem:
                storage_dir: %kernel.root_dir%/Resources/payments
                id_property: idStorage

尝试将其设置为默认值,如下所示:

paypal_rest_payment:
    factory: paypal_rest
    client_id:      "%ppr_cid%"
    client_secret:  "%ppr_sec%"
    sandbox: true
    config_path: ~

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM