I am trying to create a KYC document and pages using the PHP sdk in a Laravel 7 project.
I can create the document correctly, in fact I am able to see them in the MangoPay dashboard, however, when posting a new page I get the following error:
MangoPay\Libraries\ResponseException: Bad request. the body cannot be empty in file...
This is my code:
// create KYC document
$kyc = new MangoPay\KycDocument();
$kyc->Type = 'IDENTITY_PROOF';
$kycDoc = $this->api->Users->CreateKycDocument($userId, $kyc);
// create KYC page
$kycPage = new MangoPay\KycPage();
$kycPage->File = \Illuminate\Support\Facades\File::get($file);
// $file contains the path to an image saved in the filesystem
// the image exists and if I dump its content, I can see that it is not empty
$this->api->Users->CreateKycPage($userId, $kycDoc->Id, $kycPage);
Hi,
I am trying to create a KYC document and pages using the PHP sdk in a Laravel 7 project.
I can create the
document
correctly, in fact I am able to see them in the MangoPay dashboard, however, when posting a newpage
I get the following error:This is my code:
Am I missing something? Any suggestions?
Thank you!