Paiement gateway issue


I’m trying to configure my first paiement gateway (using sylius’ stripe default form)

when I submit the form, I’ve got this error :

An exception occurred while executing ‘INSERT INTO sylius_gateway_config (id) VALUES (null)’:

when I debug, the ResourceController create a valid $newResource but when the repository try to persist it, only the Id is used to create the SQL.

the problem seem to come from vendor/sylius/sylius/src/Sylius/Bundle/PayumBundle/Resources/config/doctrine/model/GatewayConfig.orm.xml

<doctrine-mapping xmlns=""
    <mapped-superclass name="Sylius\Bundle\PayumBundle\Model\GatewayConfig" table="sylius_gateway_config">
        <id name="id" column="id" type="integer">
            <generator strategy="AUTO" />

the rest of the entity ORM conf. has been removed in this commit a year ago.

So, I guess that I’m missing something, but I can’t figure out what…


I worked on this issue all day long what I conclude is :

the doctrine mapping of Payum\Core\Model\GatewayConfig is not loaded so only the mapping of Sylius\Bundle\PayumBundle\Model\GatewayConfig is read, an so on only the fields declared there are persisted, I can’t find out what gone wrong…


I solved my issue by adding this conf:

                        is_bundle: false
                        type: xml
                        dir: %kernel.root_dir%/../vendor/payum/payum/src/Payum/Core/Bridge/Doctrine/Resources/mapping
                        prefix: Payum\Core\Model

but its wrong on so many levels… That I skill humbly ask for any help to obtain a proper auto configuration.

(note : my Sylius codebase is two years old, so I may have missed an upgrade step, furthermore until now we only provided free products)


You can do it more easily by following the steps from hp customer support and it will not take too much time.