formatting
This commit is contained in:
parent
fb5d166606
commit
5d9fd1482c
@ -41,7 +41,7 @@ class Invoices extends BulkAction
|
||||
$invoices = $this->getSelectedRecords($request);
|
||||
|
||||
foreach ($invoices as $invoice) {
|
||||
event(new PaymentReceived($invoice, []));
|
||||
event(new PaymentReceived($invoice));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ class PaymentReceived
|
||||
*
|
||||
* @param $invoice
|
||||
*/
|
||||
public function __construct($invoice, $request)
|
||||
public function __construct($invoice, $request = [])
|
||||
{
|
||||
$this->invoice = $invoice;
|
||||
$this->request = $request;
|
||||
|
@ -379,7 +379,7 @@ class Invoices extends Controller
|
||||
public function markPaid(Invoice $invoice)
|
||||
{
|
||||
try {
|
||||
event(new \App\Events\Sale\PaymentReceived($invoice, []));
|
||||
event(new \App\Events\Sale\PaymentReceived($invoice));
|
||||
|
||||
$message = trans('invoices.messages.marked_paid');
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace Modules\OfflinePayments\Http\Controllers;
|
||||
|
||||
use App\Abstracts\Http\PaymentController;
|
||||
use \App\Events\Sale\PaymentReceived;
|
||||
use App\Http\Requests\Portal\InvoicePayment as PaymentRequest;
|
||||
use App\Models\Sale\Invoice;
|
||||
use Illuminate\Http\Request;
|
||||
@ -69,7 +70,7 @@ class Payment extends PaymentController
|
||||
public function confirm(Invoice $invoice, Request $request)
|
||||
{
|
||||
try {
|
||||
event(new \App\Events\Sale\PaymentReceived($invoice, $request));
|
||||
event(new PaymentReceived($invoice, $request));
|
||||
|
||||
$message = trans('messages.success.added', ['type' => trans_choice('general.payments', 1)]);
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace Modules\PaypalStandard\Http\Controllers;
|
||||
|
||||
use App\Abstracts\Http\PaymentController;
|
||||
use App\Events\Sale\PaymentReceived;
|
||||
use App\Http\Requests\Portal\InvoicePayment as PaymentRequest;
|
||||
use App\Models\Sale\Invoice;
|
||||
use GuzzleHttp\Client;
|
||||
@ -117,7 +118,7 @@ class Payment extends PaymentController
|
||||
$total_paid_match = ((double) $request['mc_gross'] == $invoice->amount);
|
||||
|
||||
if ($receiver_match && $total_paid_match) {
|
||||
event(new \App\Events\Sale\PaymentReceived($invoice, $request));
|
||||
event(new PaymentReceived($invoice, $request));
|
||||
}
|
||||
|
||||
if (!$receiver_match) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user