Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Stripe checkout (with require_once) inside twig page

Started by Muut Archive 10 years ago · 2 replies · 443 views
10 years ago

I am trying to get up and working Stripe within Grav (I don't want to use official Grav-Stripe plugin as it includes shopping cart which in my case is unecessary).

So I am following examples on Stripe site and I need to require_once the code Stripe needs to initiate on page load. How can I achieve it inside twig page?

10 years ago

By require_once, I assume you mean the PHP function and intend to include a local library. This would have to be wrapped in a plugin, as Twig does not parse PHP directly.

10 years ago

Yes, that's what I am trying to achieve. For now my workaround is to direct user to another pure .php page where to handle payments.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1369 9 years ago
Archive · by Muut Archive, 9 years ago
2 943 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1126 9 years ago