Closed khrigo closed 3 years ago
Hello @khrigo,
Thanks for reaching us. Are you using the last version of the SDK ?
As you can see below, you should use UpdateKycDocument in User class to submit the KYC document to validation.
//submit the doc for validation
$KycDocument = new MangoPay\KycDocument();
$KycDocument->Id = $KycDocumentId;
$KycDocument->Status = \MangoPay\KycDocumentStatus::ValidationAsked;
$result3 = $mangoPayApi->Users->UpdateKycDocument($_SESSION["MangoPayDemo"]["UserNatural"], $KycDocument);
More demos about KYC in demos/worflow/
Tell me if it's fix your issue.
Hello @khrigo,
Thanks for reaching us. Are you using the last version of the SDK ?
As you can see below, you should use UpdateKycDocument in User class to submit the KYC document to validation.
//submit the doc for validation $KycDocument = new MangoPay\KycDocument(); $KycDocument->Id = $KycDocumentId; $KycDocument->Status = \MangoPay\KycDocumentStatus::ValidationAsked; $result3 = $mangoPayApi->Users->UpdateKycDocument($_SESSION["MangoPayDemo"]["UserNatural"], $KycDocument);
More demos about KYC in
demos/worflow/
Tell me if it's fix your issue.
Hello @fredericdelordm,
Yes, it is the last version. I just use WordPress plugin and use update_kyc_document
which has:
public function update_kyc_document($userId,$KycDocument){
return $this->mangoPayApi->Users->UpdateKycDocument($userId,$KycDocument);
}
@khrigo
you are using the official plugin : https://fr.wordpress.org/plugins/mangopay-woocommerce/ ? With WC Vendors ?
If yes, you should open a topic in the official forum : https://wordpress.org/support/plugin/mangopay-woocommerce/.
If not, let me know.
@fredericdelordm I have a problem with PHP SDK, not in the plugin, I send you an error.
I have a problem with this part:
return $this->mangoPayApi->Users->UpdateKycDocument($userId,$KycDocument);
I did it as you said:
//submit the doc for validation
$KycDocument = new MangoPay\KycDocument();
$KycDocument->Id = $KycDocumentId;
$KycDocument->Status = \MangoPay\KycDocumentStatus::ValidationAsked;
$result3 = $mangoPayApi->Users->UpdateKycDocument($_SESSION["MangoPayDemo"]["UserNatural"], $KycDocument);
And receive an error The requested resource does not support http method 'PUT'
– REQUESTED, I think a problem not in code.
Our tech team is going to review this and will get back to you soon.
Have a nice day,
Hi @khrigo
`
If you take a look at this, you will find that the first parameter needs to be a string, not an object.
Hi @khrigo
`
- @param string $userId User Id
- @param \MangoPay\KycDocument $kycDocument Document to save
- @return \MangoPay\KycDocument Document returned from API`
If you take a look at this, you will find that the first parameter needs to be a string, not an object.
If you check my request, you can see what user_id is a string.
@fredericdelordm please, open the issue.
@fredericdelordm @SoloJr any news?
Hello @khrigo,
We cannot reproduce your error. The SDK is doing a PUT request as requested by the documentation.
Are you sure this error is coming from the SDK call to update the KYC Document status? Do you have more logs?
Just to be sure. Are you creating the KYC Document correctly (example here) before trying the update?
Regarding your code below, I think you are not creating the document as you should.
$KycDocument = new MangoPay\KycDocument();
$KycDocument->Id = $KycDocumentId;
Hello, guys!
I am trying to update the KYC document like this written in the documentation:
But I am getting this error:
Please, help.