When I add this to an html stack or as piece of code in the body this appears when the page is published…
Fatal error: Call to undefined function sl_get_stripe_button() in /private/var/folders/gk/h23smb_x73sg7g0z6grs7fsr0000gp/T/com.realmacsoftware.rapidweaver/RapidWeaver/3253/document-0x6000003fe800/RWDocumentPagePreview/register.php on line 196
When I add the code to the PHP page with a text editor and upload the button works.
Drew: I’m guessing a little bit because I don’t use the Stripe button. But I use Sitelok all the time. All my code is placed either in the Prefix section of the HTML Code area (see Page Inspector) or sometimes with something like the Disqus plugin with Sitelok there’s a portion I additionally put in the Head section.
My guess is your entire code goes in the Prefix section.
I don’t use siteLok, but from a PHP perspective, you are using a function that does not exist. Do you need to add something like a require_once()
With a sitelok library in the ()?
Perhaps @vibralogix can explain.
Where did you get this code from? I’m looking at the Stripe manual for Sitelok and I’m seeing no such code. As Doug mentioned, there seems to be something very off about the code you are using.
For example in the manual it mentions this with OBJECTID:
In this case you need to replace OBJECTID in the button code with the id of the html object.
So at the very least your use of OjbectID seems to be incomplete.
The developer lives in England but I would email him directly. He is fantastic with support. To my untrained eye (since I don’t use the Stripe plugin) the code you are using looks both incomplete and incorrect. But I haven’t the foggiest about how to help you out. And, of course, I may be wrong.
It gets produced on the stripe plugin page in sitelok. Its set up for a specific membership plan on stripe. Screenshot attached.
The code works when I paste it into the right spot of the page with a text editor. Thats the weird thing.