Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix xml parsing in transaction list & detail

  • Loading branch information...
commit c04c2b25f2d49d16b5ae55956f2f9c432973b741 1 parent 9c4fd97
@joshuafarr joshuafarr authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/FirstGivingAPIClient.php
View
6 src/FirstGivingAPIClient.php
@@ -151,8 +151,8 @@ public function getTransactionList($page = NULL, $pageSize = NULL, $dateFrom = N
return $xmlObject->firstGivingResponse->row_count;
}
$transactions = array();
- foreach ($xmlObject->firstGivingResponse->transactions as $transaction) {
- $transactions[] = (string) $transaction->transaction_number;
+ foreach ($xmlObject->firstGivingResponse->transactions->transactionId as $transactionId) {
+ $transactions[] = (string) $transactionId;
}
return $transactions;
}
@@ -172,7 +172,7 @@ public function getTransactionDetail($transactionId) {
);
$xmlObject = simplexml_load_string($restRequestObject->getResponseBody());
- $r = $xmlObject->firstGivingResponse;
+ $r = $xmlObject->firstGivingResponse->transaction;
$respObj = new FirstGivingTransactionDetailResponse();
$respObj->setAmount((string) $r->amount);
Please sign in to comment.
Something went wrong with that request. Please try again.