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) »
  • New Payment Processor
Pages: [1]

Author Topic: New Payment Processor  (Read 2097 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
New Payment Processor
August 26, 2009, 12:18:05 pm
I  am mostly done with a new payment processor. It's the hosted solution provided by Elavon called Virtual Merchant. Directing the user to Virtual Merchant works and then when the user is sent back to the CiviCRM site, I am capturing the returned data, with the approval data from the processor. The question is now what do I do? I need to mark the event registration as approved, but I don't know how to do that.

To clarify, the return URL is [path to civicrm]/extern/ElavonVM.php and that file is virtually the same as the googleNotify.php in that same directory--it captures the response data and then calls CRM_Core_Payment_ElavonVM::processResponse. So the question is what do I do there to mark the transaction as successful?

Seems that I need to use

Code: [Select]
        require_once 'CRM/Core/Transaction.php';
        $transaction = new CRM_Core_Transaction( );

but after that I'm not sure precisely what to do.

Thank you for any further information.

PS: Another interesting by product of what I have done is that when I load the event registration page in the browser, a JS alert box tells me:

Code: [Select]
Request to show() function failed. Element id undefined = payment_information
Any idea what that is?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: New Payment Processor
August 26, 2009, 02:04:12 pm
Hi - are these notes helpful on point 1?

http://wiki.civicrm.org/confluence/display/CRMDOC/Creating+Additional+Payment+Processor+Plugins

( the notify mode section)

Re: # 2 - fisheye isn't working but there is a patch - not sure if it's 100% though

http://forum.civicrm.org/index.php/topic,7568.msg33364.html#msg33364
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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: New Payment Processor
August 26, 2009, 02:04:42 pm
ps - Are you able to post your code
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

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: New Payment Processor
August 27, 2009, 06:23:16 am
After a chat with Lobo on IRC, I am now understanding what you meant when you wrote in another thread that using a POST instead of a GET to transfer the user to the payment processor is the tricky part. I now see two solutions to this issue:

1. Just use a GET. Turns out that VirtualMerchant will accept a GET in reality. This is an option if the University IT Security team will approve of this. They are real sticklers. :)

2. Redirect with a GET to a custom page on the same site, powered by a custom Drupal module--the module can then create the FORM and present the user with the FORM and a submit button, thereby transferring him to VirtualMerchant with a POST.

CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: New Payment Processor
August 27, 2009, 12:36:57 pm
Seems that I have everything in place now, save for the thank you page. I always get "Could not find valid Key". In function doTransferCheckout I used:
Code: [Select]
       echo $params['qfKey']; die;to test and I saw c7e6c3faa772415b9d1bc998fb5e2a39

Then I removed that line and finished the payment and came back to
Code: [Select]
/index.php?q=civicrm/event/transact&_qf_ThankYou_display=1&qfKey=c7e6c3faa772415b9d1bc998fb5e2a39and it says "Could not find valid Key"

The rest of the logic works, however--the event registration is recorded and an email is sent. In the attached code you will see that I commented out line 98

Code: [Select]
           //        'qfKey='.$params['qfKey'].
so that the team running the event in question can test the rest of it. With that line commented out, after the payment is processed, users see the home page. If I do NOT comment it out, then they get the ugly yellow "Could not find valid Key" error.

Any ideas what is wrong this code?

Thanks.

[EDIT] All URLs involved are of the form https://site.org/
« Last Edit: August 27, 2009, 12:47:45 pm by hershel »
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • New Payment Processor

This forum was archived on 2017-11-26.