6

I'm trying to customise the templates of StripeBundle, respectively the checkout template vendor\payum\stripe\Payum\Stripe\Resources\views\Action\obtain_checkout_token.html.twig.

This is because I want the Stripe popup to appear in the same page as the object that is paid for and not on a separate page with a single button. Say, I want to pay for a Product, I press 'pay' at the checkout page, and want the Stripe popup to appear there.

I took a look at another similar question but I can't seem to get it working. I've tried every single combination of folder names in app/Resources with PayumStripeBundle, Payum, Payum/Stripe, but none of them seem to override the used template.

The bundle's structure is also pretty strange, as its namespace is Payum\Bundle\PayumBundle, but the Stripe component which is not a bundle that contains the template is in another folder.

The value is set here, so maybe Symfony never looks in the folder because of that?

How should the folder structure in app/Resources be, if it works this way? Or if it's another way to do it.

Community
  • 1
  • 1
George Irimiciuc
  • 4,573
  • 8
  • 44
  • 88

1 Answers1

3

Try this in your config.yml, and put an Action folder in that path with the templates you need.

twig:
    debug:            "%kernel.debug%"
    strict_variables: ~
    paths:
        "%kernel.root_dir%/../app/Resources/PayumBundle/Stripe/views": PayumStripe