Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Stripe checkout (with require_once) inside twig page

Started by Muut Archive 10 years ago · 2 replies · 534 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 Muut Archive, 10 years ago
1 676 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5337 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago