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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Help with building a payment processor
Pages: [1]

Author Topic: Help with building a payment processor  (Read 2101 times)

pcmac

  • Guest
Help with building a payment processor
December 25, 2008, 03:11:19 am
Hi, I am building an continuing medical education website (CME website) that needs to allow users to sign up and register for conferences (some free, others are fee-based), and the later on allow users to print their certificates of credit or completion (and to do other self-maintenance tasks like updating post and email addresses).  From my searches, Drupal + CiviCRM seems like a good fit. 

There are a few quirks with how credit card payments are processed, however.  The client already has a CC processing gateway in place, and there are a few pages hosted on a trusted web server that relays CC processing requests to the gateway.

The pages on the trusted server just collects payment and credit card info, and then posts (HTTP POST) a form containing the result (success/failure, and other identifying info) back to the CME website.  Having looked at http://wiki.civicrm.org/confluence/display/CRMDOC/Creating+Additional+Payment+Processor+Plugins, and the files under CRM/Core/Payment, CRM/Contribute/Payment, and CRM/Event/Payment, it appears to me that I am writing a "notify" type of payment processor.

The part that forwards from CiviCRM to the trusted server seems straight forward enough, but I'm wondering how it is that the "main" function in (for example, PaymentExpressIPN.php) gets invoked.

I guess, first of all, I would like to know if I'm going down the right path by writing a "notify" type of processor, and if so, how does CiviCRM get notified.  GoogleIPN.php says in the opening comment about a "API Callback URL", but what exactly is this URL?

Thank you very much for your assistance.

Peter


pcmac

  • Guest
Re: Help with building a payment processor
December 25, 2008, 03:22:42 am
Wait, I just noticed that in extern/, ipn.php, pxIPN.php, and googleNotify.php call the corresponding "main" functions.  Sorry about that.  Still I would like to know if I'm going down the right path.  Thank you very much.

Peter

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: Help with building a payment processor
December 25, 2008, 07:46:04 am

hey peter:

1. yes notify is the right type of processor

2. typically you register a 'callback' URL for the processor to POST back the status along with other information (like transaction id, net amount, fee amout etc). That URL basically invokes extern/ipn.php (or extern/googleIPN.php) etc which then calls the main function

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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Help with building a payment processor
December 25, 2008, 06:47:00 pm
If you want more help send me a pm as I think I wrote the notes you are looking at.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

pcmac

  • Guest
Re: Help with building a payment processor
December 25, 2008, 09:34:23 pm
Thank you both Donald and Eileen for the quick reply.  So if my drupal site is at 'http://somehost/drupal-6.5', and I put 'cyberpayIPN.php' in extern/, does 'http://somehost/drupal-6.5/civicrm/extern/cyberpayIPN.php' hit it?

Eileen, when you said to send you an "pm", do you mean "personal mail"?

Again, thank you very much.  I hope to become a contributing member soon.

Peter

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Help with building a payment processor
December 26, 2008, 01:25:30 am
Yeah - you go into my profile & send me a personal message.

The URL should be more like this http://yoursite/sites/all/modules/civicrm/extern/ipn.php

If you replace yoursite with yoursite in the above you should hit a page of some sort - I get the message "Could not get module name from request url" - this means the url is correct as it is finding a page.

NB Your payment processor may  allow / require you to configure the url that they POST back to under your account settings rather than you passing it to them as part of the request.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

pcmac

  • Guest
Re: Help with building a payment processor
December 26, 2008, 08:24:25 pm
Thank you, Eileen.  Let me try a few things and see...

Peter

pcmac

  • Guest
Re: Help with building a payment processor
January 06, 2009, 01:38:58 am
Hi Eileen and Donald.  I'm glad to report that I have a payment processor that appears to be functioning now.  I'll of course need to do some more testing as well as customize it further to display relevant transaction info to help our staff identify payments.  I guess this part isn't strictly part of a payment processor, so I'll dig around some more. 
Anyway, I just want to express my appreciation, and will in the next few weeks update the wiki with my experience.

Peter

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Help with building a payment processor

This forum was archived on 2017-11-26.