Page 1 of 2

Sage Pay Module - Urgent not getting paid!!!!!

Posted: Sun Dec 13, 2009 2:49 am
by markyhenderson
Found a major problem with the sage pay module on version 1.3.4

There are fields missing ou the page hence it does not work when passing to sage pay, final error is when I get to sage pay it says the following: I have tried pasting a new file from another fresh install and it is still the same is anyone else having this issue????


Form Transaction Error

This transaction attempt has failed. Please use the Proceed button go back to the web store from which you were purchasing. The details of the failure are given below.

Status: INVALID

Status Detail: 3087 : The SuccessURL format is invalid.

Proceed

Copyright Sage Pay 2009

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Sun Dec 13, 2009 4:32 am
by i2Paq
Is this paymend module a community release or done by Sage pay as I cannot find it in the contributions or elswhere?

Wich version of OC and that module?

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Sun Dec 13, 2009 9:25 am
by Qphoria
sagepay comes with opencart 1.3.4... all flavors (normal, direct, uk)

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Sun Dec 13, 2009 9:29 am
by Qphoria
try
1. EDIT: catalog/controller/payment/sagepay.php
2. FIND:

Code: Select all

$data['SuccessURL'] = html_entity_decode($this->url->https('payment/sagepay/success&order_id=' . $this->session->data['order_id']));
3. REPLACE WITH:

Code: Select all

$data['SuccessURL'] = $this->url->https('payment/sagepay/success&order_id=' . $this->session->data['order_id']);
Not saying it will work. But some payment providers want the return url encoded and some decoded, and some not encoded.. so it's worth trying. I've not looked at the sagepay spec so I'm only guessing.

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Sun Dec 13, 2009 9:03 pm
by i2Paq
Qphoria wrote:sagepay comes with opencart 1.3.4... all flavors (normal, direct, uk)
OK, I knew I've seen it but just could not remember where.

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Sun Dec 13, 2009 11:37 pm
by markyhenderson
Hi all, Information, This worked fine on the previous version of Open Cart, something has altered since the upgrade!!

may be worth the developer looking at as I am sure others will have the exact smae issue with the sage pay module!!!!

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Tue Jan 12, 2010 11:28 pm
by Qphoria
I'm seeing this problem with one of my client's sites. I upgraded him from 1.3.2 to 1.3.4 and sagepay started returning an error. I will likely have to update the 1.3.2 version to work with 1.3.4 and use that I guess

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Wed Jan 13, 2010 1:17 am
by sunburn1979
Has this issue been resolved?

I'm going live with an 1.3.4 project this weekend and client uses sage pay, this will be a complete arse-hat if this issue hasn't been resolved.

Any one?

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Thu Jan 14, 2010 6:00 pm
by sunburn1979
Can any developer look into this issue for us non developer types?
I have tried Q's. suggestion but this hasn't resolved the problem, I'm sure there are others but I really need this payment module to be working again.

The store owner will go mental! and it was working in prior version to 1.3.4 afaik!

Please get in touch.

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Thu Jan 14, 2010 8:30 pm
by Qphoria
what was my sugg? to convert the old 1.3.2 to 1.3.4? I haven't modded it yet.. unless you have

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Thu Jan 14, 2010 8:41 pm
by Daniel
i think the solution has already been posted once.

it was something to do with mispelled country_info.

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Thu Jan 14, 2010 8:56 pm
by Qphoria
That was for usps.
The sagepay 1.3.4 has a few php errors in it for similar things. But even after fixing those, the checkout process gives an error when it gets redirected to sagepays site. Something about invalid hash. There was no error on the 1.3.2 one. Looking at the code, there are some pretty significant changes. I haven't looked into it fully yet.

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Thu Jan 14, 2010 11:54 pm
by gngman
Hi Guys,

Any news on this mod..... Im getting the same error:

Status: INVALID

Status Detail: 3087 : The SuccessURL format is invalid


Any help would be appreciated.

thanks

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Fri Jan 15, 2010 12:05 am
by Qphoria
yea thats the error i get tooo

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Fri Jan 15, 2010 12:27 am
by gngman
anyone able to look into this, ive been on it all afternoon and think it just needs a fresh pair of eyes...

catalog/controller/payments/sagepay.php

on line 31:


$data['SuccessURL'] = 'payment/sagepay/success&order_id=' . $this->session->data['order_id'];

????

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Fri Jan 15, 2010 1:01 am
by Qphoria
that part hasn't changed since 1.3.2.. my client said he got it working changing some settings in his sagepay account about unneeded IPs for forms. I'll see about more info

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Fri Jan 15, 2010 3:45 am
by sunburn1979
Any info Q/ Daniel would be greatly appreciated.

I wait with baited breath!

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Thu Jan 21, 2010 9:39 pm
by christopherdarling
getting the same error, using v1.4.

Simulator is giving the following :

http%3A%2F%2Fdomainname.co.uk%index.php%3Froute%3Dpayment%2Fsagepay%2Fsuccess%26order_id%3D21
The SuccessURL field should contain a Fully Qualified Address i.e. it should begin with http:// or https:// followed by the full web page address.

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Thu Jan 21, 2010 9:59 pm
by christopherdarling
Just found a fix for this, open catalog/controller/payment/sagepay.php

Goto line 109 (should be $this->data['vendor'] = $vendor;)

Add the following code underneath..

Code: Select all

$cryptArr = array();
	
foreach($data as $key=>$val){
	$cryptArr[] = $key . '=' . $val;
}
Now change the following line:

Code: Select all

$this->data['crypt'] = base64_encode($this->simpleXor(http_build_query($data), $password));
to :

Code: Select all

$this->data['crypt'] = base64_encode($this->simpleXor(implode('&',$cryptArr), $password));

Please post your results of using this bugfix.

Re: Sage Pay Module - Urgent not getting paid!!!!!

Posted: Sun Feb 14, 2010 6:48 pm
by tony44
Just wondering if this fix is for 1.4.0 and if anyone has tried it yet? I've had to disable Sage Pay on my site until this is fixed and I need a solution urgently.

Thanks.