Hello again,
I'm currently testing Spagepayserver on a Sagepay simulation account, so I'm not sure if this applies to the test and live environments as well. However, on the simulator pages, there is the option to simulate an error, NOTAUTH for example. If I do this, eventually I'm to the returned to the "Review your order" page, with no hint that an error has occurred. It would be nice to come back to somewhere else, or with some text on the page acknowledging there had been an error. Am I missing something, do I have to catch these errors myself, or could this be added to the module?
Many thanks
Colin
Comments
Comment #1
leo pitt commentedYou are right, NOTAUTH should redirect to a page with a error message on it for the customer.
I will work on adding this ...
Comment #2
christoph commentedHi:
This would be great. If there is some way to return messages for each of the cases 'Notauthed', 'Abort', 'Rejected' and possibly false VPS signature (although not sure would want an end user to see that), it would be really useful.
Drop us a line if you need any help. Had a look through the module and looks really good. Thanks.
Comment #3
leo pitt commentedThanks. This should be resolved in the next development release. I'll post here when that's been submitted.
Comment #4
leo pitt commentedPlease could you download the development version when it has been rebuilt, tomorrow, and verify that this issue has been resolved?
Thanks
Comment #5
christoph commentedI have tested a transaction on Sagepay Simulator (sorry no access to live test at moment). These are my findings:-
NOTAUTHED response. Works perfectly. Error message is 'The bank declined your card details. Please check your details and try again. If the problem persists, contact your bank.' and the redirect URL is /cart/checkout/review?uc_sagepayserver_error=notauthed.
ABORT, REJECTED, ERROR response. As of yet no error message. I'm not really familiar enough with Sagepay to know how often these arise vs. NOTAUTHED - but their blurb in the Simulator suggest that 'rejected' (when the AVS, CVS, 3-D rulebases reject a transaction) and the 'abort' (timeout), may happen occasionally. It would be nice if these also had an error message. I tried this inside the module and it seems to work.
uc_sagepayserver.module - inserted after line 15:
case 'abort':
drupal_set_message(t('The transaction timed out or could not be processed. Please try again.'), 'error');
break;
case 'rejected':
drupal_set_message(t('The bank declined your card details. Please check your details and try again. If the problem persists, contact your bank.'), 'error');
break;
uc_sagepayserver.pages.inc -
replaced line 309: $data['RedirectURL'] = url('cart/checkout/review', array('absolute' => TRUE));
with: $data['RedirectURL'] = url('cart/checkout/review', array('absolute' => TRUE, 'query' => 'uc_sagepayserver_error=abort'));
replaced line 322: $data['RedirectURL'] = url('cart/checkout/review', array('absolute' => TRUE));
with: $data['RedirectURL'] = url('cart/checkout/review', array('absolute' => TRUE, 'query' => 'uc_sagepayserver_error=rejected'));
Thanks again for all you're doing on this stuff. Really helpful.
Comment #6
leo pitt commentedHi,
Agreed, apart from the ABORT message - according to the Sagepay documents I have the ABORT message is sent if the user cancels the transaction ...
Comment #7
leo pitt commentedI have added some messages to the order review page in the event of ERROR or REJECTED response. I didn't do one for ABORT, because the user should come to this page having clicked on the "Cancel" button withing Sagepay's screens - in which case I figure no explanation is necessary .... agree / disagree?
Works as expected here.
This change should come through in the next development build tonight - I'll give it a couple of days and then put this into a new recomended release if there's no more posts here.
Thanks
Comment #8
christoph commentedYes - makes sense to me. Appreciate the work on this - has been very helpful.
Comment #9
leo pitt commentedGreat - fixed in 6.x-1.4.