Skip to content

Commit

Permalink
Changed behaviour to not delete transactions that failed, but mark th…
Browse files Browse the repository at this point in the history
…em as cancelled
  • Loading branch information
altwohill committed Jan 17, 2012
1 parent e04101a commit 563f9ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/EWayPaymentController.php
Expand Up @@ -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);

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 563f9ed

Please sign in to comment.