Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

It is time to refund for echeck (business checking).

  • Loading branch information...
commit 7c9696869974693299d9368534bb0e25c8b272f0 1 parent c629a2e
ethem authored
Showing with 7 additions and 4 deletions.
  1. +6 −3 enrol/authorize/locallib.php
  2. +1 −1  enrol/authorize/uploadcsv.php
View
9 enrol/authorize/locallib.php
@@ -335,7 +335,8 @@ function authorize_print_order_details($orderno)
else {
$extra->amount = $amount;
$message = '';
- if (AN_APPROVED == authorize_action($order, $message, $extra, AN_ACTION_CREDIT)) {
+ $success = authorize_action($order, $message, $extra, AN_ACTION_CREDIT);
+ if (AN_APPROVED == $success || AN_REVIEW == $success) {
if (empty($CFG->an_test)) {
if (empty($extra->id)) {
$table->data[] = array("<b><font color=red>$strs->error:</font></b>", 'insert record error');
@@ -593,8 +594,10 @@ function authorize_get_status_action($order)
case AN_STATUS_AUTHCAPTURE:
if (authorize_settled($order)) {
- if ($order->paymentmethod == AN_METHOD_CC && $canmanage) {
- $ret->actions = array(ORDER_REFUND);
+ if ($canmanage) {
+ if (($order->paymentmethod == AN_METHOD_CC) || ($order->paymentmethod == AN_METHOD_ECHECK && !empty($order->refundinfo))) {
+ $ret->actions = array(ORDER_REFUND);
+ }
}
$ret->status = 'settled';
}
View
2  enrol/authorize/uploadcsv.php
@@ -136,8 +136,8 @@ function authorize_process_csv($filename)
else {
$ignored++;
$ignoredlines .= $reftransid . ": Not our business, in refunds\n";
- continue;
}
+ continue;
}
if (! ($transstatus == 'Settled Successfully' && $transtype == 'Authorization w/ Auto Capture')) {
Please sign in to comment.
Something went wrong with that request. Please try again.