• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

paypal php/mysql

Participant ,
Mar 22, 2010 Mar 22, 2010

Copy link to clipboard

Copied

how can i get paypal ipn to update a column in mysql on success?

I have a paypal script that has the ability but I do not know how to do it. There is no documentation or a website for help.

also I need the info from the booking form to insert into the database before submitting to paypal.

I did it by adding a Summary page last time, but I need to cut down on the number of clicks

But what I really need to know is how I can redirect the form to just insert into the database and not even going to paypal if the price is 0.00 or FREE or NULL

TOPICS
Server side applications

Views

980

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 22, 2010 Mar 22, 2010

Copy link to clipboard

Copied

Hi

how can i get paypal ipn to update a column in mysql on success?

You would have to check your paypal ipn 'complete' notification data you receive from paypal for the data required, and insert this into your database via an sql insert.

I need the info from the booking form to insert into the database before submitting to paypal.

Do this by sending your post data to a separate processing script, and inserting the required data into the database, then re-posting the data to paypal.

if the price is 0.00 or FREE

A simple -

if (price != "0.00" OR price  != "") {

code here for none free items

}

else {

code for when the item is 0.00 or free here

}

PZ

www.pziecina.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 22, 2010 Mar 22, 2010

Copy link to clipboard

Copied

"Do this by sending your post data to a separate processing script, and  inserting the required data into the database, then re-posting the data  to paypal."

I am not sure how to send the form to two scripts this is how its working at the moment:

<form action="paypal/process.php" method="post" enctype="multipart/form-data" name="booking">
  
   <label class="bday2">First Name:</label><span id="sprytextfield1">
   <input type="text" name="firstname" id="firstname" />
   <span class="textfieldRequiredMsg">A value is required.</span></span>
   <br />
  
      <label class="bday2">Ticket Type:</label><select name="amount">
   <?php if ($row_event['single_price'] !="") {?>
   <option label="Single - &pound;<?php echo $row_event['single_price']; ?>" value="<?php echo $row_event['single_price']; ?>"><?php echo $row_event['single_price']; ?></option>
   <?php } else {?>
   <option label="Single - &pound;FREE" value="0.00"></option>
   <?php };?>
   <?php if ($row_event['table_price'] !="") {?>
   <option label="Table - &pound;<?php echo $row_event['table_price']; ?>" value="<?php echo $row_event['table_price']; ?>"><?php echo $row_event['table_price']; ?></option>
   <?php } else {?>
   <option label="Table - &pound;FREE" value="0.00"></option>
   <?php };?>
   </select>

   <br /><br />
   <input name="order" type="submit" id="order" value="Order" />    
  
</form>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 22, 2010 Mar 22, 2010

Copy link to clipboard

Copied

Hi

You do not sent the data to two processing scripts, (it would not work).

You send the form you have at the moment to a processing script that inserts your data into the database then re-inserts the requires data into the required items for processing by the paypal script - paypal/process.php.

PZ

www.pziecina.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 22, 2010 Mar 22, 2010

Copy link to clipboard

Copied

LATEST

so basically like how I had the "summary page" where it would insert and then wait for the customer to press submit once more to go to paypal?

Great, I will do that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines