CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Creating URL to custom form, sending member data via HTTP GET
Pages: [1]

Author Topic: Creating URL to custom form, sending member data via HTTP GET  (Read 1201 times)

geddeth

  • Guest
Creating URL to custom form, sending member data via HTTP GET
January 19, 2010, 01:40:01 pm
Hi everyone, will try to keep this short and simple. I am new to CiviCRM, and a skilled PHP professional, so please direct me to dev forums if appropriate.

I wish to create a membership signup form using CiviContribute, that does not do any real-time payment processing. Instead, the user should be able to click a link (or ideally, a window should popup) during signup that opens a HTML form on an external server, in which the user enters creditcard information. Part of the form should be pre-populated, using parameters in the URL that contain the user's name, address etc. that she just filled out. It is not necessary for CiviCRM to validate this data or check that it was even entered. I only need to generate this URL in the best way possible without (too many) hacks.

An example URL would be something like:
https://www.example.com/BS/?pbs=1kl3j5j76b32l2&dbnr=&dbgr=00001&name={$name}&addr={$addr}&zip={$zip}&memberid={$memberid}

As you can see, some parameters are static, and others variable. Particularly the newly generated member ID is important, in order to connect the payment information with the memberdata in CiviCRM.

I am thinking this could be as simple as hacking the thank-you template and inserting the user data dynamically, but could really use a pointer on this. Which direction should I go, and where should I begin my research into getting this working?

Thanks very much!

/Geddeth

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Creating URL to custom form, sending member data via HTTP GET
January 19, 2010, 04:21:11 pm

check how paypal standard is implemented. We send in a lot of information via the URL

i suspect you can model your payment processor that way

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Creating URL to custom form, sending member data via HTTP GET
January 19, 2010, 04:25:50 pm
Or... if you simply want to populate name/value pairs in a URL + query string that's added to the Thankyou Page .... I think most / all of those values are available to the smarty template that renders the thankyou page - in which case you can create a custom version of that template and add your link with smarty variables.

If this approach seems viable then I would start by enabling Debugging in your CiviCRM Global Settings, and then you'll need to add a line like this:

Code: [Select]
{debug}

.. to the top of this file - templates/CRM/Contribute/Form/ThankYou.tpl - to force the smarty debug window to pop-up and show you all the available variables when you hit that page.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Creating URL to custom form, sending member data via HTTP GET

This forum was archived on 2017-11-26.