Jump to content

Archived

This topic is now archived and is closed to further replies.

Kristoff

Issue with SagePay 3.0 and digital downloads after update... again...

Recommended Posts

Hi guys, we had this issue before, but fixed it, see here:

 

http://forums.cubeca...s-with-sagepay/

 

However, this time, i've checked how I fixed it before, which is still the same, yet not working. Basically after payment, the order is just setting to pending... Nightmare. Any ideas?

 

Seems like it's not letting me set it to XOR?

Share this post


Link to post
Share on other sites

Let's just double-check:

 

In admin, navigation panel, click PHP Info. Scroll down about half-way until you get to a section (in alphabetical order) that may or may not be there: mcrypt. It will be between mbstring and mhash.

 

If the mcrypt section is there, then we have a different problem with the module.

 

If the mcrypt section is not there, then please contact your hosting provider to have them enable this PHP extension for your hosting account.

Share this post


Link to post
Share on other sites

Let's just double-check:

 

In admin, navigation panel, click PHP Info. Scroll down about half-way until you get to a section (in alphabetical order) that may or may not be there: mcrypt. It will be between mbstring and mhash.

 

If the mcrypt section is there, then we have a different problem with the module.

 

If the mcrypt section is not there, then please contact your hosting provider to have them enable this PHP extension for your hosting account.

 

'--with-mcrypt=/opt/libmcrypt/'?

Share this post


Link to post
Share on other sites

Scroll down the page about half-way until you get to a section (in alphabetical order) that may or may not be there: mcrypt.

Share this post


Link to post
Share on other sites

Ok, apologies. Mac/Chrome, hid my scrollbar, looked like the bottom of the page!!

 

mcrypt mcrypt support enabled mcrypt_filter support enabled Version 2.5.8 Api No 20021217 Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes Supported modes cbc cfb ctr ecb ncfb nofb ofb stream

 

Directive Local Value Master Value mcrypt.algorithms_dir no value no value mcrypt.modes_dir no value no value

Share this post


Link to post
Share on other sites

Ok, so you have mcrypt.

 

Now we need to look again at the module to figure out what's going on. It is not because of any inability to use AES.

Share this post


Link to post
Share on other sites

The problem i'm having is that it's just leaving the order as Pending. How can I find any other details out on why it's not completing the payment?

 

Edit: My returning URL after payment is:

 

index.php?cart_order_id=141007-233451-7808&_a=complete

 

Second Edit:

 

Could this be related to the issue? Upon arriving at Sagepay the URL is:

 

cardselection?vpstxid={92AE6080-A594-3572-B9A0-529E92DD5DE3}

 

Would the curly brackets be playing havock with the processing?

Share this post


Link to post
Share on other sites

"Upon arriving at Sagepay"

 

I would think the braces would not be the cause. But I don't see that phrase in the code. It could mean that once you got to:

live.sagepay.com/gateway/service/vspform-register.vsp

SagePay immediately bounced you to a different page.

 

To know if that happened, you would need to activate the "Developer Tools" of Chrome and watched the traffic going in and out of the browser.

 

Have we looked at the Transaction Logs for any of these recent orders?

Share this post


Link to post
Share on other sites

Yep. The last order before updating had:

 

b1d8******hVXOK   £50.00    SagePay Oct 02 2014, 12:47 PM 0000 : The Authorisation was Successful.

 

The orders since the update:

 

Not Available   £50.00   SagePay   Yesterday, 23:35

Nothing in notes column

Share this post


Link to post
Share on other sites

That tells me the process() function is getting called. That's good.

 

What I would like to see is the Notes column for an order made after making this edit in gateway.class.php, near line 293:

Was:
$transData['notes'] = '';
 
Now:
$transData['notes'] = 'Crypt: '.$_REQUEST['crypt'].'<br>';

We can discover if, in fact, the response starts with an '@'.

Share this post


Link to post
Share on other sites

Getting warmer!

 

If nothing followed "Crypt:" then $_REQUEST['crypt'] does not exist (probably).

 

So, next experiment...

Was:
$transData['notes'] = 'Crypt: '.$_REQUEST['crypt'].'<br>';
 
Now:
$REQ_keys = print_r(array_keys($_REQUEST]), true);
$transData['notes'] = 'SagePay Keys: ' . $REQ_keys . '<br>';

Share this post


Link to post
Share on other sites

SagePay Keys: Array ( [0] => _g [1] => type [2] => cmd [3] => module [4] => cart_order_id [5] => __utma [6] => __utmb [7] => __utmc [8] => __utmz [9] => PHPSESSID [10] => _a )

 

Edit:

 

That seems to come from here?

		$order->logTransaction($transData);
		httpredir(currentPage(array('_g', 'type', 'cmd', 'module'), array('_a' => 'complete')));
		return false;

Line 319ish?

Share this post


Link to post
Share on other sites

Very interesting.

 

The keys are coming from line 219, a piece of data we give to SagePay to inform them of how to contact your store with the results of the transaction.

."&SuccessURL=".$GLOBALS['storeURL'].'/index.php?_g=rm&type=gateway&cmd=process&module=SagePay&cart_order_id='.$this->_basket['cart_order_id']

The __ut* keys are from google, facebook, yahoo, I forget. We can ignore them.

 

There is no other key that SagePay is using to send the results back. (But I wonder where the '_a' is coming from?)

Share this post


Link to post
Share on other sites

I have no idea. They all look like they tie in to the 319 line to me, but I don't really know what I'm looking at. I can't get on to the sagepay site until tomorrow, but would the content of the transactions in sagepay be any help? It has the returning URL along with other bits and bobs.

Share this post


Link to post
Share on other sites

I'm looking at a development kit for SagePay and all I see is the cURL method of access (as opposed to the IPN method).

 

(I am mentioning all this techno-speak for Al's perusal.)

 

But does this SagePay use the IPN method??? That is, is the customer taken to SagePay, or does the customer stay at your site and enter the data in a form (perhaps an iframe)?

Share this post


Link to post
Share on other sites

User goes to sagepay site and makes the payment on sagepay form, then returns to the website. Where it used to say completed and they could download the item.

Share this post


Link to post
Share on other sites

×
×
  • Create New...