This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Pass additional information to PayPal - Machform 3.x.


  1. Steve1951
    Member

    I would like to pass additional information to PayPal such as a person's name from the form. Most of the time the name on the form is not the same as the name of the person making the payment. My client's account needs to see the applicant's name on the PayPal payment verification. I have an understanding how to do this as I am currently using Machform 2.x as the front end for PayPal payments. I need to know which program (in version 3.x) formats and sends the data to PayPal so I will know which program I need to modify.

    Thanks,
    Steve

    Posted 12 years ago #
  2. yuniar

    There is a function within "includes/post-functions.php" file called "mf_get_merchant_redirect_url".
    You can simply modify this function to pass another parameter to PayPal.


    MachForm Founder

    Posted 12 years ago #
  3. frankzobitz
    Member

    Would you be able to elaborate a little further? I opened the post-functions.php file and found the function, but if I had a Name field on my form (text field), how do I pass that to PayPal? Also, is it possible to get the PayPal transaction ID or Invoice ID populated back to the form database? Thanks!

    Posted 12 years ago #
  4. frankzobitz
    Member

    In PayPal, when I look at a transaction, there is an invoice ID field. For example: 53_2 Does the 53 mean it is form #53 and the 2 mean it is the second entry in the database? If so, that works for me!

    Posted 12 years ago #
  5. yuniar

    Yes, the format is [formid]_[entryid], so #53 is your form id number and 2 is the entry id number.


    MachForm Founder

    Posted 12 years ago #
  6. seangritzman
    Member

    was there an answer on how to pass the name field data to paypal? our business runs into this same issue where we have one person paying but applying it to someone else. it would certainly help our bookkeeping if we could easily identify this in paypal.

    Posted 12 years ago #
  7. Vitus
    Member

    Yuniar, I think it will be hard for high traffic sites to identify payer information. Wonder if it is possible to add an ipn script to link Paypal Txn ID and the related transaction in the 3.3 release.

    Posted 12 years ago #
  8. hgmd2005
    Member

    How do I add a variable from a particular form into "includes/post-functions.php" file?
    I need to send our invoice number so it will be on the receipt in PayPal.

    Posted 12 years ago #
  9. Steve1951
    Member

    Here is a sample of how I added a couple of items from one particular form to PayPal.

    // Start custom modification by xxx 20-Jul-2012 19:08 ----------------------------------------------
    if ($form_id == 575 || $form_id == 1284) {
      // Always include Rider name.
      $paypal_params['item_name_'.$i] = 'Rider Name: ' . $_SESSION['form_data']['element_1_1'] . ' ' . $_SESSION['form_data']['element_1_2'];
      $paypal_params['amount_'.$i] = '0';
      $i++;
      if ($_SESSION['form_data']['element_10'] == 1) {
        // Include passenger name if passenger attending yes is selected.
        $paypal_params['item_name_'.$i] = 'Passenger Name: ' . $_SESSION['form_data']['element_8_1'] . ' ' . $_SESSION['form_data']['element_8_2'];
        $paypal_params['amount_'.$i] = '0';
      }
    }
    // End custom modification by xxx 20-Jul-2012 19:08 ----------------------------------------------
    
    $merchant_redirect_url = 'https://www.paypal.com/cgi-bin/webscr?'.http_build_query($paypal_params,'','&');
    Posted 12 years ago #
  10. katherholt
    Member

    I too need help, I'm trying to put some simple information on the PayPal Description Summary:
    Line 2390 in the includes/post-functions.php file (version 3.3). The fields are text fields.
    =============================================================================

    // Start custom modification by BBD 07-DEC-2012 ----------------------------------------------
    if ($form_id == 15595) {
    // Always include Name.
    $paypal_params['item_name_'.$i] = 'Your Name: ' . $_SESSION['form_data']['element_1_1'] . ' ' . $_SESSION['form_data']['element_1_2'];
    $paypal_params['amount_'.$i] = '0';
    $i++;
    // Include invoice number.
    $paypal_params['item_name_'.$i] = 'INVOICE Number: ' . $_SESSION['form_data']['element_8'];
    $paypal_params['amount_'.$i] = '0';
    $i++;
    }
    // End custom modification by BBD 07-DEC-2012 ----------------------------------------------

    $merchant_redirect_url = 'https://www.paypal.com/cgi-bin/webscr?'.http_build_query($paypal_params,'','&');

    //get payment processor URL, if applicable for this form

    =================================================================================
    Does the code look proper to you? Can this be done?

    Here is the form http://www.visitmetroatlanta.com/membership.html
    Thank you for any help you can provide.

    Posted 11 years ago #
  11. katherinewatson
    Member

    We also need to send additional code to PayPal. We have to collect sales tax when we sell products to residents of our state, but we are not required to collect sales tax for seminars, so we need to be able to send a code to PP to override the sales tax setting. Thanks.

    Posted 11 years ago #

RSS feed for this topic

Reply