Skip to content

Commit

Permalink
Merge pull request #82 from amasok/feature/publicRawData
Browse files Browse the repository at this point in the history
Added getter for itunes response raw data. resolved #80
  • Loading branch information
aporat authored Nov 7, 2018
2 parents 5e163c6 + d78fd20 commit e3e89e5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ extras/documentation

/.idea/
composer-setup.php

*.swp
10 changes: 10 additions & 0 deletions src/iTunes/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,16 @@ public function getPendingRenewalInfo()
return $this->pending_renewal_info;
}

/**
* Get the raw data
*
* @return array
*/
public function getRawData()
{
return $this->raw_data;
}

/**
* returns if the receipt is valid or not
*
Expand Down
5 changes: 5 additions & 0 deletions tests/iTunes/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,10 @@ public function testReceiptWithLatestReceiptInfo(): void
$response->getLatestReceiptInfo()[0]->getTransactionId()
);

$this->assertEquals(
$jsonResponseArray,
$response->getRawData()
);

}
}

0 comments on commit e3e89e5

Please sign in to comment.