-
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.
-
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
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
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/
-
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
-
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
Code:
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
Code:
[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.
-
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?
-
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
-
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
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
carlwhat
rick,
on your server info page, what is this var set to:
serialize_precision
serialize_precision |
100 |
100 |
-
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.
-
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
-
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.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
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.
-
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.
Quote:
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.
-
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.
-
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
Code:
[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.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
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)
-
Re: Authorize.net API with Card on File transactions support thread...
FWIW, I disabled OPC and same error.
-
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 Code:
$transactionRequestType->setTransactionType("authCaptureTransaction");
trigger_error($order->info['total']);
$transactionRequestType->setAmount(number_format($order->info['total'], 2, '.', ''));
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!
-
Re: Authorize.net API with Card on File transactions support thread...
My current lines 955-957 just to make sure nothing fatfingered
Code:
$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
Code:
[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.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
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.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
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
Code:
[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.
-
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.
-
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
Code:
[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.
-
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
Quote:
========= ORDER INFORMATION =========
Invoice : none
Description : Test transaction for ValidateCustomerPaymentProfile.
Amount : 0.00 (USD)
Payment Method: Visa xxxx0076
Transaction Type: Authorization Only
-
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
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
RixStix
OOPS. Log folder scrolled on me.
I know the CVV is either 3 or 4 digit code
Tried Visa and MC
Code:
[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,
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/...s.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.
-
Re: Authorize.net API with Card on File transactions support thread...
See RED replies
Quote:
Originally Posted by
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
- that is documented right here: https://developer.authorize.net/api/...s.html?code=33
- 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.
-
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.
-
1 Attachment(s)
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.
-
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.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
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!
-
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.
-
Re: Authorize.net API with Card on File transactions support thread...
Thank you for everything. Comments in red
Quote:
Originally Posted by
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 (were) 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.
-
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.
-
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.
-
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
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
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:
do you get you jquery version?
-
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
-
1 Attachment(s)
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
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
-
Re: Authorize.net API with Card on File transactions support thread...
I thought I probably misunderstood. I also now realize the file I mentioned is a storefront file so completely irrelevant. :-)
https://prnt.sc/swtsgm
3.3.1
-
Re: Authorize.net API with Card on File transactions support thread...
ok i think i found the problem. lets look at this file:
YOUR_ADMIN/includes/footer.php
the notifier was added AFTER v156a. modify that file so the the end of the file is as follows:
PHP Code:
</div>
</footer>
<?php
$zco_notifier->notify('NOTIFY_ADMIN_FOOTER_END');
if your version of that file already has the last line with the $zco_notifier, let me know, and we will continue the trouble shooting.
reload the admin page, and let me know what happens.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
carlwhat
ok i think i found the problem. lets look at this file:
YOUR_ADMIN/includes/footer.php
the notifier was added AFTER v156a. modify that file so the the end of the file is as follows:
PHP Code:
</div>
</footer>
<?php
$zco_notifier->notify('NOTIFY_ADMIN_FOOTER_END');
if your version of that file already has the last line with the $zco_notifier, let me know, and we will continue the trouble shooting.
reload the admin page, and let me know what happens.
Ding, ding ding. That was it!!
https://prnt.sc/swviqd
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
jeking
:thumbsup:
-
Re: Authorize.net API with Card on File transactions support thread...
Back with a new issue. This same client is reporting that the invoice number is not being recorded at authorize.net. I don't have access so cannot see. Should the invoice number get recorded?
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
jeking
Back with a new issue. This same client is reporting that the invoice number is not being recorded at authorize.net. I don't have access so cannot see. Should the invoice number get recorded?
the client is always right!
let me take a look.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
jeking
Back with a new issue. This same client is reporting that the invoice number is not being recorded at authorize.net. I don't have access so cannot see. Should the invoice number get recorded?
jim,
i was sending the order number in the reference field. it is NOT showing up on my authorize account. it does look like authorize has a different place to add it. i will get a new version out shortly.
in the interim, if you want to modify the code, on this file: includes/modules/payment/authorizenet_cim.php you can add this on line 980
PHP Code:
$authorize_order = new AnetAPI\OrderType();
$authorize_order->setInvoiceNumber($this->nextOrderNumber($order->info));
$transactionRequestType->setOrder($authorize_order);
// next line should be:
$request = new AnetAPI\CreateTransactionRequest();
let me know how that goes.
best.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
carlwhat
jim,
i was sending the order number in the reference field. it is NOT showing up on my authorize account. it does look like authorize has a different place to add it. i will get a new version out shortly.
in the interim, if you want to modify the code, on this file: includes/modules/payment/authorizenet_cim.php you can add this on line 980
PHP Code:
$authorize_order = new AnetAPI\OrderType();
$authorize_order->setInvoiceNumber($this->nextOrderNumber($order->info));
$transactionRequestType->setOrder($authorize_order);
// next line should be:
$request = new AnetAPI\CreateTransactionRequest();
let me know how that goes.
best.
Bingo again!!
She also commented that the description is blank. It used to display the product name. Something you may want to include while you're making updates. ;-)
-
1 Attachment(s)
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
jeking
Bingo again!!
She also commented that the description is blank. It used to display the product name. Something you may want to include while you're making updates. ;-)
jim,
there is where she and i go adrift. yes the description is blank, but the description field is for the whole invoice, but just a single line item. with what would you propose i populate that field? i suppose it could say, "Goods from: store_name" and pull the store name from the configuration table. i am open to any ideas.
as you can see from the attached screenshot, a detailed list of itemized goods is already sent to a.net. perhaps i could do the product description if there is only 1 item on the invoice; but now we are getting into whether that makes sense for others who may make use of the module.
thoughts?
Attachment 19049
-
Re: Authorize.net API with Card on File transactions support thread...
v2.1.1 submitted for review.
adds invoice number and invoice description to authorize.net receipt and dashboard.
-
Re: Authorize.net API with Card on File transactions support thread...
I don't know if this is really a bug or not. When checking out as a guest (using One-Page Checkout), there is a saved card. It's the card of the store owner so I assume adding while she was testing things out.
In the admin, I see I can remove the card: https://prnt.sc/t97dz8
But my concern is will all cards be saved if a customer checks out as a guest for future guest orders to see?
-
Re: Authorize.net API with Card on File transactions support thread...
Send question, when my client authorizes the charges the regular a.net plugin would post the results as a status update with details: https://prnt.sc/t9b1th
With the new plugin, there is no order status update. Without this, she does not have a record on the order of when the funds where captured.
https://prnt.sc/t9b1th
-
1 Attachment(s)
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
jeking
Send question, when my client authorizes the charges the regular a.net plugin would post the results as a status update with details:
https://prnt.sc/t9b1th
With the new plugin, there is no order status update. Without this, she does not have a record on the order of when the funds where captured.
https://prnt.sc/t9b1th
sorry for the delayed response. very busy right now...
all of this information is stored in table. i do NOT store it in the comments table.
perhaps there is a notifier missing in her 156a implementation. does she not see something that looks the attachment here:
https://www.zen-cart.com/attachment....93569625&stc=1
i do see the necessary notifier NOTIFY_ADMIN_ORDERS_PAYMENTDATA_COLUMN2 is part of v156a.... as far as i can tell....
i will be looking at the other issue when i have a bit more time.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
carlwhat
sorry for the delayed response. very busy right now...
all of this information is stored in table. i do NOT store it in the comments table.
perhaps there is a notifier missing in her 156a implementation. does she not see something that looks the attachment here:
https://www.zen-cart.com/attachment....93569625&stc=1
i do see the necessary notifier NOTIFY_ADMIN_ORDERS_PAYMENTDATA_COLUMN2 is part of v156a.... as far as i can tell....
i will be looking at the other issue when i have a bit more time.
Thanks for the reply. Checking the order, the table you show is completely empty: https://prnt.sc/t9ri90
I also see the notifier in the ADMIN/orders.php
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
jeking
Thanks for the reply. Checking the order, the table you show is completely empty:
https://prnt.sc/t9ri90
I also see the notifier in the ADMIN/orders.php
you look to have multiple conflicting payment modules going on as far as i can tell from your screenshot.
there is no expiration date above the table for the credit card. my module does not work that way... (as far as I can tell)
you also look to have hitting this code in the orders.php script (line 580 in v156):
PHP Code:
if (is_object($module) && method_exists($module, 'admin_notification')) {
my module does NOT have an admin_notification method.
if you look at your mysql database are there any records in the authorize_cim_payments table? and if so, what are the values for the orders_id?
in looking at this thread, she was previously able to capture transactions. i believe there had to be records in this table. so what has happened to this table now?
-
Re: Authorize.net API with Card on File transactions support thread...
I'm so sorry. The previous screen shot was the wrong order. It was the 'before' order. The after order does have the data in the table:
https://prnt.sc/t9v6sn
Having said that, the data in the table is the authorization. It does not show the capture data. The Capture button is missing so an indication it was captured. My client is looking to know the date of the capture.
Checking the authorize_cim_payments table, I see the same single entry.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
jeking
I'm so sorry. The previous screen shot was the wrong order. It was the 'before' order. The after order does have the data in the table:
https://prnt.sc/t9v6sn
Having said that, the data in the table is the authorization. It does not show the capture data. The Capture button is missing so an indication it was captured. My client is looking to know the date of the capture.
Checking the authorize_cim_payments table, I see the same single entry.
that data is available.
if there is additional demand for knowing when the capture happened; i will add that to the table. but right now, clients making additional requests are fine; but they are not, to me, a bug. i currently only provide the date of authorization. i will think about adding the capture date in a future release of the module.
Quote:
Originally Posted by
jeking
I don't know if this is really a bug or not. When checking out as a guest (using One-Page Checkout), there is a saved card. It's the card of the store owner so I assume adding while she was testing things out.
In the admin, I see I can remove the card:
https://prnt.sc/t97dz8
But my concern is will all cards be saved if a customer checks out as a guest for future guest orders to see?
with regards to this situation, i have not had an opportunity to look at it closely. from what i remember, if one checks out as a guest, i thought i did not save the credit card data. i specifically remember looking at that and having input from the author of OPC on that.
again, i will take a look when i can.
best.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
carlwhat
that data is available.
if there is additional demand for knowing when the capture happened; i will add that to the table. but right now, clients making additional requests are fine; but they are not, to me, a bug. i currently only provide the date of authorization. i will think about adding the capture date in a future release of the module.
I would agree it's not a bug so good with a feature request for a future release. Thanks.
Quote:
Originally Posted by
carlwhat
with regards to this situation, i have not had an opportunity to look at it closely. from what i remember, if one checks out as a guest, i thought i did not save the credit card data. i specifically remember looking at that and having input from the author of OPC on that.
again, i will take a look when i can.
I'll see if I can do some testing to confirm what we see here. For now, I'll delete the saved card from the Guest account.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
jeking
I don't know if this is really a bug or not. When checking out as a guest (using One-Page Checkout), there is a saved card. It's the card of the store owner so I assume adding while she was testing things out.
In the admin, I see I can remove the card:
https://prnt.sc/t97dz8
But my concern is will all cards be saved if a customer checks out as a guest for future guest orders to see?
Quote:
Originally Posted by
carlwhat
with regards to this situation, i have not had an opportunity to look at it closely. from what i remember, if one checks out as a guest, i thought i did not save the credit card data. i specifically remember looking at that and having input from the author of OPC on that.
again, i will take a look when i can.
best.
This is continuing to happen. And today got the error "ERROR invalid response Customer: 22186 E00042 You cannot add more than 10 payment profiles"
I saw saved credit cards again on the Guest account, which is ID 22186. I deleted them so should buy some time.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
jeking
This is continuing to happen. And today got the error "ERROR invalid response Customer: 22186 E00042 You cannot add more than 10 payment profiles"
I saw saved credit cards again on the Guest account, which is ID 22186. I deleted them so should buy some time.
i am working on a new release of this most excellent, IMO (inherently biased), payment module. it should address all bugs documented by you and verified by me. including the verified bugs associated with guest checkout.
thanks for pointing them out.
best.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
carlwhat
i am working on a new release of this most excellent, IMO (inherently biased), payment module. it should address all bugs documented by you and verified by me. including the verified bugs associated with guest checkout.
thanks for pointing them out.
best.
Glad to hear that! I'll get it installed and tested as soon as it's available.
-
Re: Authorize.net API with Card on File transactions support thread...
v 2.2.0 now submitted for review.
many bug fixes as well as now having the ability to have multiple authorizations per order! all configurable.
problems associated with guest checkout should now be addressed.
best.
-
Re: Authorize.net API with Card on File transactions support thread...
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
carlwhat
v 2.2.0 now available.
Thank you! I'll report back on any issues.
Here's one typo to fix. Line 32 from \includes\languages\english\card_update.php
define('CARD_UPDATE_OK', 'Succesfully updated information.');
correct to:
define('CARD_UPDATE_OK', 'Successfully updated information.');
-
Re: Authorize.net API with Card on File transactions support thread...
v 2.2.1 is now available.
in addition to having multiple authorizations per order, admins can use any customer card on file for additional authorizations.
i have addressed all reported and verified bugs. including new ones found by me!
best.
-
Re: Authorize.net API with Card on File transactions support thread...
Possibly useful change to the docs/index.html file: it currently says:
Go to Admin -> Modules -> Payment and you will see 2 new payment modules
PLEASE PLEASE PLEASE, even if you already have an authorize.net account, create a new one using the link here.
I assumed here was a link so I tried clicking it, and then tried scanning the page to see where the link was.
Maybe instead:
Go to Admin -> Modules -> Payment and you will see 2 new payment modules.
Start by clicking on New Credit Card Authorize.net (CIM). You will see a link under the Install Module button that says
Click Here to Sign Up for a NEW Merchant Account.
PLEASE PLEASE PLEASE, even if you already have an authorize.net account, create a new one using this link.
... or something like that.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
swguy
Possibly useful change to the docs/index.html file: it currently says:
Go to Admin -> Modules -> Payment and you will see 2 new payment modules
PLEASE PLEASE PLEASE, even if you already have an authorize.net account, create a new one using the link here.
I assumed here was a link so I tried clicking it, and then tried scanning the page to see where the link was.
Maybe instead:
Go to Admin -> Modules -> Payment and you will see 2 new payment modules.
Start by clicking on New Credit Card Authorize.net (CIM). You will see a link under the Install Module button that says
Click Here to Sign Up for a NEW Merchant Account.
PLEASE PLEASE PLEASE, even if you already have an authorize.net account, create a new one using this link.
... or something like that.
i will take a look. thanks for the input.
best.
-
Re: Authorize.net API with Card on File transactions support thread...
v 2.2.2 is now available.
the key fix on this version, is the order status only gets changed after capture of the funds. if you have the authorization type set to authorization+capture, you will not notice any difference. if, on the other hand, you are set to authorize only; the order status will only get updated after capture of the funds on the admin side.
there are a few other bug fixes/improvements made behind the scenes.
best.
-
Re: Authorize.net API with Card on File transactions support thread...
I'd like the Keep Card on File checkbox to default to unchecked. I would have thought changing the call to zen_draw_checkbox_field in includes/modules/payment/authorizenet_cim.php line 200 would do it, but it seems stuck on checked. Any thoughts?
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
swguy
I'd like the Keep Card on File checkbox to default to unchecked. I would have thought changing the call to zen_draw_checkbox_field in includes/modules/payment/authorizenet_cim.php line 200 would do it, but it seems stuck on checked. Any thoughts?
hi @swguy,
yeah, that's what i would think as well. that code looks wrong there. not sure how it got that way.... have you tried:
PHP Code:
if (!zen_in_guest_checkout()) {
$selection['fields'][] = array(
'title' => 'Keep Card on File',
'field' => zen_draw_checkbox_field('authorizenet_cim_save', '', false),
// '' . ' id="' . $this->code . '-save"' . $onFocus),
'tag' => $this->code . '-save'
);
}
that seems to work for me. i tested on a base157 install as well as on a customized 157a site.
it does not look like that other stuff is doing whatever it was i intended it to do there.
i will fix that in the next release. thanks for pointing it out!
best.
-
Re: Authorize.net API with Card on File transactions support thread...
LOL I got suckered in by the incorrect bracket placement! That's why just switching to false didn't work. Thanks for taking a second look.
-
Re: Authorize.net API with Card on File transactions support thread...
Small bug in admin/includes/classes/authnet_order.php line 28.
You have:
include DIR_FS_CATALOG . DIR_WS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/authnet_order.php';
You want:
include DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/authnet_order.php';
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
swguy
Small bug in admin/includes/classes/authnet_order.php line 28.
You have:
include DIR_FS_CATALOG . DIR_WS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/authnet_order.php';
You want:
include DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/authnet_order.php';
hey scott,
happy new year!
thanks for taking a look.
are you referring to the fact that the code as implemented has an extra slash '/' in there?
-
Re: Authorize.net API with Card on File transactions support thread...
The code you have duplicates the sitename. It yields
/Users/scott/Sites/mysite//mysite/admin/includes/languages/english/authnet_order.php
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
swguy
The code you have duplicates the sitename. It yields
/Users/scott/Sites/mysite//mysite/admin/includes/languages/english/authnet_order.php
i did the following:
PHP Code:
<?php
require 'includes/application_top.php';
echo "-------->" . DIR_FS_CATALOG . DIR_WS_ADMIN . "<---------<br>";
echo "-------->" . DIR_FS_ADMIN . "<---------<br>";
results in:
Code:
-------->/var/www/la155//mybloodyadmin/<---------
-------->/var/www/la155/mybloodyadmin/<---------
(names changed to protect the innocent...)
what server software are you running? i'm running:
HTTP Server: Apache/2.4.38 (Debian)
PHP Version: 7.4.13 (Zend: 3.4.0)
if you are running windows:
https://docs.zen-cart.com/user/first...-not-supported
if you are not running windows, by all means, i would love to explore further.
best.
-
Re: Authorize.net API with Card on File transactions support thread...
I am in a subfolder of document root called demo_157a. Document root is /Users/scott/Sites/.
MacOS (BSD Unix) - Zen Cart 1.5.7a, PHP 7.2 under MAMP. (Just a test site.)
echo "-------->" . DIR_FS_CATALOG . DIR_WS_ADMIN . "<---------<br>";
gives
-------->/Users/scott/Sites/demo_157a//demo_157a/admin/<---------
DIR_WS_ADMIN starts with the subfolder when one is used.
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
swguy
I am in a subfolder of document root called demo_157a. Document root is /Users/scott/Sites/.
MacOS (BSD Unix) - Zen Cart 1.5.7a, PHP 7.2 under MAMP. (Just a test site.)
echo "-------->" . DIR_FS_CATALOG . DIR_WS_ADMIN . "<---------<br>";
gives
-------->/Users/scott/Sites/demo_157a//demo_157a/admin/<---------
DIR_WS_ADMIN starts with the subfolder when one is used.
so the problem is when the store is installed in a subfolder?
great. i'll take a look and apply a fix as necessary. i am going to be doing an update shortly.
thanks.
-
Re: Authorize.net API with Card on File transactions support thread...
v2.2.3 now available for download.
php 7.0 is now required for this version.
if your server is running less than php7.0, then please stay with 2.2.2.
addresses fixes documented in thread above. also continues code cleanup... addresses some issues on card deletion on the admin side as well as card update on the customer side.
best.
-
Re: Authorize.net API with Card on File transactions support thread...
What causes the enabled flag in customers_cc table to be set to N?
Small suggested tweak: in
./includes/classes/observers/class.cim_admin_observer.php
you could use BUTTON_DELETE_CARDS
instead of the string "Delete Credit Cards".
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
swguy
What causes the enabled flag in customers_cc table to be set to N?
@swguy, this code is an evolution over many years work for some clients. during the pandemic, i decided to refactor it (it desperately needed it), and make it available to the community. this flag was part of the evolution, and in this module's current form is not used.
Quote:
Originally Posted by
swguy
Small suggested tweak: in
./includes/classes/observers/class.cim_admin_observer.php
you could use BUTTON_DELETE_CARDS
instead of the string "Delete Credit Cards".
agreed. however that constant is not loaded at that point in the observer. i will look at where i am loading the payment modules and potentially move them so that the constant is available. little more complex, but i'm in agreement.
thanks.
-
Re: Authorize.net API with Card on File transactions support thread...
In includes/modules/payment/authorizenet_cim.php, the function getCustomerCards() returns the query result. Did you intend the process the query result and return an array as was done in includes/modules/payment/authorizenet_cof.php ? Because the way it is now makes no sense - see the references to the results of getCustomerCards in admin/includes/classes/observers/class.cim_admin_observer.php line 65 and 72 for example
$key = array_search($cc_index, array_column($cards, 'id'));
-
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
swguy
In includes/modules/payment/authorizenet_cim.php, the function getCustomerCards() returns the query result. Did you intend the process the query result and return an array as was done in includes/modules/payment/authorizenet_cof.php ? Because the way it is now makes no sense - see the references to the results of getCustomerCards in admin/includes/classes/observers/class.cim_admin_observer.php line 65 and 72 for example
$key = array_search($cc_index, array_column($cards, 'id'));
perhaps this level of code discussion is better suited over at the publicly available github repository. i continuously update and release when necessary and perhaps it will be easier to point out your code issues in the latest version of the master branch.
it does seem that a refactor is necessary as the one function does return a query result while the other function does return an array. i will have to take a closer look to see why this was done the way it was, and whether or not there is a bug there. it is entirely possible.
-
Re: Authorize.net API with Card on File transactions support thread...
-
1 Attachment(s)
Re: Authorize.net API with Card on File transactions support thread...
I'm having just a couple of issues getting the plug-in to work w/ ZC 1.5.7c; PHP 7.4.25; MySQL 5.5.5-10.3.32-MariaDB
1. When confirming final checkout, I get an error:
"Transaction Failed
Error code : 11
Error message : A duplicate transaction has been submitted."
Even though its not a duplicate - first time, new dollar amount, etc.
2. Also, an error log is being created with every attempt indicating a fatal PHP error due to an incorrect datetime value. I've attached the logfile on that one.
I've rechecked to ensure that everything was uploaded and the data table looks right.
This may be a conflict w/ our template or some other mod, but wanted to throw it out here first to see if anyone has any ideas.
Thank you!
Matt
-
1 Attachment(s)
Re: Authorize.net API with Card on File transactions support thread...
Quote:
Originally Posted by
apollowilcox
I'm having just a couple of issues getting the plug-in to work w/ ZC 1.5.7c; PHP 7.4.25; MySQL 5.5.5-10.3.32-MariaDB
1. When confirming final checkout, I get an error:
"Transaction Failed
Error code : 11
Error message : A duplicate transaction has been submitted."
Even though its not a duplicate - first time, new dollar amount, etc.
2. Also, an error log is being created with every attempt indicating a fatal PHP error due to an incorrect datetime value. I've attached the logfile on that one.
I've rechecked to ensure that everything was uploaded and the data table looks right.
This may be a conflict w/ our template or some other mod, but wanted to throw it out here first to see if anyone has any ideas.
Thank you!
Matt
hey matt,
lets address the error log and see if the duplicate transaction gets fixed; which i think it will.
it seems that you have stumbled upon a problem that i have already addressed, but unfortunately is not up on the zen-cart plugin page. bad carl, bad!
it is related to strict mode on newer versions of mysql.
try and replace:
includes/modules/payment/authorizenet_cim.php
with this file here:
https://raw.githubusercontent.com/pr...izenet_cim.php
you can just copy and paste the file from there. alternatively i have attached it here:
Attachment 19836
let me know if that works. if so, i will re-upload so that it is up on the plugins for all to enjoy.
best.
p.
-
1 Attachment(s)
Re: Authorize.net CIM - incorrect datetime Value
Lol! Thanks Carl.
I uploaded the new code and upon confirming the test order, got the error screen and when I refreshed, I was completely logged out.
The same log file/ error of 'incorrect datetime value.'
Confirmed that the new file did upload and did it again just to make sure. Retried... same.
Attachment 19837
-
Re: Authorize.net CIM - incorrect datetime Value
Quote:
Originally Posted by
apollowilcox
Lol! Thanks Carl.
I uploaded the new code and upon confirming the test order, got the error screen and when I refreshed, I was completely logged out.
The same log file/ error of 'incorrect datetime value.'
Confirmed that the new file did upload and did it again just to make sure. Retried... same.
Attachment 19837
ok, great thanks for that.
lets try changing a couple of lines in the same file. pretty convinced this will now work. lines 1521 and 1522:
PHP Code:
//from
$mod_date = null;
$bindType = 'date';
//to
$mod_date = 'null';
$bindType = 'noquotestring';
if i ever do a refactor, i will remove these date fields and store them as integer using a UTC timestamp. so much easier to maintain.
let me know if this works.
-
Re: Authorize.net CIM - incorrect datetime Value
Thank you Carl. That indeed fixed the date issue. It led to one other error which caused the same symptoms and was simple enough even I was able to diagnose it.
Line 1640 of that same file needs a comma between :adminName, now()
Code:
$sql = "insert into " . TABLE_ORDERS_STATUS_HISTORY . " (comments, orders_id, orders_status_id, updated_by, date_added) values (:orderComments, :orderID, :orderStatus, :adminName, now() )";
(Commas can kill... Let's eat Grandma!)
Now she works!! We'll watch it for a few days.
Thanks so much for the support.
-
Re: Authorize.net CIM - incorrect datetime Value
thanks for pointing that out. although i believe the line is 1620:
https://github.com/proseLA/authorize..._cim.php#L1620
good catch. i'll have a new version up soon.
best.
-
Re: Authorize.net CIM - Fantastic partial pay feature
So, we've been testing this mod a bit. We didn't even realize that the plug-in included one feature that it going to be super helpful.
With this plug-in, we can capture a partial amount and it will create a new authorization for the balance. The balance is displayed on the order-admin and can be easily captured later after the backorder ships. Super cool. Thanks Carl! We would have asked for this long ago but never even thought it possible.:D
-
Re: Authorize.net CIM - Fantastic partial pay feature
Quote:
Originally Posted by
apollowilcox
So, we've been testing this mod a bit. We didn't even realize that the plug-in included one feature that it going to be super helpful.
With this plug-in, we can capture a partial amount and it will create a new authorization for the balance. The balance is displayed on the order-admin and can be easily captured later after the backorder ships. Super cool. Thanks Carl! We would have asked for this long ago but never even thought it possible.:D
:thumbsup:
i put a lot of work into it. i think it's a great payment module; but then again i'm biased.
-
Re: Authorize.net API with Card on File transactions support thread...
v2.3.1 submitted for approval.
reminder that php 7.0 is required for this version.
if your server is running less than php7.0, time to upgrade!
addresses fixes documented in thread above including mysql strict mode fixes for date fields. also continues code cleanup...
nbl.
-
Re: Authorize.net API with Card on File transactions support thread...
-
Re: Authorize.net API with Card on File transactions support thread...
Again, thanks for this great plug-in. There are a few minor (really minor) items that i would like to tweak for our application and i offer these up in case others agree or if you care to make it part of the vanilla plug-in.
1. The dialog box that pops up to "Get the money!" is just a bit small. On our layout, we have to enlarge it to get to the Submit/ Cancel buttons. I'm not sure how to do that, but it would be a convenience to not have to resize it each time.
2. Might be nice if the customer's account page would have a button where they could delete their card information, if it had been previously stored. Not a big deal, as they can contact us and its easy for us to do. Just a thought.
3. [Even more minor]: Until the money has been captured, it might be more intuitive to have the first button read "Void" and not "Refund." once Captured, then "Refund" would show. Slightly misleading to think i can refund when actually it has not yet been captured.
Again, minor points on a effective and complex plug-in. I bought you some cake and hope others do as well. Thank you. :D
-
Re: Authorize.net API with Card on File transactions support thread...
all good points. allow me to respond:
1. i agree. if you go this file and line:
https://github.com/proseLA/authorize...erver.php#L180
and change the part that says height=280 to height=480, does that fix your issue?
2. customer maintenance of credit cards... did you install the card_update page? it seems a customer can delete cards from here:
yoursite.com/index.php?main_page=card_update
those files are here:
https://github.com/proseLA/authorize...es/card_update
https://github.com/proseLA/authorize.../YOUR_TEMPLATE
as is stated here:
https://github.com/proseLA/authorize...sly-documented
one needs to update tpl_account_default.php to add a link to the card update.
3. this is trickier. if i were to make a determination as to what to say on that button, i think the implication is that info is correct. so void pre-capture; and refund post-capture. hmmmm.... if you were to capture a transaction, and right afterwards attempt to refund it, a void window comes up. why is that? because once you hit the refund button, i am then making a call to auth.net to see what status the transaction is in. i do not remember the exact terminology, but lets call it settled for arguments sake... so we have auth -> capture -> settlement. the settlement happens automatically, but there are captured transactions that can ONLY be voided as they have not settled. once settled, they can ONLY be refunded. so changing the terminology based on the conditional you describe does not give you exact results. if we wanted exact results we could contact auth.net each time we go onto an orders detail page, but that to me is a waste of bandwidth as well as the admin's time.
in addition, voiding an authorization is something i have implemented, but its not necessarily something that has happened. auths put holds on funds, voiding an auth makes a request to the issuing bank to release said auth. the issuing bank may or may not chose to do so.
so as you say, i think this is a very minor issue, and one that i plan to leave well enough alone.... for now...
glad you like it!
let me know about option 1. i'll have that queued up for next release if it works for you.
best.
-
Re: Authorize.net API with Card on File transactions support thread...
Wow. That's great Carl.
#1. Found that 'height = 380' was perfect for our template. Thanks for showing me where to do that.
#2 Those two files were uploaded, but did not find the actual edit required to add the call:
Quote:
one needs to update tpl_account_default.php to add a link to the card update.
Sorry, but I'm not seeing the specific language needed (and I'm not smart enough to come up with it myself). Is it in the readme?
#3 Good points. I understand and agree its not worth the trouble.
Thank you!
-
Re: Authorize.net API with Card on File transactions support thread...
:thumbsup:
if you go into includes/templates/YOUR_TEMPLATE/templates/tpl_account_default.php and look for something like below and make the change.
PHP Code:
//from
<li><?php echo ' <a href="' . zen_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . MY_ACCOUNT_INFORMATION . '</a>'; ?></li>
<li><?php echo ' <a href="' . zen_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . MY_ACCOUNT_ADDRESS_BOOK . '</a>'; ?></li>
<li><?php echo ' <a href="' . zen_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL') . '">' . MY_ACCOUNT_PASSWORD . '</a>'; ?></li>
//to:
<li><?php echo ' <a href="' . zen_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . MY_ACCOUNT_INFORMATION . '</a>'; ?></li>
<li><?php echo ' <a href="' . zen_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . MY_ACCOUNT_ADDRESS_BOOK . '</a>'; ?></li>
<li><?php echo ' <a href="' . zen_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL') . '">' . MY_ACCOUNT_PASSWORD . '</a>'; ?></li>
<li><?php echo ' <a href="' . zen_href_link(FILENAME_CARD_UPDATE, '', 'SSL') . '">Update My Credit Card(s)</a>'; ?></li>
hope that helps!
best.
-
Re: Authorize.net API with Card on File transactions support thread...
Thank you Carlwhat.
Had something interesting happen today. Customer called asking us to place the online order for her, which I did. Upon her request to not store her card, i unchecked the 'save my card.'
Later, I happened to be in authorize.net CIM for another customer and noticed the call-in customer's name. Sure enough, it had saved her card even though I definitely had unchecked the box. I then logged into the customer's account on our website, to delete the card and it shows the customer 'you have no cards on file.'
I then repeated this using my own card with a new order on my online account. Again, the card was saved to CIM (despite my request) and showed 'no card' on my customer account card_update page.
I'm not sure where to look/ what to do to address this.
Matt
-
Re: Authorize.net API with Card on File transactions support thread...
matt,
to actually delete the customers card, you need to do it from the admin.
doing it on the customers side removes it from them seeing it.
from the admin, if there is a delete button for the customers card, that means there are still cards on file; although some may not be visible to the customer.
hope that helps.
-
Re: Authorize.net API with Card on File transactions support thread...
Okay... that's good for me to understand. It seems a bit misleading to the customer. If it were me, I would expect that I truly deleted the card from existence with this vendor/ website.
Any thoughts or advice on the other issue: where the card is being stored despite the customer unchecking the "save this card" checkbox?
This is a complex plug-in. Amazing how well it works with Authorize CIM.