我正在使用Picoss的SMoney软件包,我的代码:
$http = new HttpClient("token","url");
$api = new SMoneyApi($http);
$profile = new \Picoss\SMoney\Entity\Profile();
$profile->setCivility(0);
$profile->setLastName("Doe");
$profile->setFirstName("John");
$profile->setEmail("johndoe@gmail.com");
$profile->setPhoneNumber("000000000");
$user = new \Picoss\SMoney\Entity\User();
$user->setAppUserId(time());
$user->setProfile($profile);
$user->setType(1);
$api->user()->save($user); // works
如何在我的元素上使用此代码来获取所有错误:
$api->user()->getErrors(); // works
我想做:
$api->user()->save($user)->getErrors(); // doesn't works
但我不能,你有解决方案吗?
信息:
https://github.com/picoss/SMoney/blob/master/src/SMoneyError.php
==
解决了:
$d = $api->user();
$apis = $d->save($user);
var_dump($d->getErrors());
由于