Calling PHP code for Authorize.net
I found a tutorial that has PHP code for submitting transactions to Authorize.net, but I can't for the life of me figure out how to put all this into SmartPill.
The PHP code is located here:
http://www.johnconde.net/blog/tutorial-integrating-the-authorizenet-aim-...
How can I implement this in SmartPill?
Thanks,
Frank
Calling PHP code for Authorize.net
"It will take some work to figure out the best approach for you."
That part I had pretty much figured out on my own. =;)
Unless I missed it somewhere, I was hoping to find a write up on how to call the plugin. If I was doing this with AppleScript, I would use the Execute AppleScript script step. But how does one actually "call" SmartPill? There's no script step for this, so how exactly does this work? The manual doesn't explain how to actually use the plugin.
This may be basic to you, but it's all new to me.
Thanks,
Frank
How to call the plug-in
Hello Frank,
The plug-in is loaded during start-up and makes additional functions available within the FileMaker calculation dialog. The plug-in functions can be called anywhere a FileMaker calculation can be called, however, in most cases, you'll be writing a FileMaker script and you'll set a variable or field to the result of one of the plug-in functions.
Here's an example script step that sets a variable named $result to the result of the PHP_Execute function:
Set Variable [ $result; Value:PHP_Execute ( "echo 'Hello World';" ) ]You may find it helpful to look at the scripts in the Testbed.fp7 file that's included with the SmartPill download.
Regards,
Micah
Calling PHP code for Authorize.net
Hello Frank,
I would start by reviewing the code examples in the Testbed.fp7 file that's included with the SmartPill download. Once you understand how that works, I would store any required include files in the include folder that SmartPill creates (this will be in Extensions > PHP Support > includes). I would then do my development in the testbed file. Once you get things working, you have to decide how to implement this within your solution. For less complicated solutions, I typically put the code in a field in a settings table and then call the code from there. For more complex solutions, I typically use FunctionMaker.fp7 (also included with the download) to create my own plug-in functions.
It will take some work to figure out the best approach for you.
Regards,
Micah
Reply
Somehow my reply to you got sandwiched between my original post and your reply. I couldn't figure out how to move it once it was posted, so hopefully it's not missed.
Frank