WordPress.org

Ready to get started?Download WordPress

Forums

CP Contact Form with Paypal
[resolved] Pass address to PayPal (2 posts)

  1. taginternetconsulting
    Member
    Posted 1 year ago #

    Is there a way to set up the form to pass the contact info (name, address, phone, email) to PayPal? Also, my client would like the PayPal notification to populate the shipping info as well. His notification from PayPal used to include the shipping info (name, address) when we used a different plugin, but now that we switched to CP it isn't doing that anymore. Is that something that needs to be done through the plugin or PayPal?

    http://wordpress.org/extend/plugins/cp-contact-form-with-paypal/

  2. codepeople
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    If you want to automatically forward some of the user information (name, address, ...) to PayPal you will have to manually identify that information from your form. Note that the only field identified in the form is the email, the other fields needs to be matched with the fields that PayPal is expecting.

    For doing that go to the file "cp_contactformpp.php", about line #710 (after the form tag open there, line number may be different not sure which version are you using), and insert the following line:

    <INPUT TYPE="hidden" NAME="first_name" VALUE="<?php echo $_POST["fieldname1"]; ?>">

    ... "fieldname1" should be replaced with the name of the field on the form, that is with the internal name, the internal fields are named "fieldname1", "fieldname2", .... you can check that name into the form builder.

    The complete reference for the PayPal fields is located here: https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_prepopulate_outside

    To request an address at PayPal go a file lines below and modify this parameter:

    <input type="hidden" name="no_shipping" value="1" />

    ...to this one:

    <input type="hidden" name="no_shipping" value="2" />

    If you are using the pro version you can open a private ticket at http://wordpress.dwbooster.com/contact-us , provide your page address and we will give you an edited file for that purpose.

    Thank you for using the plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.