简体   繁体   English

Symfony Payum paypal_rest存储定义

[英]Symfony Payum paypal_rest storage definition

For a paypal express integration with payum in Symfony 3.1.4 I defined the storage in config.yml like this 为了在Symfony 3.1.4中与payum进行贝宝快速集成,我在config.yml中定义了这样的存储

AppBundle\Entity\Payment: { doctrine: orm }

Now I want to use the storage defined by the class "PaymentDetails" from paypal-rest payum. 现在,我要使用贝宝(paypal-rest)payum中由“ PaymentDetails”类定义的存储。 It is located under "../vendor/payum/paypal-rest/Payum/Paypal/Rest/Model/PaymentDetails.php". 它位于“ ../vendor/payum/paypal-rest/Payum/Paypal/Rest/Model/PaymentDetails.php”下。 How exactly can I do this? 我到底该怎么做? How do i define a path in vendor to point to the class I need in config.yml or which folder structure would I have to copy to my "Resources"-folder to make it available? 如何在供应商中定义路径以指向config.yml中所需的类,或者我必须将哪种文件夹结构复制到“资源”文件夹中才能使用?

Using the PaymentDetails Model from the PayPal Rest API Payum Integration requires to set the storage to filesystem storage. 从PayPal Rest API使用PaymentDetails模型Payum集成需要将存储设置为文件系统存储。 That said it does not seem to be sensible trying to use ORM for any mapping here. 也就是说,在这里尝试使用ORM进行任何映射似乎都不明智。 Instead this config settings should be used to use filesystem storage 相反,应使用此配置设置来使用文件系统存储

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

This answere results from the answere given for the following question: Payum Paypal Rest config_path 该回答者来自以下问题的回答: Payum Paypal Rest config_path

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

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