Ogone PSP integration

Contrib type: 
Module
Status: 
Uploaded for testing
Compatibility: 
Ubercart Alpha 7b

Hi all,

I've been working on a Ogone payment gateway integration, it's up and running, and ready to be reviewed. It's been tested successfully in the Ogone sandbox. The code has some rough edges, it's partially based on some copy/paste code from the uc_credit module. There might be some pollution because of that. I'm looking forward to some critical feedback and test results.

The module is attached to this post.

Features:

  • No hacks to ubercart core
  • Payment method choice after redirection to Ogone
  • Nice redirection to popup/new window for payment screen
  • Based on 'basic' integration handbook with some tweaks from the 'advanced' integration
  • All settings adjustable in admin form
  • It's intended to be the only payment method, since you can add others to the Ogone gateway.

Todo:

  • Further reviewing/testing
  • Cleaning up/formatting code, adding code comments
  • Automatic currency detection (not working, it's an admin setting right now)
  • Automatic language detection (not tested)
  • Adding popup/plain redirect choice as an admin option
  • Adding inline template for Ogone as an admin option
  • Maybe: Handle payment status feedback more specifically (now only OK is handled, everything else is returned to the checkout page)
  • Suggest me...

Need a test account?
Get it here:
http://www.ogone.com/ncol/web_new_testaccount8.asp
(Choose e-commerce)
Ogone will review your data and send you an email with confirmation and a password.
You can login here: https://secure.ogone.com/ncol/test/frame_ogone.asp

New to Ogone? Check Ogone_e-Com-BAS_v1-1_EN.pdf, available to you after making a test account.

IMPORTANT: In Ogone admin area,
-Enable 'Get' under 1.1
-Fill in 'http://www.yourdomain.com/cart/checkout' under 2.2
-fill in 'http://www.yourdomain.com/cart/checkout/ogone_return_ok' by 4.1 (OK URL)
-Enable "Display a ticket to the client if ..." under 5.2
-Please DO use SHA-1 signatures, or else your merchant-feedback might be messed with

If this is the only payment method enabled, disable the payment method pane in checkout, Ogone will be used for payment handling.

You could change the 'submit order' button text to something more meaningful like 'Go to Payment Screen'.

It's tricky to test from localhost. You have to open up port 80 to that machine, and configure the right URL to it under 4.1.

Thanks to the helpful Ubercart team and forum users for tips and answers.

Regards,

Kees

Qrios Webdiensten, Web development

Module attachment

Here is the file again, zip file corruption?? hmmm.

AttachmentSize
uc_ogone.tar24 KB

Re: Module attachment

Works great! I'll update the original post. Smiling

Re: Re: Module attachment

"Works great", you actualy had time to test this module? Even recovering from your D/Hell of a server crash Eye-wink
Do you have comments on it?

Re: Re: Re: Module attachment

hehe Sorry, "works great" was just for the download itself working. I haven't been able to test it out yet... rebuilding the issue tracker now. Sticking out tongue

testing

Hi,

Thanks for sharing your work in a module!

I'm doing some tests with your Ogone module and Ubercart Alpha 7c and so far it all seems to work fine.

Do you any plans to implement the deferred status update feature of Ogone btw?

Regards,
Dale

Re: testing

Hi Dale,

Thanks for testing.

I will some day probably, not in the near future. If you have 'lazy' info for me, like what URL's are exactly returned, and what status changes and -messages you would like to relate to them, it might speed up the proces Eye-wink.

Regards,

Kees

small bug

You should check if the payment_method equals your module name in hook_order(). Now all the methods in the order hook are called, even if your payment method is not enabled..

Re: small bug

Hi, thanks for pointing out.

This is a known issue, this payment method works when it's the only one.

I'm open for patches.

Kees

Re: small bug

Hi, I want to fix this bug.
I haven´t already made or change drupal-modules. I need some help.

Must it happen here?

/**
* Implementation of hook_order().
*/
function uc_ogone_payment_order($op, &$arg1, $arg2) {
  switch ($op) {
    case 'submit':
                                                          //  (an extra test ????) which one?
        uc_ogone_call($arg1, $arg2);

      break;
....

Change this... still one question?

if ($arg1->payment_method == 'ogone_payment') {
    uc_ogone_call($arg1, $arg2);
}else{
    //what here???
}