Permalink
Browse files

Changed behaviour to not delete transactions that failed, but mark th…

…em as cancelled
  • Loading branch information...
1 parent e04101a commit 563f9ed510db719b68e721e711353c48ca620336 @mobiusnz committed Jan 17, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 code/EWayPaymentController.php
@@ -43,7 +43,7 @@ public function submit($request) {
//Allow for lax SSL (the library on the web server seems a bit iffy)
curl_setopt( $ch , CURLOPT_SSL_VERIFYPEER , false );
curl_setopt( $ch , CURLOPT_SSL_VERIFYHOST , false );
-
+
$rawResponse = curl_exec($ch);
$response = simplexml_load_string($rawResponse);
@@ -95,7 +95,8 @@ public function handle_response($request) {
$this->redirect($config->EWay_ReturnPage()->Link($config->EWay_ReturnAction));
} else {
- $this->payment->delete();
+ $this->payment->Status = "Cancelled";
+ $this->payment->write();
$this->redirect($config->EWay_CancelPage()->Link($config->EWay_CancelAction));
}
} else {

0 comments on commit 563f9ed

Please sign in to comment.