MONGOPAY 400创建实体时请求错误

时间:2018-12-16 10:19:35

标签: javascript php html

当我使用

创建实体(用户,卡注册...等)时
$('[name="search_box"]').typeahead(null,{
            source:search_data,
            templates:{
                suggestion: Handlebars.compile('<li>{{username}}</li>'),
            },

        });

我收到此错误,但我不知道为什么:

require_once '/vendor/autoload.php';

use Mongopay\MongoPayApi;

$api = new MangoPay\MangoPayApi();

// configuration
$api->Config->ClientId = ********;
$api->Config->ClientPassword = *******;
$api->Config->TemporaryFolder = '../tmp';


try {
  $UserNatural = new \MangoPay\UserNatural();
  $UserNatural->FirstName = "Joe";
  $UserNatural->LastName = "Blogs";
  $UserNatural->Address = new \MangoPay\Address();
  $UserNatural->Address->AddressLine1 = "1 Mangopay Street";
  $UserNatural->Address->AddressLine2 = "The Loop";
  $UserNatural->Address->City = "Paris";
  $UserNatural->Address->Region = "Ile de France";
  $UserNatural->Address->PostalCode = "75001";
  $UserNatural->Address->Country = "FR";
  $UserNatural->Birthday = 1463496101;
  $UserNatural->Nationality = "GB";
  $UserNatural->CountryOfResidence = "FR";
  $UserNatural->Occupation = "Carpenter";
  $UserNatural->IncomeRange = 2;
  $UserNatural->Email = "support@mangopay.com";
  $createdUser = $api->Users->Create($UserNatural); //ERROR HAPPENED WHEN I USE THIS FONCTION !

  } catch(MangoPay\Libraries\ResponseException $e) {
    echo $e->GetCode();
    echo $e->GetMessage();
  print_r($e->GetErrorDetails());
  } catch(MangoPay\Libraries\Exception $e) {
    echo $e->GetMessage();
}

我没有修改此错误消息中提到的任何文件。您可以在这里找到它们:https://github.com/Mangopay/mangopay2-php-sdk/tree/master/MangoPay

0 个答案:

没有答案