Skip to content

Commit

Permalink
Merge pull request #10 from dzung2t/master
Browse files Browse the repository at this point in the history
Update log transaction messages
  • Loading branch information
Roman Sevastyanov committed Oct 2, 2015
2 parents cf27670 + d909458 commit 61cf7a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
3 changes: 3 additions & 0 deletions src/brickccform.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,16 @@
if ($charge->isSuccessful()) {
if ($charge->isCaptured()) {
addInvoicePayment($_POST["invoiceid"], $charge->getId(), null, null, 'brick');
logTransaction($gateway["name"], $cardInfo, "Successful");
} elseif ($charge->isUnderReview()) {
// decide on risk charge
logTransaction($gateway["name"], $cardInfo, "Unsuccessful");
}
$smartyvalues["success"] = true;
} else {
$error = json_decode($response, true);
$smartyvalues["processingerror"] = '<li>' . $error['error']['message'] . '</li>';
logTransaction($gateway["name"], $cardInfo, "Unsuccessful");
}

}
Expand Down
13 changes: 4 additions & 9 deletions src/modules/gateways/callback/paymentwall.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
if ($pingback->isDeliverable()) {

addInvoicePayment($invoiceid, $pingback->getReferenceId(), null, null, 'paymentwall');
logTransaction($gateway["name"], $_GET, "Successful");

// Check enable delivery request
if (isset($gateway['enableDeliveryApi']) && $gateway['enableDeliveryApi'] != '') {
Expand Down Expand Up @@ -88,23 +89,17 @@

}
} elseif ($pingback->isCancelable()) {
$cancelStatus = mysql_fetch_assoc(select_query("tblorderstatuses", "title", array("showcancelled" => 1)));
// Update payment status
localAPI('updateinvoice', array(
'invoiceid' => $invoiceid,
'status' => $cancelStatus['title']
), 'admin');
logTransaction($gateway["name"], $_GET, "Not Supported");
}
echo 'OK';
} else {
echo $pingback->getErrorSummary();
logTransaction($gateway["name"], $_GET, "Unsuccessful");
}
die();

function send_delivery($data)
{
$delivery = new Paymentwall_GenerericApiObject('delivery');
$response = $delivery->post($data);
}

logTransaction($gateway["name"], $_GET, "");
die;

0 comments on commit 61cf7a8

Please sign in to comment.