ProcessRequestToGateway($secret,$testAccount,$gateway); if($response->IsError()) { echo 'AN ERROR OCCURED, Card details not deleted. Error details: ' . $response->ErrorString(); } else { $expectedResponseHash = md5($terminalId.$response->MerchantReference().$response->DateTime().$secret); if($expectedResponseHash != $response->Hash()) { echo 'SECURECARD DELETION FAILED: INVALID RESPONSE HASH. Please contact ' . $adminEmail . ' or call ' . $adminPhone . ' to clarify if your card details were updated.'; $merchantRef = $response->MerchantReference(); if(isset($merchantRef)) { echo 'Please quote %Gateway Terminal ID: ' . $terminalId . ', and SecureCard Merchant Reference: ' . $response->MerchantReference() . ' when mailling or calling.'; } } else { echo "SecureCard successfully deleted."; } } ?>