Snippets

EasyPaymentGateway Pre auth service response in php

Created by Ruben Fernandez last modified
<?php
$preAuthParams = json_decode(stripslashes($_POST['preAuthParams']),true);
$amount = $preAuthParams['amount'];
$response = array();
if($amount >100){
 $response['status'] = "SUCCESS";
 $response['statusMessage'] = "OK";
 $response['transactionId'] = $preAuthParams['transactionId'];
} else{
 $response['status'] = "ERROR";
 $response['statusMessage'] = "NOK";
 $response['transactionId'] = $preAuthParams['transactionId'];
}
echo json_encode($response);
?>

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.