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
array (size=4) 'gateway'
Here is a dump of all the information
=>
object(AuthorizeNetCIM)[795] private '_xml'
=>
object(SimpleXMLElement)[788] public 'merchantAuthentication'
=>
object(SimpleXMLElement)[774] public 'name'
=>string'3U9x4bspGPY'
(length=11) public 'transactionKey'
=>string'xxxxxx'
(length=16) public 'transaction'
=>
object(SimpleXMLElement)[797] public 'profileTransAuthCapture'
=>
object(SimpleXMLElement)[799] public 'amount'
=>string'27.15'
(length=5) public 'customerProfileId'
=>string'139715222637'
(length=12) public 'customerPaymentProfileId'
=>string'25369882'
(length=8) public 'extraOptions'
=>
object(SimpleXMLElement)[798] private '_refId'
=>booleanfalse
private '_validationMode'
=>string'none'
(length=4) private '_extraOptions'
=>booleanfalse
private '_transactionTypes'
=>
array (size=6) 0
=>string'AuthOnly'
(length=8) 1
=>string'AuthCapture'
(length=11) 2
=>string'CaptureOnly'
(length=11) 3
=>string'PriorAuthCapture'
(length=16) 4
=>string'Refund'
(length=6) 5
=>string'Void'
(length=4) protected '_api_login'
=>string'3U9x4bspGPY'
(length=11) protected '_transaction_key'
=>string'xxxxxx'
(length=16) protected '_post_string'
=>string'<?xml version="1.0" encoding="utf-8"?> <createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><merchantAuthentication><name>3U9x4bspGPY</name><transactionKey>XXXXXXXXX</transactionKey></merchantAuthentication><transaction><profileTransAuthCapture><amount>27.15</amount><customerProfileId>139715222637</customerProfileId><customerPaymentProfileId>25369882</customerPaymentProfileId></profileTransAuthCapture></transaction><extraOptions><![CDATA[x_encap_char=|]]></extraOptions></createCustomerProfileTransactionRequest> '
(length=560) public 'VERIFY_PEER'
=>booleantrue
protected '_sandbox'
=>booleantrue
protected '_log_file'
=>booleanfalse
public 'gateway_type'
=>string'authorize'
(length=9) 'transaction'
=>
object(AuthorizeNetTransaction)[792] public 'amount'
=>string'27.15'
(length=5) public 'tax'
=>
object(stdClass)[791] public 'amount'
=>string''
(length=0) public 'name'
=>string''
(length=0) public 'description'
=>string''
(length=0) public 'shipping'
=>
object(stdClass)[789] public 'amount'
=>string''
(length=0) public 'name'
=>string''
(length=0) public 'description'
=>string''
(length=0) public 'duty'
=>
object(stdClass)[784] public 'amount'
=>string''
(length=0) public 'name'
=>string''
(length=0) public 'description'
=>string''
(length=0) public 'lineItems'
=>
array (size=0) empty public 'customerProfileId'
=>string'139715222637'
(length=12) public 'customerPaymentProfileId'
=>string'25369882'
(length=8) public 'customerShippingAddressId'
=>null
public 'creditCardNumberMasked'
=>null
public 'bankRoutingNumberMasked'
=>null
public 'bankAccountNumberMasked'
=>null
public 'order'
=>
object(stdClass)[793] public 'invoiceNumber'
=>string''
(length=0) public 'description'
=>string''
(length=0) public 'purchaseOrderNumber'
=>string''
(length=0) public 'taxExempt'
=>null
public 'recurringBilling'
=>null
public 'cardCode'
=>null
public 'splitTenderId'
=>null
public 'approvalCode'
=>null
public 'transId'
=>null
'response'
=>
object(AuthorizeNetCIM_Response)[782] public 'xml'
=>
object(SimpleXMLElement)[787] public 'messages'
=>
object(SimpleXMLElement)[800] public 'resultCode'
=>string'Error'
(length=5) public 'message'
=>
object(SimpleXMLElement)[801] 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)[796] public 'messages'
=>
object(SimpleXMLElement)[802] public 'resultCode'
=>string'Error'
(length=5) public 'message'
=>
object(SimpleXMLElement)[803] public 'code'
=>string'E00001'
(length=6) public 'text'
=>string'An error occurred during processing. Please try again.'
(length=54) 'TransactionResponse'
=>
object(AuthorizeNetAIM_Response)[786] 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-10-2014 10:57 AM - last edited on 04-15-2014 08:59 AM by Joy
I think you found a bug on authorize.net, the customerprofileid is wrong, I just created one and it is 8 digits and your is 12 digits.
04-10-2014 01:15 PM
Hello
I'll have an integration support team member look at this thread.
I'd recommend subscribing to this topic so that you'll be alerted via email if there are updates. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies to your post.
Thanks,
Richard
04-10-2014 02:06 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
Hello Joy,
Problem solved!
I didn't realize that there are actually three separate Id's being used by Authorize.net CIM
1. Customer Profile ID
2. Customer Payment Profile ID
3. Merchant Customer ID
I had mistakenly used the Merchant Id (created by me, the merchant) as the Payment Profile ID.
The CIM testing documentation didn't mention much about this function:
$response->getCustomerPaymentProfileIds()
Which is what I needed to get the Customer Payment Profile Id.
Thanks for your help in resolving this problem!
Jim
04-21-2014 05:59 PM