I am setting up a symfony2 web application so that upon creating a user, the application should create a profile on authorize.net's Customer Information Management (CIM).
I setup the credentials in parameters.yml:
authorizenet_login_id: MY_ACTUAL_LOGIN_ID
authorizenet_tran_key: MY_ACTUAL_KEY
authorizenet_test_mode: true
This is where I request for a CIM:
public function createUserPaymentProfile(Entity\User $user, $andFlush = true)
{
$paymentProfile = $this->getAuthorizeNetPaymentProfile(
$user->getOriginalCardNumber(),
$user->getExpirationDate()
);
$customerProfile = new \AuthorizeNetCustomer;
$customerProfile->merchantCustomerId = $user->getId();
$customerProfile->email = $user->getEmail();
$customerProfile->paymentProfiles[] = $paymentProfile;
$response = $this->authorizeNetCIM->createCustomerProfile($customerProfile);
if ($response->isOk()) {
$customerProfileId = $response->getCustomerProfileId();
$user->setAuthorizeNetCustomerProfileId($customerProfileId);
$customerPaymentProfileIds = $response->getCustomerPaymentProfileIds();
$customerPaymentProfileId = is_array($customerPaymentProfileIds)
? $customerPaymentProfileIds[0]
: $customerPaymentProfileIds;
$user->setAuthorizeNetCustomerPaymentProfileId($customerPaymentProfileId);
$this->em->persist($user);
if ($andFlush) {
$this->em->flush();
}
}
return $response;
}
However, I don't get any response back in the following line:
$response = $this->authorizeNetCIM->createCustomerProfile($customerProfile);
This is the var_dump of the response:
object(AuthorizeNetCIM_Response)#899 (2) { ["xml"]=> NULL ["response"]=> bool(false) }
UPDATE: I debugged the curl call, and this is the error message I am getting from the curl response: SSL: certificate verification failed (result: 5)