From 7d2f635272f078441f682248c4548907d4696edb Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 7 Feb 2016 19:39:51 +1100 Subject: [PATCH] testing payment api --- app/Http/Controllers/PaymentApiController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/PaymentApiController.php b/app/Http/Controllers/PaymentApiController.php index 33aad548f85b..3a9a5bd5635b 100644 --- a/app/Http/Controllers/PaymentApiController.php +++ b/app/Http/Controllers/PaymentApiController.php @@ -156,13 +156,15 @@ class PaymentApiController extends BaseAPIController $this->contactMailer->sendPaymentConfirmation($payment); } - Log::info($payment); /* $payment = Payment::scope($payment->public_id)->with('client', 'contact', 'user', 'invoice')->first(); $transformer = new PaymentTransformer(Auth::user()->account, Input::get('serializer')); $data = $this->createItem($payment, $transformer, 'payment'); */ - $invoice = Invoice::scope($payment->invoice_id)->with('client', 'invoice_items', 'invitations')->first(); + $invoice = Invoice::scope($invoice->public_id)->with('client', 'invoice_items', 'invitations')->first(); + + + $transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer')); $data = $this->createItem($invoice, $transformer, 'invoice');