我从authorize.net得到一个空数组响应,没有任何错误。
AuthorizeNetCIM_Response对象([xml]=>[Response]=>)
我正在使用新的php-sdk。这是我的代码
//authorizenet configuration
define("AUTHORIZENET_API_LOGIN_ID",'');
define("AUTHORIZENET_TRANSACTION_KEY",'');
define("AUTHORIZENET_SANDBOX",true);
//Create new customer profile
$request = new AuthorizeNetCIM;
$customerProfile = new AuthorizeNetCustomer;
$customerProfile->description = "Bar Express Customer";
$customerProfile->email = "a97eehdhd@gmail.com";
$response =$request->createCustomerProfile($customerProfile);
if ($response->isOk()) {
$customerProfileId = $response->getCustomerProfileId();
}
echo print_r($response);
我认为您正在传递一些缺失的值来创建客户档案,例如:
merchantCustomerId、refId等
我认为,您没有正确连接到authorize.net。请更新authorize.net sdk。