Example #1
0
 /**
  * Creates self::$JohnsKycDocument (KycDocument belonging to John) if not created yet
  * @return \MangoPay\KycDocument
  */
 protected function getJohnsKycDocument()
 {
     if (self::$JohnsKycDocument === null) {
         $john = $this->getJohn();
         $kycDocument = new \MangoPay\KycDocument();
         $kycDocument->Status = \MangoPay\KycDocumentStatus::Created;
         $kycDocument->Type = \MangoPay\KycDocumentType::IdentityProof;
         self::$JohnsKycDocument = $this->_api->Users->CreateKycDocument($john->Id, $kycDocument);
     }
     return self::$JohnsKycDocument;
 }