Quirky situation, not sure if there's a way around it..??
I've got a small runtime solution that I'd like to include a monthly fee with. I'm using PayPal and I'm very familiar with their API systems.
My runtime solution is actually targeted at PayPal users, therefore, the majority of them will want to setup their monthly payment to come straight out of their PayPal account.
The method for handling this, though, involves redirecting the user to PayPal where they login and are then redirected back to your application to complete the process. The only way I can think to do this inside FM would be with a web viewer. That'd be fine up until the point when I want to start dropping response data back into the FM runtime solution. Without any kind of ODBC or PHP API type connection to FM I can't get data back into it...which was part of the beauty of this plugin. Using forms inside FM, though, I can't redirect to PayPal and back into the FM solution.
So, is there any way to get data from an actual PHP page hosted on a web server and being viewed in web viewer into actual FM fields?
PayPal now offers recurring payments with Direct Payment, which means I could have the user input credit card information on a form in FM and then use the SmartPill plugin to make the call to PayPal and drop data back into FM very easily. Again, though, since this application is targeted at PayPal users to not offer PayPal as a method would be kinda strange. I could do everything in the Web Viewer and then have them copy/paste the subscription ID back into the application (which is how it'll know whether or not it's active subscription prior to allowing use of the software) but that doesn't seem very professional.
Anybody got any ideas for me? Any information would be greatly appreciated. Thanks!
Use GetLayoutObjectAttribute?
Can you reliably parse the subscription ID from the web page? If so, you can use
GetLayoutObjectAttribute ( "webviewer" ; "content" )to return the page content and then use either FileMaker or PHP functions to parse out the ID.Regards,
Micah
??
Ok, I'm using the following custom function (http://www.briandunning.com/cf/559)
And when I evaluate the following in Data Viewer:
ParseData ( GetLayoutObjectAttribute ( "SubscriptionBrowser" ; "content" ) ; "
")
I get exactly what I'm looking for back. But I have a calc. field with that exact same thing in it and it doesn't populate. Any ideas?
grr...
I'm close but I'm getting frustrated. I had that calc. field set as a text field and my test page with the ID loaded in the web viewer. It wasn't populating. I changed it from text to number and then it suddenly populated, but I had to change it to display as entered because it really is a text field. that kinda confused me, but it worked so oh well.
Then I went back through an actual subscription via the Web Viewer and when I landed on the final page which displayed the new ID the calc. field didn't update as expected. I went in and changed it back to text and what-do-ya-know, it updated accordingly.
I need that field to update when that viewer has that data in it everytime, and I don't understand why it only updates when I switch back and forth from text to number.
I know I've kinda gotten off track this forum's topic, but if you could help it'd be great. thanks!
grr...
Try making the field an unstored calculation (under storage options for the field, check "Do not store calculation results"). I think the issue you're having is that the calc doesn't refresh. I don't think it has anything to do with the field type but the reason you see a change when you change the field type is because this forces a refresh.
Regards,
Micah
hmmm...
That's interesting. I didn't know I could get HTML source like that from a web viewer. I think I can make that work. Thanks!!!