1
votes

I am getting an empty array response from authorize.net without any errors.

AuthorizeNetCIM_Response Object ( [xml] => [response] => )

I am using the new php sdk. Here is my code

//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);
3

3 Answers

4
votes

Authorize.net is doing some upgrades to their system. You need to go to the latest SDK of authorize.net on github here and download that. Inside the lib/ssl folder, copy the cert.pem file, and paste it in the sdk inside the same folder lib/ssl. Overwrite the existing certificate file. Thats it. It should start working :)

0
votes

I think you are passing some missing values to create customer profile like :

merchantCustomerId, refId etc.

0
votes

I think , you are not being connected to authorize.net properly . Please update authorize.net sdk .