PHP Class iaPlan

Subrion - open source content management system Copyright (C) 2016 Intelliants, LLC This file is part of Subrion. Subrion is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Subrion is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Subrion. If not, see .
Inheritance: extends abstractCore
Show file Open project: intelliants/subrion Class Usage Examples

Protected Properties

Property Type Description
$_item
$_plans
$_table

Public Methods

Method Description
calculateDates ( $duration, $unit )
extractFunds ( array $transactionData ) : boolean Write funds off from member balance
getById ( integer $planId ) : null | array Return plan information
getPlans ( null $itemName = null ) : array Returns an array of available plans
prePayment ( $itemName, $itemData, $planId, string $returnUrl = IA_URL ) : boolean | string Payment pre-processing actions
setPaid ( $transaction )
setUnpaid ( $itemName, $itemId )

Protected Methods

Method Description
_sendEmailNotification ( $type, array $plan, $memberId )

Private Methods

Method Description
_runClassMethod ( $itemName, $method, array $args = [] )

Method Details

_sendEmailNotification() protected method

protected _sendEmailNotification ( $type, array $plan, $memberId )
$plan array

calculateDates() public method

public calculateDates ( $duration, $unit )

extractFunds() public method

Write funds off from member balance
public extractFunds ( array $transactionData ) : boolean
$transactionData array data about transaction
return boolean true on success

getById() public method

Return plan information
public getById ( integer $planId ) : null | array
$planId integer plan id
return null | array

getPlans() public method

Returns an array of available plans
public getPlans ( null $itemName = null ) : array
$itemName null option item name
return array

prePayment() public method

Payment pre-processing actions
public prePayment ( $itemName, $itemData, $planId, string $returnUrl = IA_URL ) : boolean | string
$itemName item name
$itemData current item data, id field is mandatory
$planId plan id to be paid for
$returnUrl string post payment return url
return boolean | string

setPaid() public method

public setPaid ( $transaction )

setUnpaid() public method

public setUnpaid ( $itemName, $itemId )

Property Details

$_item protected property

protected $_item

$_plans protected property

protected $_plans

$_table protected static property

protected static $_table