Setting up Authorize.net on Laravel. The CIM aspect in particular is what I'm working on.
Creating customer profiles and payment profiles works fine, but when it comes to running a test transaction, I get "E00001" When I get the transaction response the error_message field reads: 'Error connecting to AuthorizeNet'
This seems to be a problem on the server side...
I would prefer testing with fake credit cards instead of real ones.
Any thoughts?
Thanks!
Jim
Solved! Go to Solution.
04-04-2014 03:43 PM
Hi,
As Raynor said, the customerProfileIds generated by Authorize.Net are currently 8 digits long. I'd recommend double-checking where you are pulling this data. I see that youa re using "$old_profile->customer_id". This indicates that you may be confusing the merchantCustomerId (assigned by you to the profile) with the customerProfileId (generated by Authorize.Net). Only the customerProfileId can be used to charge the profile.
Thanks,
Joy
04-14-2014 03:59 PM
Here is my code
if($gateway->gateway_type=='authorize')
{
$old_profile=json_decode($donor->authorize_profile);
$transaction = new Transaction();
$transaction->amount = $params['amount'];
$transaction->customerProfileId = $old_profile->customer_id;
$transaction->customerPaymentProfileId = $old_profile->profile_id;
$response= $gateway->createCustomerProfileTransaction("AuthCapture", $transaction);
$transactionResponse = $response->getTransactionResponse();
$response->result= "Error Code : ".$response->xml->messages->message->code ." : " . $response->xml->messages->message->text;
$response->success=$response->isOk();
return $response;
}
04-07-2014 04:16 PM
$transaction = new Transaction();
https://github.com/AuthorizeNet/sdk-php/blob/master/tests/AuthorizeNetCIM_Test.php
$transaction = new AuthorizeNetTransaction;
or are you doing something in Transaction()?
can you see what the whole response xml is?
04-07-2014 04:35 PM
Earlier in my code, I've included the transaction here:
use AuthorizeNet\Common\Type\Transaction;
Here is the dump of the response:
object(AuthorizeNet\Service\Cim\Response)[787] public 'xml'
=>
object(SimpleXMLElement)[791] public 'messages'
=>
object(SimpleXMLElement)[788] public 'resultCode'
=>string'Error'
(length=5) public 'message'
=>
object(SimpleXMLElement)[784] public 'code'
=>string'E00001'
(length=6) public 'text'
=>string'An error occurred during processing. Please try again.'
(length=54) public 'response'
=>string'<?xml version="1.0" encoding="utf-8"?><createCustomerProfileTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Error</resultCode><message><code>E00001</code><text>An error occurred during processing. Please try again.</text></message></messages></createCustomerProfileTransactionResponse>'
(length=429) public 'xpath_xml'
=>
object(SimpleXMLElement)[792] public 'messages'
=>
object(SimpleXMLElement)[780] public 'resultCode'
=>string'Error'
(length=5) public 'message'
=>
object(SimpleXMLElement)[783] public 'code'
=>string'E00001'
(length=6) public 'text'
=>string'An error occurred during processing. Please try again.'
(length=54)
04-08-2014 11:11 AM
It this a live production account?
04-08-2014 12:39 PM
This is running in a sandbox in "live mode"
04-08-2014 12:52 PM
Can you login to the sandbox account and do it on the authorize.net website? just want to make sure it not something on the CIM account.
04-08-2014 01:31 PM
Yes, I can make transactions on the sandbox customer profiles that my app has created.
04-08-2014 02:45 PM
Additionally, this is what I get when I call the getTransactionResponse() function
object(AuthorizeNetAIM_Response)[792] private '_response_array'
=>
array (size=0) empty public 'approved'
=>booleanfalse
public 'declined'
=>null
public 'error'
=>booleantrue
public 'held'
=>null
public 'response_code'
=>null
public 'response_subcode'
=>null
public 'response_reason_code'
=>null
public 'response_reason_text'
=>null
public 'authorization_code'
=>null
public 'avs_response'
=>null
public 'transaction_id'
=>null
public 'invoice_number'
=>null
public 'description'
=>null
public 'amount'
=>null
public 'method'
=>null
public 'transaction_type'
=>null
public 'customer_id'
=>null
public 'first_name'
=>null
public 'last_name'
=>null
public 'company'
=>null
public 'address'
=>null
public 'city'
=>null
public 'state'
=>null
public 'zip_code'
=>null
public 'country'
=>null
public 'phone'
=>null
public 'fax'
=>null
public 'email_address'
=>null
public 'ship_to_first_name'
=>null
public 'ship_to_last_name'
=>null
public 'ship_to_company'
=>null
public 'ship_to_address'
=>null
public 'ship_to_city'
=>null
public 'ship_to_state'
=>null
public 'ship_to_zip_code'
=>null
public 'ship_to_country'
=>null
public 'tax'
=>null
public 'duty'
=>null
public 'freight'
=>null
public 'tax_exempt'
=>null
public 'purchase_order_number'
=>null
public 'md5_hash'
=>null
public 'card_code_response'
=>null
public 'cavv_response'
=>null
public 'account_number'
=>null
public 'card_type'
=>null
public 'split_tender_id'
=>null
public 'requested_amount'
=>null
public 'balance_on_card'
=>null
public 'response'
=>null
public 'error_message'
=>string'Error connecting to AuthorizeNet'
(length=32)
04-08-2014 03:28 PM
Can you log the internet traffic using something like fiddler to see what is getting send?
04-08-2014 04:27 PM