Example #1
0
 /**
  * Creates self::$Matrix (test legal user) if not created yet
  * @return \MangoPay\UserLegal
  */
 protected function getMatrix()
 {
     if (self::$Matrix === null) {
         $john = $this->getJohn();
         $user = new \MangoPay\UserLegal();
         $user->Name = "MartixSampleOrg";
         $user->Email = "*****@*****.**";
         $user->LegalPersonType = "BUSINESS";
         $user->HeadquartersAddress = $this->getNewAddress();
         $user->LegalRepresentativeFirstName = $john->FirstName;
         $user->LegalRepresentativeLastName = $john->LastName;
         $user->LegalRepresentativeAddress = $john->Address;
         $user->LegalRepresentativeEmail = $john->Email;
         $user->LegalRepresentativeBirthday = $john->Birthday;
         $user->LegalRepresentativeNationality = $john->Nationality;
         $user->LegalRepresentativeCountryOfResidence = $john->CountryOfResidence;
         self::$Matrix = $this->_api->Users->Create($user);
     }
     return self::$Matrix;
 }