Symfony Payum paypal_rest storage definition

317 Views Asked by At

For a paypal express integration with payum in Symfony 3.1.4 I defined the storage in config.yml like this

AppBundle\Entity\Payment: { doctrine: orm }

Now I want to use the storage defined by the class "PaymentDetails" from paypal-rest payum. It is located under "../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?

1

There are 1 best solutions below

0
On BEST ANSWER

Using the PaymentDetails Model from the PayPal Rest API Payum Integration requires to set the storage to filesystem storage. That said it does not seem to be sensible trying to use ORM for any mapping here. 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