CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Validation event with PayPal Button (Resolved)

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 07/08/2010, 2:17 AM

I have a grid that displays product information and has a PayPal button created with the CCT PayPal Button Builder.

When a user clicks the button to purchase the item, I want to have a validate event where I can add some data to a table.

The problem is that the button action goes directly to the PayPal web site and there is no way I can see to write some code to add the data to a table.

Anyone have a suggestion or work-around? :(
View profile  Send private message
datadoit
Posted: 07/08/2010, 10:39 AM

Create an AJAX call for the button's Client On Click event.

Another route is to encase your button into a CCS form, then you'll be
able to have server side control over events such as the Button OnClick,
form BeforeInsert, etc., then use the PHP header() to redirect onward to
PayPal afterwards.
saseow

Posts: 744
Posted: 07/08/2010, 11:00 AM

Now, the idea of a form sounds very good. I will give it a try on the morrow and will let you know.

Thanks datadoit! Appreciate your input very much!
View profile  Send private message
saseow

Posts: 744
Posted: 07/08/2010, 10:33 PM

What I did was to change the grid to a record form so that would give me validation routines. In the validation routine I wrote the data to the table and then redirected to a PayPal Gate page which contained a form with all the PayPal required fields.

This form I then automatically submitted with onload Submit().

Works perfectly.
View profile  Send private message
datadoit
Posted: 07/09/2010, 5:46 AM

There are many instances where a record form with buttons will be used
for the sole reason of being able to utilize CCS event routines.
Oftentimes the record form doesn't even need to update any record at
all. Other times it may just merely update a log table via hidden
fields with the user's chosen answer or button selection.

Very handy trick without all the hassle of AJAX.
saseow

Posts: 744
Posted: 07/09/2010, 7:23 AM

Agreed!

Thanks for planting the idea datadoit!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.