Forums / Addon Payment Modules / Authorize.net API with Card on File transactions support thread...

Authorize.net API with Card on File transactions support thread...

Results 1 to 20 of 199
27 Apr 2020, 14:40
#1
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Authorize.net API with Card on File transactions support thread...

this is the support thread for the authorize.net API with card on file transactions that can be downloaded here:

https://www.zen-cart.com/downloads.php?do=file&id=2272

it has been tested to run with v156. please post any questions along with your ZC version number and php version.
27 Apr 2020, 17:44
#2
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

Just attempted to unzip the download. Windows is grumpy.

Error 0x80010135: Path too long

TransactionRsponseType.SplitTenderPaymentsAType.SplitTenderPaymentAType.yml

Ditto for
SplitTenderPaymentAType PHP File
27 Apr 2020, 17:53
#3
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Authorize.net API with Card on File transactions support thread...

RixStix:

Just attempted to unzip the download. Windows is grumpy.

Error 0x80010135: Path too long

TransactionRsponseType.SplitTenderPaymentsAType.SplitTenderPaymentAType.yml

Ditto for
SplitTenderPaymentAType PHP File


i hate windows...

this error is frequently caused by using windows explorer or winzip to extract a zip file.

i would try using this utility to unzip:

https://www.7-zip.org/
27 Apr 2020, 18:06
#4
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

Looking right now for differences between computers.
Laptop 1 : Extract without errors
Laptop 2 : Errors extracting

Always just right-click: ExtractAll

For now, I'll just use a different laptop.... the old one.
Later, today, I'll try 7-zip
27 Apr 2020, 18:39
#5
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

Shouldn't this support be in the "Addon Payment Modules" section?

CIM is an available option within Auth.net accounts
CIM requires additional setup within the Auth.net account

AIM and/or SIM APIloginID and transaction keys do not work without completing CIM setup within the Auth.net account.

1st checkout attempt: CIM is not enabled.

Go to auth.net and enable CIM but did not do anything with the Auth.net Account Updater within CIM. Trying to figure out what is needed there.

2nd checkout attempt: Transaction failed. A valid amount is required. Error code 5

I also have the OPC debug if that is needed.

CIMdebug
Mon, 27 Apr 2020 11:21:33 -0700:
ERROR :  Invalid response
Response : E00044  Customer Information Manager is not enabled.

Mon, 27 Apr 2020 11:30:12 -0700:
Succesfully created customer profile : 2007863187

Mon, 27 Apr 2020 11:30:13 -0700:
Create Customer Payment Profile SUCCESS: 2026789121

Mon, 27 Apr 2020 11:30:13 -0700:
Transaction Failed 
 Error code  : 5
 Error message : A valid amount is required.


MyDEBUG
[27-Apr-2020 11:30:12 America/Los_Angeles] Request URI: /index.php?main_page=checkout_process, IP address: 98.146.164.107
#1  trigger_error() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:447]
#2  authorizenet_cim->logError() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:841]
#3  authorizenet_cim->createCustomerProfileRequest() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:313]
#4  authorizenet_cim->before_process() called at [/home/WEBSERVERACCOUNT/public_html/includes/classes/payment.php:246]
#5  payment->before_process() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/checkout_process.php:92]
#6  require(/home/WEBSERVERACCOUNT/public_html/includes/modules/checkout_process.php) called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/pages/checkout_process/header_php.php:14]
#7  require(/home/WEBSERVERACCOUNT/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/home/WEBSERVERACCOUNT/public_html/index.php:36]
--> PHP Notice: Succesfully created customer profile : 2007863187
 in /home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php on line 447.

[27-Apr-2020 11:30:13 America/Los_Angeles] Request URI: /index.php?main_page=checkout_process, IP address: 98.146.164.107
#1  trigger_error() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:447]
#2  authorizenet_cim->logError() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:940]
#3  authorizenet_cim->createCustomerPaymentProfileRequest() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:320]
#4  authorizenet_cim->before_process() called at [/home/WEBSERVERACCOUNT/public_html/includes/classes/payment.php:246]
#5  payment->before_process() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/checkout_process.php:92]
#6  require(/home/WEBSERVERACCOUNT/public_html/includes/modules/checkout_process.php) called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/pages/checkout_process/header_php.php:14]
#7  require(/home/WEBSERVERACCOUNT/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/home/WEBSERVERACCOUNT/public_html/index.php:36]
--> PHP Notice: Create Customer Payment Profile SUCCESS: 2026789121
 in /home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php on line 447.

[27-Apr-2020 11:30:13 America/Los_Angeles] Request URI: /index.php?main_page=checkout_process, IP address: 98.146.164.107
#1  trigger_error() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:447]
#2  authorizenet_cim->logError() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:1022]
#3  authorizenet_cim->chargeCustomerProfile() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:325]
#4  authorizenet_cim->before_process() called at [/home/WEBSERVERACCOUNT/public_html/includes/classes/payment.php:246]
#5  payment->before_process() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/checkout_process.php:92]
#6  require(/home/WEBSERVERACCOUNT/public_html/includes/modules/checkout_process.php) called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/pages/checkout_process/header_php.php:14]
#7  require(/home/WEBSERVERACCOUNT/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/home/WEBSERVERACCOUNT/public_html/index.php:36]
--> PHP Notice: Transaction Failed 
 Error code  : 5
 Error message : A valid amount is required.
 in /home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php on line 447.
27 Apr 2020, 18:50
#6
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Authorize.net API with Card on File transactions support thread...

ok. so you enabled CIM and that part now looks good.

but now you are getting an invalid amount. and you are using OPC?

what is the order total?
27 Apr 2020, 18:58
#7
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Authorize.net API with Card on File transactions support thread...

rick,
on your server info page, what is this var set to:

serialize_precision
27 Apr 2020, 18:59
#8
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

$56.63 Subtotal
$4.44 shipping USPS 1st class
$3.40 Sales tax
$64.47 Order Total

OPC has those numbers out to a kazillion decimal places
27 Apr 2020, 19:00
#9
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

carlwhat:

rick,
on your server info page, what is this var set to:

serialize_precision



[TABLE]
[TR]
[TD="class: e"]serialize_precision[/TD]
[TD="class: v"]100[/TD]
[TD="class: v"]100[/TD]
[/TR]
[/TABLE]
27 Apr 2020, 19:08
#10
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Authorize.net API with Card on File transactions support thread...

ok, great. that looks to be where the problem is for sure. that should be set at -1.

however, i am unsure how that would affect OPC, so i want to do a little more research on it. i want to see if i can replicate that error, and solve it without the var change. in addition, i will reach out to OPC to see if the -1 setting would affect her.

best.
27 Apr 2020, 19:21
#11
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

Whatever I can do within my capabilities, just let me know.

I will hold off making the change to -1 for a while.

BTW: CIM appears to carry an additional fee with Auth.net Still muddling through AccountUpdater within CIM
27 Apr 2020, 19:26
#12
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Authorize.net API with Card on File transactions support thread...

what version of php are you running? since 7.1 the recommended value has been -1.

all of the servers i am looking at have it set at -1.

i would try that. i'm sure that is the problem for this error 5. and i'm pretty confident your order totals will not be affected. not 100%... but pretty close.

thanks.
27 Apr 2020, 19:31
#13
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Authorize.net API with Card on File transactions support thread...

RixStix:


BTW: CIM appears to carry an additional fee with Auth.net Still muddling through AccountUpdater within CIM


CIM used to have an additional fee. that is NOT what i am seeing. i did look it prior to release and i just looked it up again:

https://www.authorize.net/sign-up/pricing.html

all of the plans look to include CIM.
27 Apr 2020, 19:38
#14
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

CIM Account Updater: $0.25 per card updated

EDIT: That's an addon service to CIM

I'm still reading the details. Maybe this is an addon to the CIM addon service.

Account Updater

Account Updater automatically checks for changes to card information stored with your recurring subscriptions and customer profiles, and updates the card information if available from the card issuer. Using Account Updater can help you avoid declines due to out-of-date card numbers or expiration dates.

Note:

  • Account Updater depends on the card issuer to provide up-to-date card information. Updates occur on a monthly basis.
  • Card updates begin in the current month if sign-up occurs before the 13th of the month. If after the 13th, updates begin the following month.
  • On average, a larger proportion of your total cards will update during the first month you sign up.
  • A report of updated cards will be available on the Reports Page by the first day of the following month.
  • Recurring Billing Subscriptions will be suspended for card account responses with "Account Closed" or "Contact Card Holder".

For more information, read the Account Updater FAQs

Additional Service Fee: $0.25 per card updated.

27 Apr 2020, 19:46
#15
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Authorize.net API with Card on File transactions support thread...

account updater is a separate service and not part of this ZC module. and is done exclusively on your account at auth.net. nothing to see here. i do not recommend it.

perhaps if you were doing layaways or subscriptions... but that is NOT for what i coded this module.

i have spoken with @lat9 about the serialize_precision. i would change that to -1. lets see what happens. if i am reading it correctly, that looks to be the default value since php 7.1

i changed my test server to 100, but was not able to transact an order that resulted in that error.
27 Apr 2020, 20:10
#16
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

Changed serialize_precision to -1

Same error, different mydebug.

Used the stored credit card in first attempt. OPC didn't like that without an additional refresh
Used the new credit card in 2nd attempt. "unchecked" save credit card and received error code 5

New MyDEBUG
[27-Apr-2020 13:05:35 America/Los_Angeles] Request URI: /index.php?main_page=checkout_process, IP address: 98.146.164.107
#1  trigger_error() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:447]
#2  authorizenet_cim->logError() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:1022]
#3  authorizenet_cim->chargeCustomerProfile() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php:325]
#4  authorizenet_cim->before_process() called at [/home/WEBSERVERACCOUNT/public_html/includes/classes/payment.php:246]
#5  payment->before_process() called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/checkout_process.php:92]
#6  require(/home/WEBSERVERACCOUNT/public_html/includes/modules/checkout_process.php) called at [/home/WEBSERVERACCOUNT/public_html/includes/modules/pages/checkout_process/header_php.php:14]
#7  require(/home/WEBSERVERACCOUNT/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/home/WEBSERVERACCOUNT/public_html/index.php:36]
--> PHP Notice: Transaction Failed 
 Error code  : 5
 Error message : A valid amount is required.
 in /home/WEBSERVERACCOUNT/public_html/includes/modules/payment/authorizenet_cim.php on line 447.
27 Apr 2020, 20:11
#17
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

carlwhat:

account updater is a separate service and not part of this ZC module. and is done exclusively on your account at auth.net. nothing to see here. i do not recommend it.

perhaps if you were doing layaways or subscriptions... but that is NOT for what i coded this module.



I understand. The auth.net screen to enable CIM was not clear and had the appearance of required setup. (at least to this dummy)
27 Apr 2020, 20:24
#18
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

FWIW, I disabled OPC and same error.
27 Apr 2020, 20:29
#19
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Authorize.net API with Card on File transactions support thread...

rick,
can you add one line of code? lets add a line between 955 and 956 and modify 957 (the old 956) as below:

[php]
$transactionRequestType->setTransactionType("authCaptureTransaction");
trigger_error($order->info['total']);
$transactionRequestType->setAmount(number_format($order->info['total'], 2, '.', ''));
[/php]

we then should have another debug log and we can see what amount is actually in that info total. and maybe this will resolve our issue.

thanks!
27 Apr 2020, 20:54
#20
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Posts:
2,015
Plugin Contributions:
0

Re: Authorize.net API with Card on File transactions support thread...

My current lines 955-957 just to make sure nothing fatfingered
  $transactionRequestType->setTransactionType("authCaptureTransaction");
            trigger_error($order->info['total']);             
            $transactionRequestType->setAmount(number_format($order->info['total'], 2, '.', '')); 

/includes/modules/payment/authorizenet_cim.php

I didn't expect the error to change.

First pass through checkout
Use saved card on file
Error 5
Second pass
Session expired and wiped out cart
rebuild cart
checkout using a different card
Error 33 now

MyDebug
[27-Apr-2020 13:46:34 America/Los_Angeles] Request URI: /index.php?main_page=checkout_process, IP address: 98.146.164.107
#1  trigger_error() called at [/home/chainwea/public_html/includes/modules/payment/authorizenet_cim.php:956]
#2  authorizenet_cim->chargeCustomerProfile() called at [/home/chainwea/public_html/includes/modules/payment/authorizenet_cim.php:325]
#3  authorizenet_cim->before_process() called at [/home/chainwea/public_html/includes/classes/payment.php:246]
#4  payment->before_process() called at [/home/chainwea/public_html/includes/modules/checkout_process.php:92]
#5  require(/home/chainwea/public_html/includes/modules/checkout_process.php) called at [/home/chainwea/public_html/includes/modules/pages/checkout_process/header_php.php:14]
#6  require(/home/chainwea/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/home/chainwea/public_html/index.php:36]
--> PHP Notice: 27.0339 in /home/chainwea/public_html/includes/modules/payment/authorizenet_cim.php on line 956.

[27-Apr-2020 13:46:34 America/Los_Angeles] Request URI: /index.php?main_page=checkout_process, IP address: 98.146.164.107
#1  trigger_error() called at [/home/chainwea/public_html/includes/modules/payment/authorizenet_cim.php:447]
#2  authorizenet_cim->logError() called at [/home/chainwea/public_html/includes/modules/payment/authorizenet_cim.php:1023]
#3  authorizenet_cim->chargeCustomerProfile() called at [/home/chainwea/public_html/includes/modules/payment/authorizenet_cim.php:325]
#4  authorizenet_cim->before_process() called at [/home/chainwea/public_html/includes/classes/payment.php:246]
#5  payment->before_process() called at [/home/chainwea/public_html/includes/modules/checkout_process.php:92]
#6  require(/home/chainwea/public_html/includes/modules/checkout_process.php) called at [/home/chainwea/public_html/includes/modules/pages/checkout_process/header_php.php:14]
#7  require(/home/chainwea/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/home/chainwea/public_html/index.php:36]
--> PHP Notice: Transaction Failed 
 Error code  : 33
 Error message : Card Code is required.
 in /home/chainwea/public_html/includes/modules/payment/authorizenet_cim.php on line 447.