Sage Pay Server
#1
Posted 01 September 2009, 12:29
Have installed the new Sage Pay Server contribution (http://www.oscommerce.com/community/contributions,6984) which seems to be working well, but have had a couple of issues with it:-
1. All works fine in test, but when changing the Transaction Server to 'Production' in admin you get redirected to checkout_payment.php with an error message rather than the Sage Pay card input screen.
[indent]Problem seems to lie with the value of MODULE_PAYMENT_SAGE_PAY_SERVER_TRANSACTION_SERVER - The values in the configuration table are Production, Test or Simulator, however line 249 in includes/modules/payment/sage_pay_server.php is looking for a case of 'Live' as the value, not Production.[/indent]
2. With low profile pages, after inputting 3D secure details in both test and live the Sage Pay pages leave the iframe - not a problem if the transaction is successful, but if it fails you get redirected back to the low profile version of the card input screen full page (rather than in the iframe)
[indent]Assume this is an issue with Sage Pay's custom templates, if I switch the custom payment pages off within My Sage Pay this problem doesn't occur. (which seems odd as i've not made any changes to the low profile pages in the custom template) - think i need to check i've got the latest version of the custom templates from Sage Pay.[/indent]
3. Values from order total modules don't seem to be being passed to sage pay, customers are being charged the full amount without any reward point/coupon discounts being taken off.
[indent]Editing checkout_process.php and moving the following lines to before the $payment_modules->before_process(); line seems to solve the problem:-
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
$order_totals = $order_total_modules->process();
Not sure if this is necessarily recommended, but seems to work for me.[/indent]
4. Would be good if the transaction values (VPSTxId, AddressResult, CV2Result etc) we're stored in the database somewhere.
[indent]Made a quick and dirty fix for this, which isn't fully tested, but can pass details on if anybody would find it useful.[/indent]
With those few problems fixed, all seems to be working fine. Great contribution and just what we've been after.
Cheers,
Ross
#2
Posted 01 September 2009, 12:45
Customers are unable to use UK Maestro cards, the following error is shown in My Sage Pay (both test and live)
"Transaction completed but Vendor systems returned INVALID or ERROR in response to notification POST. Transaction CANCELLED by the Vendor. "
Looks like the VPSSignature value returned by Sage Pay in the final part of the transaction doesn't match up with the md5 hash of $sig which is causing an INVALID status being returned to Sage Pay and the transaction being cancelled (even though the transaction seems to have been authorised OK by Sage Pay)
This only seems to be happening on UK Maestro cards, all others seem to be OK.
#3
Posted 01 September 2009, 14:16
Thanks for your feedback!
1. This is a confirmed bug and an updated version of the Sage Pay modules will be pushed out shortly.
2. This could very well be due to an outdated template you are using. It would be great if you could confirm this.
3. This bug was fixed in 2.2 RC1 with the exact solution you have posted :-) We will make a note of this in the documentation.
4. The modules will definitely provide more advanced features in v3.0. It won't be possible for v2.2 as core source code changes are required. This could be taken care of with an add-on though.
5. The problem with the signature is being looked into.
Kind regards,
osCommerce, Sell With Emotion
#4
Posted 01 September 2009, 17:05
The Sage Pay Form, Sage Pay Server, and Sage Pay Direct payment modules have been updated with bugfixes you described above.
http://addons.oscommerce.com/service/sage_pay
The update to Sage Pay Server also fixes the signature issue you were experiencing with Maestro cards. The verification of the CardType value did not include SWITCH which the gateway was returning as this was not mentioned in the API integration documentation. Sage Pay have made a note of this and will make an update to their documentation.
Thanks again for your feedback!
Edited by Harald Ponce de Leon, 01 September 2009, 17:06.
osCommerce, Sell With Emotion
#5
Posted 01 September 2009, 17:57
Version 1.1 seem to be working fine. Thanks for releasing the update so quickly.
I've downloaded the custom templates from the Sage Pay website and have sent unmodified versions back to Sage Pay to upload to our test account. I'll let you know if that solves the iframe issue once they've uploaded them.
Thanks again.
Cheers,
Ross
#6
Posted 01 September 2009, 21:59
Could you message me your vendorname and I will get your custom template added as priority to test this.
Many thanks,
John.
#7
Posted 02 September 2009, 07:23
Have messaged you our vendor details.
Cheers,
Ross
#8
Posted 02 September 2009, 12:26
Point 2 in your original post has now been amended with the custom template packs.
Many thanks,
John.
#9
Posted 03 September 2009, 18:03
Thanks John and Harald for getting these issues sorted out so quickly. Everything seems to be working fine now.
Cheers,
Ross
#10
Posted 16 September 2009, 13:19
Quote
Edited by jonathanbastin, 16 September 2009, 13:21.
#11
Posted 31 October 2009, 08:17
HTTP Status Code: 500
HTTP Status Message: The request was unsuccessful due to an unexpected condition encountered by the server.
Error Code : 5006
Error Description : Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.
Does anybody else see this, can you let me know what the fix is please?
Thanks.
#12
Posted 03 November 2009, 10:28
#13
Posted 12 November 2009, 18:08
am at a loss....
Im not even canceling the transaction, i get to the 3D page and it wont process any further
#14
Posted 13 November 2009, 15:46
tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . (tep_not_null($error) ? '&error=' . $error : '') . '&' . tep_session_name() . '=' . tep_session_id(), 'SSL', false);
or
tep_href_link('ext/modules/payment/sage_pay/redirect.php', 'payment_error=' . $this->code . (tep_not_null($error) ? '&error=' . $error : '') . '&' . tep_session_name() . '=' . tep_session_id(), 'SSL', false);
or
tep_href_link(FILENAME_CHECKOUT_PROCESS, 'check=PROCESS&key=' . md5($sage_pay_server_securitykey) . '&VPSTxId=' . $HTTP_POST_VARS['VPSTxId'] . '&' . tep_session_name() . '=' . tep_session_id(), 'SSL', false);
Might be worth checking in catalog/includes/filenames.php to make sure that FILENAME_CHECKOUT_PAYMENT and FILENAME_CHECKOUT_PROCESS are defined (although can't see why they wouldn't be unless you've got a non-standard checkout module installed)
All the redirection URL's are SSL, so it might be worth checking your SSL settings in catalog/include/configure.php
#15
Posted 14 November 2009, 13:47
#16
Posted 16 November 2009, 20:15
Quote
I do try and answer a simple post when I can just to give something back.
------------------------------------------------
PM me? - I'm not for hire
#17
Posted 17 November 2009, 12:21
Our test site is password protected and I get a similar error until I disable the password protection.
#18
Posted 18 November 2009, 18:11
#19
Posted 19 November 2009, 21:08
#20
Posted 19 November 2009, 21:27
When followed it gives you the login page unless you are logged in which obviously the Sagpay server won't be.
Not sure how to fix this.














