recurring payments auth.net not happening

Discussion in 'Payments processing' started by johnrooney, Jul 2, 2008.

  1. johnrooney

    johnrooney New Member

    Joined:
    Apr 3, 2008
    Messages:
    6
    Any idea why this may be occuring?

    Checked the cron and all seems to be OK.

    Thanks.
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Anything showing up in your log?

    Are no reoccurring billings happening or just for specific users?
  3. johnrooney

    johnrooney New Member

    Joined:
    Apr 3, 2008
    Messages:
    6
    Here are the errors...(XXXXto protect account name)

    Problem is....in the install files we got from amember the "lib" dir never existed, nevermind the files inside it.

    Any ideas?


    FATAL CRON ERROR:
    <b>WARNING:</b> require_once(/home/XXXXXX/public_html/amember/lib/classes/PriceCalculator.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in line 504 of file cc_core.inc.php

    <b>Fatal error</b>: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/home/XXXXX/public_html/amember/lib/classes/PriceCalculator.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/XXXXX/public_html/amember/plugins/payment/cc_core/cc_core.inc.php</b> on line <b>504</b>
  4. scott_wa1

    scott_wa1 aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    62
    I just woke up to this also and just finished filing my ticket with the help desk. 14 members failed to renew this morning because of the same error below. Yesterday I upgraded from 3.0.7 to 3.1.1.

    The funny thing is even in the brand new installation files, there is no "lib" folder, no "classes" folder, and no "PriceCalculator.php" file to be found. what could it be referring to? :( I'm hoping we can get it fixed before tomorrow's cron run.
  5. getresults

    getresults Member

    Joined:
    Nov 1, 2006
    Messages:
    87
    Hmm. This is weird. I'm running a number of sites using Authorize.net recurring billing and I haven't come across this problem. But... I checked and I don't have the lib/classes/ directory either.

    Do you have tax enabled? I haven't looked at the code fully but that may be why it's being triggered for you and not for me.

    Please post back with the response you get from Amember support.

    Thanks!
  6. jimjwright

    jimjwright New Member

    Joined:
    Sep 12, 2007
    Messages:
    162
    Hello,

    Hmmm. It looks like PriceCalculator got added with 3.1.0 and 3.1.1. There is an actual class definition for PriceCalculator in product.inc.php.

    I wonder if you commented out line 503 in in cc_core.inc.php if it would work? Maybe it was originally in this file and just got moved to product.inc.php? If not then there are files missing.

    PHP:
            // require_once LIB_DIR . '/classes/PriceCalculator.php';

    If you get undefined error then maybe you need to change the line to as follows:

    PHP:
            require_once("$config[root_dir]/product.inc.php");

    Jimmy
  7. getresults

    getresults Member

    Joined:
    Nov 1, 2006
    Messages:
    87
    Hmmm. This could mean that those of us who have recurring billing payments coming up soon may also be hit now that we've upgraded to 3.1.0 or 3.1.1.
  8. jimjwright

    jimjwright New Member

    Joined:
    Sep 12, 2007
    Messages:
    162
    Hello,

    From looking at 3.1.0 and 3.1.1 code it sure seems like rebilling is broken in these releases where aMember is doing the rebill. I hope someone has submitted a support ticket on this specific issue in cc_core.inc.php. With the weekend coming up I would hate for people to have to wait until monday for resolution.

    With a fix I would assume all the expired payments will be rebilled all at once the only side effect I could think of is maybe the billing cycle has moved ???

    If someone wanted to test my change suggested above just force your cron job to run right now. This should cause the suspected routine cc_core_rebill() to be called. Okay after looking at code again you might have to have an expired payment.

    Jimmy
  9. getresults

    getresults Member

    Joined:
    Nov 1, 2006
    Messages:
    87
    I have just submitted an urgent support ticket. I'll let you know as soon as I hear back.
  10. getresults

    getresults Member

    Joined:
    Nov 1, 2006
    Messages:
    87
    I have been given a fix for cc_core.php by one of the support staff which I've attached.

    If you compare this with the original you'll find the following changes:

    line 136:

    PHP:
    array('options' => array())
    Becomes:

    PHP:
    array('options' => array(), 'require_value'=>array(array('name'=>'cc_country')))
    line 504:

    PHP:
            require_once LIB_DIR '/classes/PriceCalculator.php';
    ... is deleted.

    line 747:

    PHP:
        if (!strlen($vars['cc_name_f']) && $features['name_f'])
    becomes...

    PHP:
        if (!strlen($vars['cc_name_l']) && $features['name_l'])

    Thanks to Alex & the team for the super fast response!
  11. jimjwright

    jimjwright New Member

    Joined:
    Sep 12, 2007
    Messages:
    162
    Hello,

    Good job in getting the fix "getresults" and also thanks to "johnrooney" for provided the debug log which identified one of the main problems in this file.

    I need to know your trick about the urgent support ticket. :)

    This is a pretty important fix. Are they going to release 3.1.2? This issue needs to be elevated beyond this thread topic so other people who have upgraded know about the problem. This problem is not just specific to authorize.NET but to any payment processor where aMember does the rebill.

    Just as a side note if anyone wondered why my line number was off by one line 503 versus 504 I forgot I wrote a utility that strips the release version string from all .php files. This makes it easier for me to "diff" different versions of aMember source files to see what files have actually changed between versions. Without this utility every file will look like its changed when a new version is release because the version string is updated in every .php file.

    Jimmy
  12. getresults

    getresults Member

    Joined:
    Nov 1, 2006
    Messages:
    87
    No secret. Just a normal support ticket politely asking for a very quick fix :)

    I immensely dislike trying to read diffs :)

    I use a tool called meld (http://meld.sourceforge.net) which let's you visually compare two (or three) files side by side and highlights all additions and deletions in the new version in different colors.

    http://meld.sourceforge.net/meld_file1.png

    It makes comparing two versions of a file a snap - the changes are instantly highlighted. You can also compare two entire directories - it automatically identifies files that have changed which you can then compare individually.

    meld is only available for linux but I know there are some really good Windows packages that do the same thing.

    Here's one I found with a quick google:

    http://www.compareandmerge.com/index.html
  13. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
  14. jimjwright

    jimjwright New Member

    Joined:
    Sep 12, 2007
    Messages:
    162
    Hello,

    Thanks Alex for the quick resolution.

    As far as "diffs" I was referring to it generically. I don't use unix diff but use a shareware utility called "compare it".

    Jimmy
  15. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    getresults, now that the official fix is public can I suggest removing your attachment from your post?
  16. getresults

    getresults Member

    Joined:
    Nov 1, 2006
    Messages:
    87
    Done. :)

    Thanks,

    Phill

Share This Page