From 21d23a9691adbc4788dd35363beef0ecc8803a29 Mon Sep 17 00:00:00 2001 From: Freerk Minnema Date: Tue, 14 Apr 2020 10:46:00 +0200 Subject: [PATCH] Now possible to pass $order as object to the function(s). --- Mplusqapiclient.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Mplusqapiclient.php b/Mplusqapiclient.php index 87d301c..b7eacdf 100755 --- a/Mplusqapiclient.php +++ b/Mplusqapiclient.php @@ -8494,6 +8494,14 @@ public function convertCreateOrderV2Request($order, $applySalesAndActions, $appl public function convertOrder($order, $terminal=null, $as_array=false) { + if (is_object($order)) { + if (property_exists($order, 'order')) { + return $order; + } + $wrapper = new stdClass(); + $wrapper->order = $order; + return $wrapper; + } if ( ! isset($order['orderId']) or is_null($order['orderId'])) { $order['orderId'] = ''; }