-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
Description
I was about to implement the currency cloud API and after some debugging I realised, if I call the
$this->client->beneficiaries()->find($beneficiary, null, $payout->getOnBehalfOf()); function, the find method doesn't consider the on_behalf_of value (3rd argument). It always searches in the main account, not in the sub account.
After I changed the following line, it worked, but I'm not sure if it would create some error in other places:
AbstractEntityEntryPoint::doFind function
from this
$response = $this->request(
'GET',
$entryPoint,
call_user_func($converterToRequest, $searchModel, $onBehalfOf) + $this->convertPaginationToRequest(
$pagination
)
);
to this
$response = $this->request(
'GET',
$entryPoint,
call_user_func($converterToRequest, $searchModel, $onBehalfOf) + $this->convertPaginationToRequest(
$pagination
) + [
'on_behalf_of' => $onBehalfOf
]
);
Creating a beneficiary on behalf of functions.
Could you please check this issue, for the time being, I will add a custom request to our code.