So, here is the format of the PayPal button code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="KSJJJFDIECSA">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
I would like to be able to modify one of my templates so that the normal submit button is not displayed but instead, the PayPal button is used. However, I need the PayPal button to execute the above code along with the regular submit button… Essentially, I would like for the user to pay and when they are returned to the webpage, I want the form submitted for Participants Database. I need both things to happen from one click. Would appreciate any insight. Thanks again!
I’ve done this for a couple of clients. My approach was to use Javascript to interrupt the submit process, post the data to the plugin using AJAX, then change the “action” attribute of the form to the PayPal URL, then trigger the form submission. The PayPal variables are included in the form, so the transaction can then be completed at PayPal.
You can’t count on them coming back after paying, so its better to save the record before they go to PayPal.
Roland,
I understand the approach but I am not familiar with either Javascript or AJAX. If you could be a little more specific regarding actual commands, that would be awesome. You know, just which ones I will need to use and I can probably take it from there… Thanks as always for this great plugin and your amazing support.
Christi
I’m happy to support the plugin’s functionality, but I’m going to have to leave this to your own ingenuity. This is generally paid work for me. Here are some sources I have found useful that will help you with the details:
5 tips for using AJAX in WordPress
PayPal Developer How To Guides
jQuery AJAX Documentation
Fair enough… I was wondering if I had stepped into the fringe. I appreciate you pointing the way though. I will take a stab at it and get back to you if it is too far out of my comfort zone. Thank you!
@cbrendlinger
This is pretty much along the lines of something we’re looking to do for a new client.
Would it be possible to share the URL of one of your signup pages? I’d be curious to see what you’ve setup thus far. I haven’t installed this plugin yet but am likely.
We basically will also have a registration form…where a parent signs up as the primary contact, and then registers as many kids as they have between certain ages. I need to charge them a basic/overall registration fee, then for each child. I don’t want to go with a full blown CRM.
Actually there’s a feature I need to be able to calculate a field based on input in 2 other fields to generate the unique ID/index and none of the CRM’s I’m looking at can allow that simply functionality like I’d have in a Filemaker or other database.
Thanks!
Joshua
Joshua,
I have not, as yet, actually implemented the change to the submit button. I have temporarily stopped developing that side of the application. However, I do use this plugin quite effectively anyway. I am just forced to redirect to a payment screen with the paypal link. Not perfect but not terrible. Even so, this is a terrific plugin.
The templates provided with this plugin will allow you to make modifications that allow you to calculate/generate a unique ID field based on the values in other fields. You just have to define it.
My signup page can be found at http://www.corporateaccelerationgroup.com/premium-membership-registration/.
Hope this helps… Christi
Christi
Thanks a million…good to know!
And sorry to the admin…I know I was the impetus for the “please don’t respond to closed…”…super sorry! I couldn’t find how to contact Christi directly and sadly also didn’t notice the status was set to closed/resolved. My bad.
Got it installed and between the custom ID and PayPal hopes, thinks this is our ticket.
Thanks both!
paorganic,
Not it wasn’t you…had that there for a long time…your posting in this thread was the right thing to do…it’s the requests that should have their own thread that I’m trying to catch with that.
Glad you got it sorted anyway!
xnau…
Thanks so much! And glad to know it wasn’t me 🙂
I’m going to post a question to the main forum as it’s off this topic…it’s in regards to the best way to achieve a parent/child relationship with your database using the one table.
Thanks!
Joshua