Payum贝宝剩余config_path [英] Payum Paypal Rest config_path

查看:176
本文介绍了Payum贝宝剩余config_path的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to implement paypal-rest payment with the payum bundle in symfony (3.1.4). I need to get PayPal Plus running in my Symfony App. Therefore I read this article https://github.com/Payum/Payum/blob/master/docs/paypal/rest/get-it-started.md

现在-我不知道要将'config_path'参数设置为什么,以及必须在此config_path上确切提供什么.

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.

Symfony状态

'The config_path fields are required.'

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

My payum config looks like this 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部分工作正常.

The paypal_express_payment part works fine.

如果我仅添加一个随机的配置路径(例如"my_config.txt" Symfony状态)

If I add just a random config-path like 'my_config.txt' Symfony states

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的位置和位置是什么?

So - where and what is the config_path ment to be?

我们非常欢迎您提供任何帮助或提示,以寻求正确的方向.

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

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

UPDATE: I don't think that Doctrine ORM storage is supported by Payum PaypalRest plugin. 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. I don't think it's a good idea to extend from PayPal\Api\Payment in the Doctrine entity.

我能够通过使用 Payum \ Paypal \ Rest \ Model \ PaymentDetails 作为付款方式,而文件系统作为存储方式:

I was able to eliminate this error by using Payum\Paypal\Rest\Model\PaymentDetails as a payment and filesystem as a storage:

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

这篇关于Payum贝宝剩余config_path的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆