PHP API Library Help with $User

total_historical_amount_cents seems to be properly returned by api while using other libraries, so it doesnt seem to be an api problem.

the function attribute in ResourceIdentifier.php needs to return $pledge->attribute(‘total_historical_amount_cents’) when requested, using factory json api class instantiated as below

$this->resource_item = new \Art4\JsonApiClient\ResourceItem($manager, $parent); in __construct.

Dropping some var_dump to see the input variables and the json api return in __construct may help to see whats going on. Also, if the patron doesnt have any pledge history, that variable may not be returned at all. (Ie, the patron hasnt paid yet).

I’ll look into this, but i have to install the lib in a test environment myself and check it out.

Being too tired and too late here, what i typed above may not be of much help but hopefully will give you some pointers for the time being.

1 Like