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

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

Views: 56,722

Results 21 to 40 of 199
27 Apr 2020, 9:05 PM
#21
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

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

RixStix:

I didn't expect the error to change.

oh, yee of little faith...

on the admin -> modules -> payment -> install, do you have the request CVV set to true or false? if set to false, you need to set it to true.

few things:

  • first bug, appreciate the help
  • remove line 956 that has that trigger error command; we no longer need that line. leave the other line changed as is.
  • you will now need to delete that stored credit card as it did not have a code when we stored it. this is easily accomplished on the admin side by looking up the customer and you should see a button for delete stored credit cards. execute that. you should get a pop-up confirm window.
  • then try the order again.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

27 Apr 2020, 9:25 PM
#22
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

carlwhat:

oh, yee of little faith...

on the admin -> modules -> payment -> install, do you have the request CVV set to true or false? if set to false, you need to set it to true.

few things:

  • first bug, appreciate the help
  • remove line 956 that has that trigger error command; we no longer need that line. leave the other line changed as is.
  • you will now need to delete that stored credit card as it did not have a code when we stored it. this is easily accomplished on the admin side by looking up the customer and you should see a button for delete stored credit cards. execute that. you should get a pop-up confirm window.
  • then try the order again.

request CVV was already set to TRUE
line 956 removed
credit card deleted (worked perfectly)

ERROR 33 displayed on checkout window
Option for Stored Credit Card is now added to the top of the payment choices (I forgot to uncheck the "Keep Card on file" box)

Resubmit after checking the Stored Credit Card selection
OPC alarm: Your order's details have changed. Please review the current values and re-submit.
Resubmit & ERROR 33

[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.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

27 Apr 2020, 9:31 PM
#23
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

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

rick,
this is the same log as the one above. you can see it based on the timestamp. and the order total of 27.0339. that problem was corrected with the code and if you removed line 956, we should not see that notice in the middle of the log.

i'm not exactly sure what you are seeing now. it might behove you to logout and log back in. the error 33 is related to the 3 digit codes that look to be required (although not in the sandbox environment). so make sure that is set to true. and make sure to input a new card.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

27 Apr 2020, 9:38 PM
#24
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

OOPS. Log folder scrolled on me.
I know the CVV is either 3 or 4 digit code
Tried Visa and MC

[27-Apr-2020 14:24:58 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:1022]
#3  authorizenet_cim->chargeCustomerProfile() called at [/home/chainwea/public_html/includes/modules/payment/authorizenet_cof.php:143]
#4  authorizenet_cof->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.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

27 Apr 2020, 9:43 PM
#25
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

FWIW, Auth.net emailed a receipt for the last test.

Am I missing a switch? Set Production and livemode in settings.

Email sounds like this is sandbox not production.
Auth only, not auth and capture

========= ORDER INFORMATION =========
Invoice : none
Description : Test transaction for ValidateCustomerPaymentProfile.
Amount : 0.00 (USD)
Payment Method: Visa xxxx0076
Transaction Type: Authorization Only

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

27 Apr 2020, 9:55 PM
#26
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

Nope. LIVE

All test transactions are showing VOIDED in Unsettled list in Auth.net interface

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

27 Apr 2020, 11:35 PM
#27
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

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

RixStix:

OOPS. Log folder scrolled on me.
I know the CVV is either 3 or 4 digit code
Tried Visa and MC

[27-Apr-2020 14:24:58 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:1022]
#3 authorizenet_cim->chargeCustomerProfile() called at [/home/chainwea/public_html/includes/modules/payment/[b]authorizenet_cof.php:143[/b]]
#4 authorizenet_cof->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.


rick,
lets go over a few things.

- authorize.net will respect the production v test/sandbox credentials.  they go to different end points.
- those successful transactions that you see are the creation of a token at authorize.  i believe they used to a $1 auth; but now they do a $0 auth.
- its possible they will void those transactions as they are just testing to see if the card is good.
- they will not void a live transaction unless instructed by the merchant, aka you.
- if you successfully charged any card, you would have a completed order and a payment record, and some order notes...  assuming we do not see mysql errors, which is always possible.
- you keep on getting this error 33 card code is required.  i had previously asked you to delete the stored credit cards; ensure that the cvv code is set to true, and then try again.
- the error log i am quoting here would indicate that is not the case.  we have yet to have an order go through?  true?  but we have stored some credit cards.  this log here comes from the card on file transaction.  you can see that on line #3 in the log, where the script it references is **authorizenet_cof.php.**  that's the card on file script.
- i have researched the chargeCustomerProfile, and there is no opportunity to send the CVV there.  it can only be done with the createProfile (save a credit card) transaction.
- if you are sure you saved this credit card with the CVV number intact, which is what i would recommend, you should login to authorize.net, and Click Settings in the main left side menu -> Click Payment Form -> Click Form Fields -> Uncheck the field provided in the Error 33 text. -> Click Submit
- that is documented right here:  <https://developer.authorize.net/api/reference/responseCodes.html?code=33>
- it is entirely possible that setting on your merchant dashboard is what is causing the problem.

lets see if that resolves it all!

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

28 Apr 2020, 12:24 AM
#28
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

See RED replies

carlwhat:

rick,
lets go over a few things.

  • authorize.net will respect the production v test/sandbox credentials. they go to different end points. I copy/pasted credentials from AIM and SIM
  • those successful transactions that you see are the creation of a token at authorize. i believe they used to a $1 auth; but now they do a $0 auth.
  • its possible they will void those transactions as they are just testing to see if the card is good.
  • they will not void a live transaction unless instructed by the merchant, aka you.
  • if you successfully charged any card, you would have a completed order and a payment record, and some order notes... assuming we do not see mysql errors, which is always possible.
  • you keep on getting this error 33 card code is required. i had previously asked you to delete the stored credit cards; ensure that the cvv code is set to true, and then try again. Did that. When I go through checkout, there is no saved card. Checkout: Error: but now there is a saved card option.
  • the error log i am quoting here would indicate that is not the case. we have yet to have an order go through? true? but we have stored some credit cards. this log here comes from the card on file transaction. you can see that on line #3 in the log, where the script it references is authorizenet_cof.php. that's the card on file script.
  • i have researched the chargeCustomerProfile, and there is no opportunity to send the CVV there. it can only be done with the createProfile (save a credit card) transaction.
  • if you are sure you saved this credit card with the CVV number intact, which is what i would recommend, you should login to authorize.net, and Click Settings in the main left side menu -> Click Payment Form -> Click Form Fields -> Uncheck the field provided in the Error 33 text. -> Click Submit Pretty sure I tried checkout with the "SAVE" box unchecked and checked but cannot say definitively. Will retry after removing saved card data
  • it is entirely possible that setting on your merchant dashboard is what is causing the problem. Yes, CardCode is checked as REQUIRED. Why would I uncheck the field so that it is not required? Doesn't make sense to me but I will try that in a bit. I am getting the call for Suppertime duties.

lets see if that resolves it all!

best.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

28 Apr 2020, 1:00 AM
#29
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

Success. THANK YOU.

I learned something today. Not sure exactly what I learned but I do know that I learned something.

Unchecked the box within the Auth.net account. My logic says the checkbox to require CVV means to always require a CVV and uncheck says (to me), don't require CVV. But who am I but some peon user that has had that account setting for the past 10 years.

Checkout #1 successful (unchecked the SaveCCinfo box in the OPC screen)
Checkout #2 successful (checked the SaveCCinfo box in the OPC screen)
Checkout #3 successful with OPC warning regarding settings changed, try again. That was checkout using saved card. The OPC warning does raise flags with customers checking out as we experienced last weekend. Just submit a 2nd time without changing anything and checkout #3 successful.
Checkout #4 successful using Amex with 4 digit CVV and save card.
Checkout #5 successful using "Use Saved Card" and was presented a selection of saved cards.

Refund/VOIDs from within ZC admin all successful.


Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

28 Apr 2020, 1:08 AM
#30
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

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

rick,
i have verified this error, as well as the solution.

Attachment 18967

storing cvv is not allowed per PCI-DSS.

if you require the card code as indicated above on your merchant dashboard, you will require the customer to re-enter the CVV number for a stored credit card transaction. currently i am not sending it when charging a customer profile which is why we were receiving the error in the first place.

right now, i have NOT allowed stored credit cards to require a CVV number, but i will add a configuration switch for it. i will have to make a few code changes.

removing that item on your dashboard will resolve the error.

everything that you have stated in red above all makes sense to me.

i'll have some new code for you soon. but turning that switch off at the bottom of the form on the auth merchant dashboard should resolve this error.... for now.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

28 Apr 2020, 1:46 AM
#31
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

TNX. I hope this exercise has been helpful vs a PIA.

All is fine on my end & not losing sleep.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

28 Apr 2020, 1:57 AM
#32
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

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

RixStix:

TNX. I hope this exercise has been helpful vs a PIA.

All is fine on my end & not losing sleep.

please. found a couple of bugs... that's always a positive!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

28 Apr 2020, 5:02 PM
#33
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

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

rick,
just to be clear on a few things:

  • i have made the code changes for the problems that you found while implementing this module.
  • it is strictly your choice as to whether you want to send the CVV with every transaction. as indicated by your post above, it is totally configurable on the authorize merchant dashboard. if you think you are more secure by requiring it for every transaction, and changing your setting in the dashboard, that is certainly available and we can make that happen.
  • doing so would require your customer to re-input the CVV on every stored credit card transaction. which i think is a little burdensome on the customer. this is just my opinion.
  • my next version will have all of these corrections in the code. i will hopefully get it up there soon, but i can direct you to the code if you want it sooner.
  • my opinion is that requiring the CVV for the new credit card, not requiring it for the stored credit card, and setting the authorize dashboard so that it is not required is the best balance for security and convenience. that is how you are currently configured.
  • currently, if you want authorize to send or not send the customer an email receipt, that has to be done on the authorize dashboard. we currently can not override that setting within this module.
    if i can answer any further questions or help in any way, please let me know.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

28 Apr 2020, 5:27 PM
#34
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

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

Thank you for everything. Comments in red

carlwhat:

rick,
just to be clear on a few things:

  • i have made the code changes for the problems that you found while implementing this module. I hope the code changes are for the general good of the world, not just me
  • it is strictly your choice as to whether you want to send the CVV with every transaction. as indicated by your post above, it is totally configurable on the authorize merchant dashboard. if you think you are more secure by requiring it for every transaction, and changing your setting in the dashboard, that is certainly available and we can make that happen. That 'click' setting within Auth.net is most likely a choice blindly made 10 years ago from a suggestion of our original processor. And like many choices made during initial setup, tend to get forgotten over the years until the choice has negative consequences. Thus triggering a widescale hunt.
  • doing so would require your customer to re-input the CVV on every stored credit card transaction. which i think is a little burdensome on the customer. this is just my opinion. Agree
  • my next version will have all of these corrections in the code. i will hopefully get it up there soon, but i can direct you to the code if you want it sooner. Not necessary & I am not losing sleep over this issue.
  • my opinion is that requiring the CVV for the new credit card, not requiring it for the stored credit card, and setting the authorize dashboard so that it is not required is the best balance for security and convenience. that is how you are **COLOR=#ff0000 currently configured. I have unchecked that box within the auth.net account
  • currently, if you want authorize to send or not send the customer an email receipt, that has to be done on the authorize dashboard. we currently can not override that setting within this module. Not sure where this comment came from. We don't have auth.net send any customer receipt. Admin receipts yes, especially when fraud detection filters are triggered.

if i can answer any further questions or help in any way, please let me know.

best.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

2 May 2020, 9:19 PM
#35
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

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

version 2.0.1 released.

addresses both bugs found by @RixStix. changes include:

  • ability to configure sending of CVV for new card and/or card on file transactions separately.
  • addresses issue when order total extends past 2 decimal places.
  • differentiates pop-up window for refunds v voids based on the transaction status; only unsettled transactions can be voided, while one can only refund a settled transaction.
  • more code cleanup, and a few more notes in the documentation.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

18 May 2020, 9:25 PM
#36
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

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

Version 2.1.0 now released!

  • now allows for separate authorization and capture!
  • continued code cleanup and efficiency
  • no ZC core files or tables modified.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

9 Jun 2020, 7:58 PM
#37
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

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

I didn't know this existed until just the other day. Very nice!

Installed for a client and working but with one issue. She cannot capture from the admin. Capture through a.net works.

Zen Cart 1.5.6a
PHP 5.6

When clicking the capture button, in the console I get:
VM233:1 Uncaught ReferenceError: cimpopupWindow is not defined at <anonymous>:1:1

Jim
Wheaton Website Services

9 Jun 2020, 8:19 PM
#38
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

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

jeking:

I didn't know this existed until just the other day. Very nice!

Installed for a client and working but with one issue. She cannot capture from the admin. Capture through a.net works.

Zen Cart 1.5.6a
PHP 5.6

When clicking the capture button, in the console I get:
VM233:1 Uncaught ReferenceError: cimpopupWindow is not defined at <anonymous>:1:1

jim,
thanks for the props!

i have not tested on 1.5.6a. only on 1.5.6c. it looks like there is a problem with jquery.

what happens if from the admin, you open the developer tools and enter:

$().jquery

do you get you jquery version?

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

9 Jun 2020, 8:30 PM
#39
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

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

In Developer Tools, do you mean a search for $().jquery? In that case, nothing turns up.

But this file is loading: jscript__jquery.min.js
which is version 1.7.1

Jim
Wheaton Website Services

9 Jun 2020, 9:02 PM
#40
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

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

jeking:

In Developer Tools, do you mean a search for $().jquery? In that case, nothing turns up.

But this file is loading: jscript__jquery.min.js
which is version 1.7.1

no, i do not mean a search.

in the console, type the code exactly as written. the version should come back up. see the attached file.

i'm looking at a v1.5.6c version and i do not see that file that you are talking about (jscript__jquery.min.js). in the 156c the jquery version comes back as 3.4.0 (my screenshot is from a v157 install so it comes back as 3.4.1).

i can track down a 1.5.6a and hopefully get that booted up, but i have a feeling you do not have jquery loaded. which the developer tools will tell us. see my screenshot. i'll try and track down a 1.56a fileset.

Attachment 19041

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.