From 4930a7890ce19271c0ef76e806577efb1a4a976d Mon Sep 17 00:00:00 2001 From: mordyg <33332700+mordyg@users.noreply.github.com> Date: Thu, 2 Nov 2017 17:36:58 -0400 Subject: [PATCH] Endpoint does return card code See here, it definitely does return the code now, the code is backwards compatible if not comparing using "===true" https://dev.na.bambora.com/docs/references/payment_APIs/v1-0-4/ --- src/Beanstream/api/Profiles.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Beanstream/api/Profiles.php b/src/Beanstream/api/Profiles.php index 0853777..ffff375 100644 --- a/src/Beanstream/api/Profiles.php +++ b/src/Beanstream/api/Profiles.php @@ -155,11 +155,7 @@ public function addCard($profile_id, $data) //process as is $result = $this->_connector->processTransaction('POST', $endpoint, $data); - /* - * XXX it would be more appropriate to return newly added card_id, - * but API does not return it in result - */ - return TRUE; + return $result['code']; } /** @@ -202,4 +198,4 @@ public function deleteCard($profile_id, $card_id) { return TRUE; } -} \ No newline at end of file +}