简体   繁体   English

Payum贝宝剩余config_path

[英]Payum Paypal Rest config_path

I am trying to implement paypal-rest payment with the payum bundle in symfony (3.1.4). 我正在尝试使用symfony(3.1.4)中的payum捆绑包实现paypal-rest付款。 I need to get PayPal Plus running in my Symfony App. 我需要在我的Symfony应用程序中运行PayPal Plus。 Therefore I read this article https://github.com/Payum/Payum/blob/master/docs/paypal/rest/get-it-started.md 因此我阅读了这篇文章https://github.com/Payum/Payum/blob/master/docs/paypal/rest/get-it-started.md

Now - I can't figure out what the 'config_path' parameter is ment to be set to and what exactly has to be provides at this config_path. 现在,我不知道要将“ config_path”参数设置为什么,以及必须在此config_path中提供什么。

Symfony states Symfony状态

'The config_path fields are required.'

My payum config looks like this atm 我的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

The paypal_express_payment part works fine. paypal_express_payment部分工作正常。

If I add just a random config-path like 'my_config.txt' Symfony states 如果我仅添加诸如“ 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.

So - where and what is the config_path ment to be? 那么-config_path的位置和位置是什么?

Any help or hints for more documentation that can lead into the right direction is very welcome. 我们非常欢迎您提供任何有助于正确指导的帮助或提示,以获取更多文档资料。

It's meant to be sdk_config.ini from PayPal-PHP-SDK 它应该是来自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'

UPDATE: I don't think that Doctrine ORM storage is supported by Payum PaypalRest plugin. 更新:我不认为Payum PaypalRest插件支持Doctrine ORM存储。 PaypalRest\\Action\\CaptureAction requires the model (Payment) to be inherited from PayPal\\Api\\Payment and then it uses its create and execute methods for payment capture. PaypalRest \\ Action \\ CaptureAction要求从PayPal \\ Api \\ Payment继承模型(付款),然后使用其创建和执行方法进行付款捕获。 I don't think it's a good idea to extend from PayPal\\Api\\Payment in the Doctrine entity. 我认为从Doctrine实体的PayPal \\ Api \\ Payment扩展不是一个好主意。

I was able to eliminate this error by using Payum\\Paypal\\Rest\\Model\\PaymentDetails as a payment and filesystem as a storage: 通过使用Payum \\ Paypal \\ Rest \\ Model \\ PaymentDetails作为付款和文件系统作为存储,我能够消除此错误:

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

Try to set it to default value like this: 尝试将其设置为默认值,如下所示:

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