mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Disable unused methods from RefundPayment
This commit is contained in:
parent
f34410cdea
commit
f6263fd59e
@ -72,17 +72,15 @@ class RefundPayment
|
|||||||
{
|
{
|
||||||
if ($this->refund_data['gateway_refund'] !== false && $this->total_refund > 0) {
|
if ($this->refund_data['gateway_refund'] !== false && $this->total_refund > 0) {
|
||||||
if ($this->payment->company_gateway) {
|
if ($this->payment->company_gateway) {
|
||||||
$response = $gateway->driver($this->payment->client)->refund($this->payment, $this->total_refund);
|
$response = $this->payment->company_gateway->driver($this->payment->client)->refund($this->payment, $this->total_refund);
|
||||||
|
|
||||||
if ($response['success']) {
|
if ($response['success'] == false) {
|
||||||
throw new PaymentRefundFailed();
|
throw new PaymentRefundFailed();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->payment->refunded += $this->total_refund;
|
$this->payment->refunded += $this->total_refund;
|
||||||
|
|
||||||
$this
|
$this->createActivity($this->payment);
|
||||||
->createActivity($gateway)
|
|
||||||
->updateCreditNoteBalance();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->payment->refunded += $this->total_refund;
|
$this->payment->refunded += $this->total_refund;
|
||||||
@ -106,7 +104,7 @@ class RefundPayment
|
|||||||
$fields->user_id = $this->payment->user_id;
|
$fields->user_id = $this->payment->user_id;
|
||||||
$fields->company_id = $this->payment->company_id;
|
$fields->company_id = $this->payment->company_id;
|
||||||
$fields->activity_type_id = Activity::REFUNDED_PAYMENT;
|
$fields->activity_type_id = Activity::REFUNDED_PAYMENT;
|
||||||
$fields->credit_id = $this->credit_note->id;
|
// $fields->credit_id = $this->credit_note->id; // TODO
|
||||||
$fields->notes = json_encode($notes);
|
$fields->notes = json_encode($notes);
|
||||||
|
|
||||||
if (isset($this->refund_data['invoices'])) {
|
if (isset($this->refund_data['invoices'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user