From 1617be248518b953c647de20b77d729020a62c35 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 5 Jun 2016 20:00:21 +1000 Subject: [PATCH 1/6] refactoring documentAPI --- app/Http/Controllers/DocumentAPIController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DocumentAPIController.php b/app/Http/Controllers/DocumentAPIController.php index a1eef82c703d..e80c0299b03e 100644 --- a/app/Http/Controllers/DocumentAPIController.php +++ b/app/Http/Controllers/DocumentAPIController.php @@ -21,7 +21,10 @@ class DocumentAPIController extends BaseAPIController public function index() { - //stub + $documents = Document::scope()->get(); + + return $this->itemResponse($document); + } public function show(DocumentRequest $request) From 8ff41dfc7ee778b3e9625b1fd917ab727f608fe8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 5 Jun 2016 20:12:21 +1000 Subject: [PATCH 2/6] refactoring documentAPI --- app/Http/Controllers/DocumentAPIController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/DocumentAPIController.php b/app/Http/Controllers/DocumentAPIController.php index e80c0299b03e..ee00bf6e049f 100644 --- a/app/Http/Controllers/DocumentAPIController.php +++ b/app/Http/Controllers/DocumentAPIController.php @@ -23,7 +23,7 @@ class DocumentAPIController extends BaseAPIController { $documents = Document::scope()->get(); - return $this->itemResponse($document); + return $this->itemResponse($documents); } From d5c2fc81bd777f8c51344867a2f919a953f75174 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 5 Jun 2016 20:13:38 +1000 Subject: [PATCH 3/6] refactoring documentAPI --- app/Http/Controllers/DocumentAPIController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/DocumentAPIController.php b/app/Http/Controllers/DocumentAPIController.php index ee00bf6e049f..703209978382 100644 --- a/app/Http/Controllers/DocumentAPIController.php +++ b/app/Http/Controllers/DocumentAPIController.php @@ -23,7 +23,7 @@ class DocumentAPIController extends BaseAPIController { $documents = Document::scope()->get(); - return $this->itemResponse($documents); + return $this->listResponse($documents); } From d27219a6a0b17fa153159ea8f5aca771654c4d58 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 5 Jun 2016 20:15:49 +1000 Subject: [PATCH 4/6] refactoring documentAPI --- app/Http/Controllers/DocumentAPIController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/DocumentAPIController.php b/app/Http/Controllers/DocumentAPIController.php index 703209978382..442b3923ccd2 100644 --- a/app/Http/Controllers/DocumentAPIController.php +++ b/app/Http/Controllers/DocumentAPIController.php @@ -21,7 +21,7 @@ class DocumentAPIController extends BaseAPIController public function index() { - $documents = Document::scope()->get(); + $documents = Document::scope(); return $this->listResponse($documents); From 5eb76df20ec49eba9a03e28ae25b86f5c47ca85d Mon Sep 17 00:00:00 2001 From: Joshua Dwire Date: Sun, 5 Jun 2016 15:06:34 -0400 Subject: [PATCH 5/6] Fix refunds on Stripe --- app/Services/PaymentService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index efa27d945b7a..00f45a561e7d 100644 --- a/app/Services/PaymentService.php +++ b/app/Services/PaymentService.php @@ -1005,7 +1005,7 @@ class PaymentService extends BaseService 'transactionReference' => $payment->transaction_reference, ); - if ($amount != ($payment->amount - $payment->refunded)) { + if ($accountGateway->gateway_id != GATEWAY_WEPAY || $amount != ($payment->amount - $payment->refunded)) { $details['amount'] = $amount; } From 0967ca65e8d1441fd6bf681794bf3d3abd84ae1b Mon Sep 17 00:00:00 2001 From: Joshua Dwire Date: Sun, 5 Jun 2016 15:07:02 -0400 Subject: [PATCH 6/6] Show "Credit Card" instead of "Stripe" as a payment option. --- app/Http/Controllers/ClientPortalController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/ClientPortalController.php b/app/Http/Controllers/ClientPortalController.php index 8d66e18293d1..ba088df49e91 100644 --- a/app/Http/Controllers/ClientPortalController.php +++ b/app/Http/Controllers/ClientPortalController.php @@ -225,6 +225,9 @@ class ClientPortalController extends BaseController foreach(Gateway::$paymentTypes as $type) { + if ($type == PAYMENT_TYPE_STRIPE) { + continue; + } if ($gateway = $account->getGatewayByType($type)) { if ($type == PAYMENT_TYPE_DIRECT_DEBIT) { if ($gateway->gateway_id == GATEWAY_STRIPE) {