Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluepay Redirect payment getting wrong totals #3338

Closed
beechyrb opened this issue Sep 13, 2015 · 1 comment
Closed

Bluepay Redirect payment getting wrong totals #3338

beechyrb opened this issue Sep 13, 2015 · 1 comment

Comments

@beechyrb
Copy link
Contributor

Bluepay Redirect payment method getting wrong totals from transactions table for (total released)
There is no need to get (auth) type transactions for the total amount released as this shows as it was released when it really wasn't and prevents from (release) function from actually working.

File: admin/model/payment/bluepay_redirect.php - line 182

CHANGE
public function getTotalReleased($bluepay_redirect_order_id) {
$query = $this->db->query("SELECT SUM(amount) AS total FROM " . DB_PREFIX . "bluepay_redirect_order_transaction WHERE bluepay_redirect_order_id = '" . (int)$bluepay_redirect_order_id . "' AND (type = 'sale' OR type = 'rebate' OR type = 'auth')");

    return (float)$query->row['total'];
}

TO:
public function getTotalReleased($bluepay_redirect_order_id) {
$query = $this->db->query("SELECT SUM(amount) AS total FROM " . DB_PREFIX . "bluepay_redirect_order_transaction WHERE bluepay_redirect_order_id = '" . (int)$bluepay_redirect_order_id . "' AND (type = 'sale' OR type = 'rebate')");

    return (float)$query->row['total'];
}
@jamesallsup
Copy link
Contributor

Fixed on commit: 56361d4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants