Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Process _GET variable

first-time plugins

Started by Steven 2 years ago · 0 replies · 224 views
2 years ago

I'm porting some online store code (written in raw HTML/PHP/mySQL) to Grav. The credit card processor sends the user to https://www.company.com/store/thanks?orderId=123.

That should invoke (via a plugin, I assume), a call to a PHP function that does stuff with the orderId like pull the order from the database, call the processor via curl to get the payment status, update the database, and eventually display a "Thank You" page to the user.

What I don't yet understand is how to invoke my plugin from the "thanks" page, and pass it the GET variable. Should the plugin function directly access the $_GET variable?

I still haven't figured out how to use a plugin on a particular page, because I don't need to invoke the plugin on all my pages, just the store pages.

Suggested topics

Topic Participants Replies Views Activity
Support · by blu3prince, 4 days ago
1 68 4 hours ago
Support · by complanar, 7 days ago
6 157 2 days ago
Support · by Rick Beebe, 7 days ago
2 116 3 days ago
Support · by alex, 5 days ago
2 101 4 days ago
Support · by Marcel, 2 weeks ago
1 152 4 days ago