Protx VPS Form Payment Gateway

Contrib type: 
Module
Status: 
Complete and working
Moderation: 
Failed code review

Downloads

Compatibility: 
Ubercart 1.x

This little module connects ubercart up to a Protx VPS Form payment gateway.

This is live on one site at the moment and seems to work pretty well, any feedback, bug reports (preferably with fixes) would be welcome.

UPDATED 01/08/2008
Thanks to James for pointing out an error in this version... i've just posted up a new version of the module which should get around any 5030 error messages you might encounter when you move to the test server.

PreviewAttachmentSize
uc_protx.zip14.86 KB
perfectmatch's picture
Offline
Joined: 05/30/2008
Juice: 79
Implementing Protx

Lemonbiscuit,

Can you help me out a bit and explain how your module should work please.....

Have a drupal site about to go live and need to tie up Protx VSP Forms as the payment gateway. I have uploaded your file to the modules directory. Is this the right place or should it go into the Ubercart directory?

I see the module listed in "modules" and can access the settings but i don't seem to be about to enter any "gateway information"

If you could let me know what i'm doing wrong, i would much appreciate it and would be more than happy to share my testing experiences with you for any further development.

Cheers,

hanoii's picture
Offline
Joined: 07/30/2008
Juice: 103
VSPDirect or Server

Hi Lemonbiscut,

I am about to start some development for integrating VSPDirect of protx. I gave a brief look to your module and probably based my development in others payments modules but I was wondering how active you are with this module and if I shall extend yours or create a new one, what do you think?

Thanks,
a.=

Lemonbiscut's picture
Offline
Joined: 01/24/2008
Juice: 19
Re: Implementing Protx

Unzip the file and put the uc_protx folder into /modules/ubercart/payment...

The gateways are pre-set in the module.

Lemonbiscut's picture
Offline
Joined: 01/24/2008
Juice: 19
Hi, I built the module for

Hi,

I built the module for a client site, and haven't really touched on it in a while, although I am using it on 2 sites myself now, and have also ported it to run in Zend Framework apps.

Feel free to use it and abuse it...

My personal thoughts are that VSPDirect is implemented quite differently from the way VSPForms works, so it should really be a separate payment module.

Regards,
Tim

perfectmatch's picture
Offline
Joined: 05/30/2008
Juice: 79
Re: Hi, I built the module for

All up and running on my site now ... works a treat! Nice one Tim!

Eugene Dubois's picture
Offline
Joined: 09/02/2008
Juice: 19
did anyone do un upgrade for Drupal 6?

If not, I will have to give it a go...

Eugene Dubois's picture
Offline
Joined: 09/02/2008
Juice: 19
first version for drupal 6

Attached first version for drupal 6. (not working yet)

One problem though, in function uc_protx_form the variable $order seems to be empty...

Does anyone know what I have done wrong?

Thanks,

Eugene

AttachmentSize
protx for drupal version 6 14.4 KB
tnomad's picture
Offline
Joined: 10/29/2008
Juice: 3
Re: Protx VPS Form Payment Gateway

Thanks for this module. I'm using it on a client site now. However you only had support for PAYMENT transactions and we were using AUTHENTICATE. So I had to add in a few lines:

In the setting form I added

$form['uc_protx_method_type'] = array(
'#type' => 'select',
'#title' => t('Payment method type'),
'#options' => array(
"PAYMENT"=>"PAYMENT",
"AUTHENTICATE"=>"AUTHENTICATE",
"DEFERRED"=>"DEFERRED",
),
'#default_value' => variable_get('uc_protx_method_type', 'PAYMENT'),
);

and in then in the submission function I changed the line containing TxType to:

'TxType' => variable_get('uc_protx_method_type', 'PAYMENT'),

Might I suggest you add code along these lines into your version to make the gateway a little more flexible.

Thanks...

Eugene Dubois's picture
Offline
Joined: 09/02/2008
Juice: 19
working drupal 6 version

attached now a working version for drupal 6.

AttachmentSize
uc_protx6.zip 15.19 KB
dj_mystic82's picture
Offline
Joined: 11/19/2008
Juice: 48
Problem with uc_protx module and uc_address

Could anyone help with this problem I have posted on the uc_addresses module page : http://drupal.org/node/354479

The problem seems to be to do with uc_protx and uc_addresses not quite working together smoothly.

dj_mystic82's picture
Offline
Joined: 11/19/2008
Juice: 48
Re: Problem with uc_protx module and uc_address

The post found at http://drupal.org/node/354479 suggests that the uc_protx module is not following the rules quite correctly. Is the module being maintained?

probocop's picture
Offline
Joined: 05/14/2009
Juice: 3
Re: Re: Problem with uc_protx module and uc_address

Is there a patch or a new version of this module to support the Protx 2.23 protocol?

I changed the 2.22 in the .module file to a 2.23 (to see what would happen) and it got a bit further, the problem I then had was that the billing address wasn't being passed correctly. It would appear in the customer email field (on the protx VPS Simulator). For example 'email@email.co.uk&BillingAddress=Company Address Line 1 Address Line 2'

Any idea why this would be?

Ollie222's picture
Offline
Joined: 05/05/2009
Juice: 67
Re: Re: Re: Problem with uc_protx module and uc_address

Protx now require more information. Amongst other things the address lines need to be supplied individually and not as a block.

Basically some mods are needed to make this work and to my knowledge no one has done this yet.

I've just had a quick look at the new protocol and making it send the correct information shouldn't be too difficult. I may have a look at this myself for a project I'm doing and if I get anywhere I'll post up the amended version.

Ollie222's picture
Offline
Joined: 05/05/2009
Juice: 67
Re: Re: Re: Problem with uc_protx module and uc_address

I've been messing around with this very thing today and believe I have the posting to the simulator working. There's still more work needed on other parts but would anyone be interested in doing a bit of testing at some point soon?

Richard Jones's picture
Offline
Joined: 06/03/2009
Juice: 43
Testing on Drupal 6

Hi Ollie,

I am definitely interested in helping test this. I have a number of sites using Form and Direct. I did find out that the live accounts will still accept protocol 2.22 for the time being even though the simulator will not.

I have all this working well in Drupal 6 / UC 2.0 RC3 but am getting a permission denied error when the post back to the website comes in. This means the order is stuck at checkout and the email etc doesn't get triggered.

I am looking into this now, so will post up my results.

Richard

Richard Jones's picture
Offline
Joined: 06/03/2009
Juice: 43
Fixed!

Sorry, fixed before the post was even dry Smiling

The problem was the use protx permission was not set for anonymous users.

If it helps anyone, attached is a graphic replacing the Protx logo with a SagePay one. just drag it over the existing one in the module.

Richard

AttachmentSize
protx.gif 5.6 KB
Will's picture
Offline
Joined: 08/28/2008
Juice: 80
Hi Richard, We had exactly

Hi Richard,

We had exactly the same problems, and found the same solution - but now the customer receives a confirmation email, but not the store holder. Are you getting the store owner confirmation emails ok?

Thanks for the Sage graphic!

Will

Wan
Wan's picture
Offline
Joined: 12/08/2009
Juice: 19
Does this works with Drupal 6.14 + Ubercart 2.2?

Is anyone successfully using this (Sagepay VSP Form) with Drupal 6.14 and Ubercart 2.2?

I definitely need this module to work for a site I'm building, so if it is not working please let me know so I can look into updating it.

Many thanks,
Ewan

dj_mystic82's picture
Offline
Joined: 11/19/2008
Juice: 48
Re: Does this works with Drupal 6.14 + Ubercart 2.2?

Yes, I have this module running on serveral Drupal 6 sites with no problems.

hydrantmark's picture
Offline
Joined: 04/22/2010
Juice: 61
Re: Re: Re: Re: Problem with uc_protx module and uc_address

Hi Ollie,

Have you had any joy updating uc_protx for the newer protocol version?

Have been looking at this as well, and maybe we could pool our efforts.

Mark.

Jon_V's picture
Offline
Joined: 03/13/2009
Juice: 20
Patch for protocol 2.23

Hi,

I've attached a patch against Eugene's uc_protx6.zip from comment 9.

The patch works with sagepay protocol 2.23, and also updates the urls to the new sagepay ones. Please let me know if you have any issues with it.

Jon

AttachmentSize
uc_protx6_protocol-2.23.diff 3.96 KB

--
Mirrorstone Crystals - UK crystal and fossil shop

sunburst808's picture
Offline
Joined: 08/02/2010
Juice: 7
Hi, I would like to test

Hi,

I would like to test this Sagepay module you have uploaded but not do not know how to use Diff command. Any advice how to do this? or could you be kind enough to attach a proper zip file as a module?

Thank you,

sunburst808's picture
Offline
Joined: 08/02/2010
Juice: 7
Re: Hi, I would like to test

It's okay, figured out how to create a patch from diff file (from #21 comment). Thanks.

Attach is a file you can just replace the other uc_protx.module (found in #9 comment).

Not sure if it works yet, just getting onto testing.

cheers,

AttachmentSize
uc_protx.module.zip 4.85 KB
TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3287
Re: Re: Hi, I would like to test

You should not be using any of the code posted in this thread, you should be using the official module hosted on drupal.org: http://drupal.org/project/uc_protx_vsp_direct

If there are problems with that module, you should post them to the issue queue at that same URL.

<tr>.
sunburst808's picture
Offline
Joined: 08/02/2010
Juice: 7
Re: Re: Re: Hi, I would like to test

Thanks for letting me know. But that module is for VSP Direct. We are only looking for a simple payment using Form or Sagepay Go server not an integration and taking credit card details from our own site which is what i believe uc_protx_vsp_direct module is only for.

jonty17's picture
Offline
Joined: 09/01/2010
Juice: 32
Re: Re: Re: Re: Hi, I would like to test

Can anybody tell me if this module is safe to use? It looks like it works pretty well but it's not an 'official' module... Which is very strange as I would have thought there would be a massive demand for Sage *FORM* integration. Does anybody know of any work going on to maintain this module? Is there any way we can get it verified as being secure? Is anybody else having the same problem?

hydrantmark's picture
Offline
Joined: 04/22/2010
Juice: 61
Re: Re: Re: Re: Hi, I would like to test

The company I work for have a number of sites running the Drupal 6 version (from comment #9), and a number using the Drupal 5 version, both successfully and without issue.

We haven't tried the updated version from sunburst808 for version 2.23 of the VSP protocol, although we have looked at updating for this version of the protocol with some success.

Which as far as I can tell others have done as well, so there may well a number of fragmented versions of the SagePay VSP Form module out there.

It may be worth looking at pooling what has been done by various people, into one cohesive 'official' module. What do others think?

jonty17's picture
Offline
Joined: 09/01/2010
Juice: 32
Re: Re: Re: Re: Re: Hi, I would like to test

Thanks HydrantMark, it's nice to know that it's being used successfully. I've just been testing the latest version of the module and it looks to be working OK with the test server.

I guess it would make sense for everybody to pool their resources to get the best out of this code, it just needs somebody to take the initiative!

Wan
Wan's picture
Offline
Joined: 12/08/2009
Juice: 19
Is #23 working?

Hi, firstly thanks for everyone who is contributing to this.

I don't know how to apply .diff files s can you tell me if the module in #23 is working?

Many thanks,
Ewan

bobknocker's picture
Offline
Joined: 11/17/2010
Juice: 37
i'm a dumb ass

is this a full module as it seems real small, I have downloaded the file and unzipped it, where should I put it please

hydrantmark's picture
Offline
Joined: 04/22/2010
Juice: 61
Re: i'm a dumb ass

Which Zip file did you download?

If it's the one on comment #23, then no, that's not the full module I'm afraid. It's a patched version of one of the module files.

The full version can be found at comment #9.

I usually just out it in the ubercart contrib folder (sites/all/modules/ubercart/contrib/). You could equally just put it in the sites/all/modules folder

jonty17's picture
Offline
Joined: 09/01/2010
Juice: 32
Re: Re: i'm a dumb ass

There is a small problem with vendors not getting confirmation emails from sage. I think I've fixed this - if you add the following after line 191 it sends the main site email address as the vendor email address:

$strPost.= "&VendorEMail=".variable_get('site_mail', ini_get('sendmail_from'));

It seems to work OK, but it hasn't had extensive testing - and I might not have used the best method for getting the store owners email address.

Smiling

bobknocker's picture
Offline
Joined: 11/17/2010
Juice: 37
protx gateway

Hi, still not got this thing working properly hope someone can help, i have done a test payment and all is cool but when i go live i get problems, as follows

Status: INVALID
Status Detail: 4006 : The TxType requested is not supported on this account.

i am not sure if it is connected but in payment methods, protx default gateway states none available, have i missed something or got something set up wrong

really hope someone can help

thanks

steve

Richard Jones's picture
Offline
Joined: 06/03/2009
Juice: 43
Hi Steve, This can mean a

Hi Steve,

This can mean a couple of things...

1) Your live account has not been set live by SagePay
2) You are using a payment method in the module that is not set up on your live account.

for 2 check if you are using DEFERRED or not in the module code - this module is not exactly official, so it doesn't have options to change these things.

Richard

crispymix's picture
Offline
Joined: 05/19/2011
Juice: 8
Updated version of module

Hi!

I've been working in the background on a new version of this module for Drupal 7 and Ubercart 3 (with support for v2.23 of the VPSProtocol for SagePay Form as it's now know). Not sure whether it should be merged with this project (Lemonbiscuit - are you still around and maintaining this?) or started afresh, and possibly backported to Drupal 6/UC2. Please contact me if anyone is interested - hopefully be setting up a Drupal project page for it soon...

Chris

hydrantmark's picture
Offline
Joined: 04/22/2010
Juice: 61
Re: Updated version of module

Hi Chris,

I'm not sure if Lemonbiscuit, is still around, but I would be interested in getting involved.

I have a version of the module for Drupal 6/UC 2, which could be used to go towards the D6/UC2 version. It hasn'tt been touched in a while, and is probably due a clean up codewise, but it's working and is being used in a couple of sites that I have been involved in building.

Lemonbiscut's picture
Offline
Joined: 01/24/2008
Juice: 19
Hey up... It's been a while,

Hey up...

It's been a while, sorry for the lack of support on this thread, but I honestly just threw this together in an afternoon to use on a couple of sites, and then promptly forgot all about it. I've not maintained anything on here for a while, but if you want to fork it to create a new SagePay module instead based on this, then you of course have my full blessings.

Drop me a line with the URL for your new module and I'll link to it from the module description.

Tim

crispymix's picture
Offline
Joined: 05/19/2011
Juice: 8
Re: Protx VPS Form Payment Gateway

@lemonbiscuit - that's great to know. I too developed this for a client project so thought it would be good to see if it would help others. Will send you the project page once I get my head around some things, hopefully this week.

@hydrantmark that's a great idea as between us we can then have all the major combinations of drupal and uc covered. Have you had any experience maintaining or contributing to a drupal project before?

Chris

hydrantmark's picture
Offline
Joined: 04/22/2010
Juice: 61
Re: Protx VPS Form Payment Gateway

No, unfortunately, I don't have any previous experience maintaining or contributing to a drupal project. However there is no time like the present to pick up what's needed/involved, it would be good to get involved and start giving something back to the community.

Mark

bobknocker's picture
Offline
Joined: 11/17/2010
Juice: 37
order sat in checkout

hi, order seem to be working through protx however they stay in checkout and no comfirmation of order is sent to admin not sure if these are connected but i guess when someone checks out using protx there order should move to pending and an email should be sent to admin, can someone please help

steve

hydrantmark's picture
Offline
Joined: 04/22/2010
Juice: 61
Re: order sat in checkout

Do you get an email from Protx/SagePay about the order?

If not it sounds as though, either the order isn't going through Protx/SagePay properly, or there could be issue with the callback from Protx/SagePay.

When you run through an order, do you return to a page on your site that says 'Order Complete', or something along those lines?

amcoms's picture
Offline
Joined: 04/04/2012
Juice: 150
sagepay form working

hi did you get this to work?

amcoms's picture
Offline
Joined: 04/04/2012
Juice: 150
Direct Not Form Big Difference

This is the Direct method not the Form and there is a big difference, the code on the forum should be added to the ubercart site and developed on?????

amcoms's picture
Offline
Joined: 04/04/2012
Juice: 150
any news on this?

I agree is there any news for the form module to work with Ubercart 3 Drupal7 ?