From 7f4f1e440e8ba61bb646aa4c064459b9072f8734 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Sun, 17 Jun 2018 14:01:45 +0800 Subject: [PATCH] Add mode of payment field for request jo api call #146 --- src/Controller/APIController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Controller/APIController.php b/src/Controller/APIController.php index 102b3251..f7171fd5 100644 --- a/src/Controller/APIController.php +++ b/src/Controller/APIController.php @@ -737,6 +737,7 @@ class APIController extends Controller 'long', 'lat', 'warranty', + 'mode_of_payment', ]; $em = $this->getDoctrine()->getManager(); $res = $this->checkParamsAndKey($req, $em, $required_params); @@ -749,7 +750,9 @@ class APIController extends Controller ->setDeliveryInstructions('') ->setTier1Notes('') ->setTier2Notes('') - ->setDeliveryAddress('Set by mobile application'); + ->setDeliveryAddress('Set by mobile application') + // TODO: error check for valid mode of payment + ->setModeOfPayment($req->request->get('mode_of_payment')); // customer $cust = $this->session->getCustomer();