Permalink
Browse files

fix xml parsing in transaction list & detail

  • Loading branch information...
1 parent 9c4fd97 commit c04c2b25f2d49d16b5ae55956f2f9c432973b741 @joshuafarr joshuafarr committed May 3, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 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);

0 comments on commit c04c2b2

Please sign in to comment.