From d25cb36792cd0abff46cc715053c925790e33ee3 Mon Sep 17 00:00:00 2001 From: Christian Anger Date: Sun, 13 Jul 2014 17:30:58 +0200 Subject: [PATCH 1/4] Added support for getting a single transaction via /rest/accounts//transactions/ --- figo/Session.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/figo/Session.php b/figo/Session.php index 4781359..039586a 100644 --- a/figo/Session.php +++ b/figo/Session.php @@ -114,6 +114,18 @@ public function get_transactions($since = null, $start_id = null, $count = 1000, return $transactions; } + /** + * Request a single transaction + * + * @param string account ID + * @param string transaction ID + * @return Transaction transaction object + */ + public function get_transaction($account_id, $transation_id) { + $response = $this->query_api("/rest/accounts/".$account_id."/transactions/".$transation_id); + return (is_null($response) ? null : new Transaction($this, $response)); + } + /** * Request the URL a user should open in the web browser to start the synchronization process * From 3524ff0424d311ce184ecf1fea4c9b5746d4ed94 Mon Sep 17 00:00:00 2001 From: Christian Anger Date: Wed, 18 Mar 2015 15:08:41 +0100 Subject: [PATCH 2/4] Bugfix for https://github.com/figo-connect/php-figo/issues/8 --- figo/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/figo/Session.php b/figo/Session.php index ebe7e78..f7e194d 100644 --- a/figo/Session.php +++ b/figo/Session.php @@ -413,7 +413,7 @@ public function submit_payment($payment, $tan_scheme_id, $state, $redirect_uri=n $data['redirect_uri'] = $redirect_uri; } - $response = $this->query_uri("/rest/accounts/".$payment->account_id."/payments/".$payment->payment_id."/submit", $data, "POST"); + $response = $this->query_api("/rest/accounts/".$payment->account_id."/payments/".$payment->payment_id."/submit", $data, "POST"); if (is_null($response)) { return null; } else { From b06bd7613cb53c5e526d866b27c0566888ee69a4 Mon Sep 17 00:00:00 2001 From: Christian Anger Date: Wed, 18 Mar 2015 15:16:10 +0100 Subject: [PATCH 3/4] Removing double function --- figo/Session.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/figo/Session.php b/figo/Session.php index f7e194d..60c6e88 100644 --- a/figo/Session.php +++ b/figo/Session.php @@ -192,18 +192,6 @@ public function get_transactions($account_id = null, $since = null, $count = 100 return $result; } - /** - * Retrieve a specific transaction - * - * @param string ID of the account on which the transaction occured - * @param string ID of the transaction to be retrieved - * @return Transaction a `Transaction` object representing the transaction to be retrieved - */ - public function get_transaction($account_id, $transaction_id) { - $response = $this->query_api("/rest/accounts/".$account_id."/transactions/".$transaction_id); - return (is_null($response) ? null : new Transaction($this, $response)); - } - /** * Retrieve a specific bank * From 7418d4f2b5209689605ce7ade5a02dc7b7ff2482 Mon Sep 17 00:00:00 2001 From: Christian Anger Date: Wed, 18 Mar 2015 15:18:01 +0100 Subject: [PATCH 4/4] Removing double function --- figo/Session.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/figo/Session.php b/figo/Session.php index 60c6e88..0d46f67 100644 --- a/figo/Session.php +++ b/figo/Session.php @@ -192,6 +192,18 @@ public function get_transactions($account_id = null, $since = null, $count = 100 return $result; } + /** + * Retrieve a specific transaction + * + * @param string ID of the account on which the transaction occured + * @param string ID of the transaction to be retrieved + * @return Transaction a `Transaction` object representing the transaction to be retrieved + */ + public function get_transaction($account_id, $transaction_id) { + $response = $this->query_api("/rest/accounts/".$account_id."/transactions/".$transaction_id); + return (is_null($response) ? null : new Transaction($this, $response)); + } + /** * Retrieve a specific bank * @@ -227,18 +239,6 @@ public function remove_bank_pin($bank_or_id) { } } - /** - * Request a single transaction - * - * @param string account ID - * @param string transaction ID - * @return Transaction transaction object - */ - public function get_transaction($account_id, $transation_id) { - $response = $this->query_api("/rest/accounts/".$account_id."/transactions/".$transation_id); - return (is_null($response) ? null : new Transaction($this, $response)); - } - /** * Request the URL a user should open in the web browser to start the synchronization process *