Jump to content
Do not create multi-accounts, you will be blocked!

DieHard

Members
  • Joined

  • Last visited

Posts posted by DieHard

  1. 36 minutes ago, julianocunha said:

    If your code is the same, notice that something is wrong. Note that there is no Week option. The first option is Month and set to 7 days.
    Run a test on your website, note that when purchasing any subscription package, even if you have set it to expire in 90 days, after approving the Offline payment, it will show the expiration in 7 days.

    I do not use Offline payment

  2. ·

    Edited by DieHard

    17 hours ago, julianocunha said:

    I checked this part of the code in the app/Models/Package.php file.

    Note that the month interval is set to 7 days:

    protected function periodEnd(): Attribute
    {
    return Attribute::make(
    get: function () {
    $today = now();

    $intervalInDays = $this->promotion_time ?? 30;

    $isSubsPackage = (isset($this->type) && $this->type == 'subscription');
    if ($isSubsPackage) {
    $interval = !empty($this->interval) ? $this->interval : 'month';
    $intervalInDays = 7;

    if ($interval == 'month') {
    $intervalInDays = $today->daysInMonth ?? 30;
    }
    if ($interval == 'year') {
    $intervalInDays = $today->daysInYear ?? 365;
    }
    }

    return $today->addDays($intervalInDays)->endOfDay();
    },
    );
    }

     

    Please check if your code is different.

    my code is the same

     

    This is my cron settings:

    cron.png.2a711d583171defe89b458c7ab20d598.png