CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Validation event with PayPal Button (Resolved)

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 07/08/2010, 2:22 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
morowind

Posts: 46
Posted: 07/08/2010, 6:00 AM

only thing i can imagine for now is to perform ajax submit with your query string parameter to a page.
-in that page in before show event perform SQL update/insert using your parameter.If you know some jQuery I can provide you piece of code,just give me a complete description for your needs.

good luck
View profile  Send private message
saseow

Posts: 744
Posted: 07/08/2010, 6:50 AM

Thanks morowind,

That sounds awfully complex. Ha ve no idea how to submit an ajax request. Perhaps I am going about this the wrong way:

I am not sure but I think PayPal provides a feedback called INP once a transaction is approved. This is actually when I want to store the data in the table. i.e. once the payment is processed and is OK. They talk about a 'Listening Page' in the documentation. Now..... when the button is clicked the user is transported off to PayPal and leaves my site. How on earth do you stay on the site and create a 'Listening Page' (whatever that is) and wait for the reply that all os OK from PayPal?

I am missing something very basic here I am sure. If ajax is the way to go, I can do a work around so that an administrator can approve the payment manually with a check-box once he gets an email from PayPal. If so and you can help, here are the fields in a grid that I want to capture and store:
app_id, user_id and the date_purchased.

Thanks again!
View profile  Send private message
saseow

Posts: 744
Posted: 07/08/2010, 10:34 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

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.