0
1
Fork 0
hedera-web-mindshore/rest/tpv/tpv.php

36 lines
680 B
PHP
Raw Normal View History

2016-07-22 20:00:27 +00:00
<?php
2016-08-25 10:47:09 +00:00
class Tpv
2016-07-22 20:00:27 +00:00
{
/**
* Tryes to confirm a transaction with the given params.
2016-12-20 09:32:17 +00:00
*/
2016-07-22 20:00:27 +00:00
static function confirm ($db, $params)
{
if (!(isset ($params['Ds_Amount'])
&& isset ($params['Ds_Order'])
&& isset ($params['Ds_MerchantCode'])
&& isset ($params['Ds_Currency'])
&& isset ($params['Ds_Response'])))
return FALSE;
if (isset ($params['Ds_ErrorCode']))
$error = $params['Ds_ErrorCode'];
else
$error = NULL;
return $db->query (
2016-10-17 12:36:52 +00:00
'CALL transactionConfirm (#, #, #, #, #, #)',
2016-07-22 20:00:27 +00:00
[
$params['Ds_Amount']
,$params['Ds_Order']
,$params['Ds_MerchantCode']
,$params['Ds_Currency']
,$params['Ds_Response']
,$error
]
);
}
}