Hi everyone,
I took the new commit of 6.x-2.x-dev from Sept 3 for a test drive with authorize.net CIM and here is what I found:
Modules enabled:
uc_recurring 6.x-2.x-dev
Authorize.net 6.x-2.0-rc6
Credit Card 6.x-2.0-rc6
Credit Card enabled as a payment method in product features for recurring fees.
My transaction went through without a hitch, but I noticed the following:
- The order did not show up on the Recurring Fees report
- My user profile page (My Account) no longer has a recurring fees tab
- The order log had no reference to the transaction being recurring.
Previously, using the UC_CIM module, the missing elements noted above were all present.
As admin, when I viewed the order, I do see the Process Card item there and it appears to have all the correct information, including my customer's CIM profile as a selectable option.
Also, not sure if this is related, but I received the following error when I ran my Recent Log Entries report:
# warning: Invalid argument supplied for foreach() in /includes/common.inc on line 884.
# warning: strtr() [function.strtr]: The second argument is not an array in /includes/common.inc on line 901.
I am at your service to try things to move this forward.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | Picture 3.png | 8.45 KB | bearstar |
| #21 | Picture 4.png | 58.07 KB | bearstar |
| #21 | Picture 5.png | 45.02 KB | bearstar |
| #21 | Picture 6.png | 31.47 KB | bearstar |
| #11 | uc_recurring-567896-11.patch | 1.29 KB | univate |
Comments
Comment #1
bearstar commentedOne more item. When I plugged in my order number into the Recurring Fees Report filter, I got a blank screen.
Comment #2
univate commentedPayment method/gateway modules (like uc_authorizenet) need to be uc_recurring aware, for ubercarts core gateway we are going to include them in a directory as part of this module.
That recent commit didn't include a file for "uc_recurring.uc_authorizenet.inc" that is required to support that gateway, I (or someone) needs to go through that other issue on authorizenet support to try and work out what works and create that file.
But you have brought up an issue which needs fixing and that is that the credit payment option should be disabled for recurring orders if the default credit payment gateway doesn't support. I hvae a patch to fix that, which i will commit shortly if there are no objections.
For the moment if you are keen to do some testing then it would be good to test on the test_gateway.
Comment #3
univate commentedComment #4
bearstar commentedThanks...I applied your patch and ran my transaction again (just for kicks) and it didn't complain about the lack of an authorizenet inc file.
I then tried the test gateway and when I went to /admin/store/settings/products/edit/features I got the following error:
Fatal error: Cannot redeclare uc_recurring_test_gateway_renew() (previously declared in /sites/all/modules/ubercart/payment/uc_credit/test_gateway.module:74) in /sites/all/modules/uc_recurring/modules/uc_recurring.test_gateway.inc on line 84
So, I commented out that function in /sites/all/modules/uc_recurring/modules/uc_recurring.test_gateway.inc and the page loaded OK and I could see that Credit Card was selected as the payment method.
I then ran a test order using the test gateway and all went smoothly, but I still did not see any reference to the order being a recurring order (either when viewing order details or when running the recurring fee report). Also, there was no reference to recurring order in the My Account page.
Hope these comments are helpful and I look forward to testing the uc_recurring.uc_authorizenet.inc file.
Comment #5
univate commentedgetting a clean unpatched copy of the latest version of ubercart will fix the error you are getting with the redeclared functions, the whole point of the recent commit was to remove any need to change ubercart - so all previous patches are now no longer needed.
Other then that you just need to
* set the default credit gateway to test_gateway on:
admin/store/settings/payment/edit/methods
* enable the credit payment method for recurring fees on:
admin/store/settings/products/edit/features
* create a product with a recurring fee feature
* make sure members have the permission to "view own recurring fees" if you want them to have access their recurrring fees.
Start placing orders.
Comment #6
bearstar commentedGetting a clean, unpatched ubercart makes sense. I can confirm that I did all the other items you mentioned, with the possible exception of creating a product after the fact. I have several products already set with recurring fee features, so I was just testing those.
Thanks!
Comment #7
bearstar commentedI tested this with a clean ubercart install and test gateway and everything went smoothly. The only issue I noticed was that there was no link to /admin/store/orders/recurring from the Administration menu ("Recurring fees") (not a big deal)
The view recurring fees link from the user profile page worked great. This is all very clean and usable. Thanks.
I am keen to test the CIM module that is being discussed, so please let me know how I can help.
Comment #8
univate commentedThere is still a problem with the uc_credit gateway, its returning itself as the fee_handler, it needs to return the default credit card gateway:
maybe something like...
Comment #9
bearstar commentedThe code above seems to be the same code that was posted as a patch in #2, above, right?
Also, I took a look at ubercart/payment/uc_authorizenet/uc_authorizenet.module as a potential model for creating uc_recurring/modules/uc_recurring.uc_authorizenet.inc based on the test gateway and I must say it is a bit beyond me to make heads or tails of it :-)
I am keen to see what you do so that I potentially help myself a bit better in the future!
Comment #10
univate commentedThere was one small change to the fee_handler line, but there is alternative solution to this problem and that is to just have uc_credit return the default credit gateway info instead.
Comment #11
univate commentedUnless there are any objections I will be committing the following, which fixes:
* setting the fee_handler to the default credit gateway that will is currently processing credit payments
* only return recurring info for uc_credit if the default credit gateway actual support recurring billing - at the moment it doesn't give any warnings that recurring fees will not be able to be set up.
Comment #12
amitaibuI think that if we already look for the function, we should use it, something like:
Comment #13
univate commentedActually this is going to probably need some further thinking because the default gateway doesn't necessary correspond to module name and there can be more then one item returned from:
Example being paypal WPP
The default credit gateway is
$gateway = 'paypal_wps'but the info function will be'uc_recurring_paypal_recurring_info'Comment #14
univate commentedFor the moment I have committed this:
That way the fee handler for a credit payment will be the default gateway. Still need to deal with the actual issue to show a warning if the default credit card gateway doesn't support uc_recurring.
I think we should be able to do this somewhere in uc_recurring by checking that the fee handler exists in the list of recurring payment methods/gateways returned from:
Comment #15
univate commentedOk I've fixed and commited this. I want to avoid anyone else trying to test with just any random gateway and not getting at least a warning that their gateway isn't support.
The fix is relatively simple, I've added a function that checks if the payment method is supported.
Comment #16
bearstar commentedHi Chris,
I took your latest commit for a test drive and it went very well.
- Order was created
- Recurring order was created
- CIM profile was created
- I was able to edit, cancel and run charges.
Fantastic progress. Thank you. I will let you know if I run into any issues as I take this further.
Update:
Rolled it out with my production CIM account and all is well. One little note to anyone trying this: under /admin/store/settings/payment/edit/gateways CIM settings, be sure to put it in Production mode. If it is not in Production mode, you will get the old "Checkout cannot be completed without any payment methods enabled. Please contact an administrator to resolve the issue." error in checkout.
Comment #17
univate commentedThanks bearstar, thats great to hear, I can now tick this off my list as done.
Comment #18
bearstar commentedNow that a day or two has passed and I have had time to see how recurring orders are treated, here are my observations:
- The original order created a new order at renewal time - Good
- The credit card transaction did not seem to work during the renewal process and it looks like it was trying to create a new CIM profile upon renewal. (I just set up a new order that will renew tomorrow so that I can verify that this is really a problem and not just a product of my various test transactions)
Log from renewal order:
Authorize.Net: Creating CIM profile failed.
E00003 - The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:cardNumber' element is invalid - The value '6' is invalid according to its datatype 'String' - The actual length is less than the MinLength value.
- When I deleted the original order and the new order that was created by the recurring transaction, there was no indication at /admin/store/orders/recurring that a particular order was no longer valid (had been cancelled) except for the zero in the "Left" column. Not a show stopper, but maybe it'd be better to have it say something like cancelled or completed. Also, the link to the order number that I had deleted remained so that it delivered a page not found error when clicked.
- When I, as the user, cancelled my own recurring order from My Account page, it was removed from my profile - Good
- I tried a fresh order to double check things and I noticed that something is being processed twice during the initial order. Here is a log of the transaction:
09/15/2009
1:58:28 AM - Authorize.Net: CIM profile created - XXXXXX
09/15/2009
1:58:28 AM 26 Authorization and capture
ACCEPTED: This transaction has been approved.
Amount: $13.60
AVS response: Y - Address (Street) and five digit ZIP match
CVV match: P - Not Processed
09/15/2009
1:58:29 AM - Authorize.Net: Creating CIM profile failed.
E00039 - A duplicate record with id XXXXXX already exists.
09/15/2009
1:58:29 AM - Authorize.Net: Creating CIM profile failed.
E00039 - A duplicate record with id XXXXXX already exists.
09/15/2009
1:58:29 AM 26 Recurring fee 6 added to order.
09/15/2009
1:58:29 AM 26 Recurring fee 6 added to order.
09/15/2009
1:58:31 AM - Order created through website.
Comment #19
univate commentedI was just discussing this issue in irc earlier, there is a payment setting that allows you to create a CIM profile on every order. This is probably whats causing those "Authorize.Net: Creating CIM profile failed." errors.
I wonder if you unchecked that option if the errors would go away?
Comment #20
bearstar commentedI have unchecked that setting and will report back later what happens upon renewal.
FYI, the setting is "Always create a CIM profile for securely storing CC info for later use"
Seems like we do want that for the initial order. I'll let you know how it goes...
Comment #21
bearstar commentedMy latest test order did the following (I had unchecked the create CIM profile setting before this sequence ran)
Order 59 created Order 60 (but there was no automatic attempt to run a charge (not sure if that is a feature or a bug))
When I opened Order 60, I saw the option to Process the Card in the Payment pane (and there was a balance)
When I clicked View Card Details in the Payment pane I got what you see in Picture 3, attached. The number 6 might be a result of my transaction occurring as under the affiliate cookie of user 6. The 6 could also refer to Recurring order #6. An earlier test transaction also had this 6, so I think its the former.
Anyway, when I clicked Process Card in the Payment pane, I got what you see in Picture 4, attached. At the bottom, the CIM information is good. When I checked that option the order processed just fine. Once again, should the transaction run automatically or is this manual processing the way it is meant to work?
Then, I went to look at the order again to see the log comments and noticed at the bottom the check box to process 2 recurring fees! This was a surprise as I just processed the one recurring fee and original one was processed at checkout. See Picture 5.
The other thing that surprised me was when I looked at /admin/store/orders/recurring the original order (59) line item showed no change. There was no indication in the "total" column that anything had been charged. See picture 6. In terms of proper workflow, should the administrator use this "Charge" link or the Process Card button on the new order?
I then Cancelled the recurring fee and lo and behold, a "1" appeared in the Total column, referring to the one recurring order that had been created, I presume.
BTW, the renewal did generate an email confirmation out of Authorize.net, but not out of Ubercart.
I'd appreciate your input on these observations.
Thanks!
Comment #22
bearstar commentedI ran another new oder with the CIM option unchecked to make sure that a CIM profile would still be created and I noticed the same thing as I noted in comment #18: Some things are happening twice: it seems to create the CIM profile and then it tries again. Also, it adds the order twice.
09/16/2009
4:37:08 PM - Authorization and capture
ACCEPTED: This transaction has been approved.
Amount: $13.60
AVS response: Z - Five digit ZIP matches, Address (Street) does not
CVV match: P - Not Processed
09/16/2009
4:37:09 PM - Authorize.Net: CIM profile created - XXXXXXX
09/16/2009
4:37:09 PM - Authorize.Net: Creating CIM profile failed.
E00039 - A duplicate record with id XXXXXXX already exists.
09/16/2009
4:37:09 PM - Recurring fee 7 added to order.
09/16/2009
4:37:09 PM - Recurring fee 7 added to order.
09/16/2009
4:37:11 PM - Order created through website.
Also, this time, the payment pane is correct. It is the newly generated order that loses the CC information under View Card Details in the payment pane. I'll check tomorrow if it comes up as a "6" again.
Comment #23
univate commentedI have just committed some further changes to CIM, which may fix your problems:
http://drupal.org/node/454952#comment-2050812
Comment #24
univate commentedAlso its probably best to create separate issues for each issue/bug you come across, rather then just tacking them onto existing issue.
Comment #25
bearstar commentedMy issues around brand new orders are now cleared up. I will see what happens upon renewal of my latest test order tomorrow and will report back. Thank you for continuing the advances!
Comment #26
vitis commentedsubscribing
Comment #27
bearstar commentedThe renewal did not trigger. No new order was created after the designated time period.
As requested, I opened a new issue at http://drupal.org/node/581570
UPDATE: This problem seems to been caused by a stuck CRON. After killing the cron, everything ran as expected.
BTW, everything seems to be working fine with this module now, with one minor item noted at http://drupal.org/node/582340
Comment #28
savmac commentedsubscribing