Skip to content

Commit 79bb742

Browse files
committed
update date
1 parent c3cb5b0 commit 79bb742

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
examples/index.php
2-
composer.phar
2+
composer.phar

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"description": "A PHP API for interacting with Ripple",
44
"license": "MIT",
55
"type": "library",
6+
"version": "1.0",
67
"support": {
78
"issues": "https://github.com/iexbase/ripple-api/issues",
89
"source": "https://github.com/iexbase/ripple-api"
@@ -23,7 +24,8 @@
2324

2425
"require": {
2526
"php": "^7.1",
26-
"guzzlehttp/guzzle": "^6.3"
27+
"guzzlehttp/guzzle": "^6.3",
28+
"symfony/var-dumper": "^4.1"
2729
},
2830

2931
"require-dev": {

src/Ripple.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ public function getAccountBalances($address = null, $params = []) : array
129129
*
130130
* @param null $address
131131
* @param array $params
132-
* @return PaymentObject
132+
* @return PaymentObject | array
133133
*/
134-
public function getAccountPayments($address = null, $params = []) : PaymentObject
134+
public function getAccountPayments($address = null, $params = [])
135135
{
136136
$address = ($address == null ? $this->address : $address);
137137
$response = $this->call('GET', sprintf('/accounts/%s/payments', $address), $params);
@@ -216,11 +216,15 @@ public function getAccountValueStat($address = null, $params = [])
216216
*
217217
* @param null $hash
218218
* @param array $params
219-
* @return TransactionObject
219+
* @return TransactionObject | array
220220
*/
221221
public function getTransaction($hash = null, $params = [])
222222
{
223223
$response = $this->call('GET', '/transactions/'.$hash, $params);
224+
225+
if(isset($response['count']) and $response['count'] > 1) {
226+
return $response['transactions'];
227+
}
224228
return new TransactionObject($response['transaction']);
225229
}
226230

0 commit comments

Comments
 (0)