public function chargeParams()
    {
        // Build the charge array
        $chargeDetails = [
            'name'          => $this->plan->name,
            'price'         => $this->plan->price,
            'test'          => $this->plan->isTest(),
            'trial_days'    => $this->plan->hasTrial() ? $this->plan->trial_days : 0,
            'return_url'    => URL::secure(Config::get('shopify-app.billing_redirect'), ['plan_id' => $this->plan->id]),
        ];

        // Handle capped amounts for UsageCharge API
        if (isset($this->plan->capped_amount) && $this->plan->capped_amount > 0) {
            $chargeDetails['capped_amount'] = $this->plan->capped_amount;
            $chargeDetails['terms'] = $this->plan->terms;
        }

        return $chargeDetails;
    }
public function chargeParams()
    {
        
        $chargeDetails = [
            'name'          => $this->plan->name,
            'price'         => $this->plan->price,
            'test'          => $this->plan->isTest(),
            'trial_days'    => $this->plan->hasTrial() ? $this->plan->trial_days : 0,
            'return_url'    => URL::secure(Config::get('shopify-app.billing_redirect'), ['plan_id' => $this->plan->id]),
        ];

        
        if (isset($this->plan->capped_amount) && $this->plan->capped_amount > 0) {
            $chargeDetails['capped_amount'] = $this->plan->capped_amount;
            $chargeDetails['terms'] = $this->plan->terms;
        }

        return $chargeDetails;
    }
public function chargeParams ( ) { // Build the charge array $ chargeDetails = [ 'name' => $ this -> plan -> name , 'price' => $ this -> plan -> price , 'test' => $ this -> plan -> isTest ( ) , 'trial_days' => $ this -> plan -> hasTrial ( ) ? $ this -> plan -> trial_days : 0 , 'return_url' => URL :: secure ( Config :: get ( 'shopify-app.billing_redirect' ) , [ 'plan_id' => $ this -> plan -> id ] ) , ] ; // Handle capped amounts for UsageCharge API if ( isset ( $ this -> plan -> capped_amount ) && $ this -> plan -> capped_amount > 0 ) { $ chargeDetails [ 'capped_amount' ] = $ this -> plan -> capped_amount ; $ chargeDetails [ 'terms' ] = $ this -> plan -> terms ; } return $ chargeDetails ; }
Returns the charge params sent with the post request.

@return array
Returns the charge params sent with the post request .