Home Ask Login Register

Developers Planet

Your answer is one click away!

tabia February 2016

Uploaded file name save in database when return from paypal successfully

I have a form through which cart data is processed and onclick button it processes with paypal. I have made a success.php page which will be auto return when transaction will be completed. All the fields are successfully saving in db but i am stuck with the file which a user will upload. My question is, Is there any way to save uploaded file name in database when paypal checkout returns successfully to the success.php page and if so, Then how can i pass the variable within paypal button? I have go through many searches regarding this. But none helped my issue. Any suggestions or guide will be appreciated. form.php

     <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"  enctype="multipart/form-data">
      <!-- Identify your business so that you can collect the payments. -->
   <input type="hidden" name="business" value="sriniv_1293527277_biz@inbox.com">
   <!-- Specify a Buy Now button. -->
   <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="upload" value="1">
    <input type="file" name="custom" >
     <Label> Select shipment interval (optional):
     <select id="shipment_option" name="shipment">
      <option  selected="selected" value="7" id="7">7</option>
      <option value="6" id="6"> 6 </option>
       <option value="5" id="5">5 </option>
    <input type="hidden" name="return" value="success.php">
     <input type="hidden" name="cancel_return" value="paypal_cancel.php">
    <input type="image" name="submit" border="0" src="LG.gif">


ini_set('display_errors', 1);


PP_MTS_Chad February 2016

You can use PayPal's "custom" variable to pass this over to PayPal, and it will also be returned to you in the post back to your site. Buyer's also wont see this variable on their end.

Post Status

Asked in February 2016
Viewed 1,423 times
Voted 4
Answered 1 times


Leave an answer

Quote of the day: live life