amember passing ccbill datalink from starttime and endtime

Discussion in 'Payments processing' started by imxuk, Feb 7, 2008.

  1. imxuk

    imxuk New Member

    Joined:
    Sep 22, 2006
    Messages:
    2
    Hi,

    Ive been noticing my CCBill rebills havent been showing accurately in aMember; running 3.0.8.

    The datalink request is as follows:

    cBill datalink debug (20061215120353, 20061216120353):
    https://datalink.ccbill.com/data/ma...ntSubacc=0000&username=XXXXXX&password=XXXXXX

    Now, it is trying to request data for 2006?! Server data/time is correct...

    [root@billabong ccbill]# date
    Wed Feb 6 17:44:23 GMT 2008
    [root@billabong ccbill]# php -v
    PHP 5.2.5 (cli) (built: Jan 26 2008 15:20:57)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd., and
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
    with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies


    mysql> select * from amember_cron_run;
    +----+---------------------+
    | id | time |
    +----+---------------------+
    | 1 | 2008-02-06 21:00:01 |
    +----+---------------------+
    1 row in set (0.00 sec)

    Even the last cron run time is correct in the db.....

    This is the output from the #-ed out print lines from the ccbill.inc.php:

    ###
    print "$last_run_tm;$last_run<br />$now_run_tm;$now_run<br />";

    1166529833;20061219120353<br />1202313601;20080206160001<br
    />
    ###
    print "$last_run;$now_runn";

    20061219120353;20061220120353
    ###

    the $now_run is generated correctly to start with, however i feel it is knocked off by the $last_run variable being incorrect?

    Many thanks,

    Ed
  2. imxuk

    imxuk New Member

    Joined:
    Sep 22, 2006
    Messages:
    2
    Hi,

    Ive been noticing my CCBill rebills havent been showing accurately in aMember; running 3.0.8.

    The datalink request is as follows:

    Now, it is trying to request data for 2006?! Server data/time is correct...

    Even the last cron run time is correct in the db.....

    This is the output from the #-ed out print lines from the ccbill.inc.php:

    the $now_run is generated correctly to start with, however i feel it is knocked off by the $last_run variable being incorrect?

    Many thanks,

    Ed
  3. czechtickling

    czechtickling New Member

    Joined:
    Dec 10, 2009
    Messages:
    1
    Is there a patch for this bug?

    Temporarily, I rewrote the values of variables $last_run and $now_run according to ccbill_debug.php.
    Code:
    $last_run = date ('YmdHis', time () -1 * 24 * 3600);
    $ now_run = date ('YmdHis');
    
    But I worry if it wouldn't cause another problems in the datalink - the original calculation times in ccbill.inc.php is quite confusing :mad:
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    No this should not cause other problems.

Share This Page