Class Socialveo\Core\models\Payment

InheritanceSocialveo\Core\models\Payment » Socialveo\Core\models\SocialveoModel » Phalcon\Mvc\Model
Uses TraitsSocialveo\Core\Translatable, Socialveo\Core\models\traits\JsonProperties

Class Payment

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__get() Magic method to get related records using the relation alias as a property or getters defined by setGetter() Socialveo\Core\models\SocialveoModel
__isset() Magic method to check if a property is a valid relation Socialveo\Core\models\SocialveoModel
__set() Magic method to set related records using the relation alias as a property or setters defined by setSetter() Socialveo\Core\models\SocialveoModel
_t() Gets translations Socialveo\Core\Translatable
behaviors() Socialveo\Core\models\Payment
behaviorsNotify() Behavior notify Socialveo\Core\models\SocialveoModel
cachedFind() Returns query results from cache (if set and not expired) or database Socialveo\Core\models\SocialveoModel
change() Changes object attributes based on passed-in payload data, saves object and returns it Socialveo\Core\models\SocialveoModel
createObject() Creates an object using passed-in payload data Socialveo\Core\models\SocialveoModel
decrementProperty() Increment property Socialveo\Core\models\traits\JsonProperties
deleteObject() Deletes an object (soft-delete) Socialveo\Core\models\SocialveoModel
deleteTargetIndex() Delete target index Socialveo\Core\models\SocialveoModel
fetchObjects() Fetches the provided objects and returns them in an array Socialveo\Core\models\SocialveoModel
filteredFind() Returns query results filtered by GET user-parameters, optionaly cached Socialveo\Core\models\SocialveoModel
findFirstByUuid() Find first model by uuid Socialveo\Core\models\SocialveoModel
fire() Fire event Socialveo\Core\models\SocialveoModel
forUpdate() Socialveo\Core\models\SocialveoModel
generateHash() Socialveo\Core\models\Payment
getActiveDeleted() Returns whether model is deleted Socialveo\Core\models\SocialveoModel
getActiveOk() Socialveo\Core\models\SocialveoModel
getActivePaymentProcess() Socialveo\Core\models\SocialveoModel
getAdapter() Returns payment adapter Socialveo\Core\models\Payment
getAttributes() Get model meta data attributes Socialveo\Core\models\SocialveoModel
getAttributesStatic() Get models metadata attributes Socialveo\Core\models\SocialveoModel
getChangedFields() Returns a list of changed values Socialveo\Core\models\SocialveoModel
getEventsManagerInstance() Returns models Events Manager Socialveo\Core\models\SocialveoModel
getGetters() Return getters Socialveo\Core\models\SocialveoModel
getIsOk() Returns true if is payment ok Socialveo\Core\models\Payment
getIsOwner() Check if user is owner of resource Socialveo\Core\models\SocialveoModel
getLastHistory() Get last payment history Socialveo\Core\models\Payment
getLastQueryFullCount() Socialveo\Core\models\SocialveoModel
getLinkPayment() Socialveo\Core\models\Payment
getLogger() Returns logger if it enabled Socialveo\Core\models\Payment
getModel() Get model Socialveo\Core\models\SocialveoModel
getObjectByParam() Fetches an object based on passed array Socialveo\Core\models\SocialveoModel
getObjectTypeByParam() Returns an resource type based on request URI Socialveo\Core\models\SocialveoModel
getPaymentIsOk() Returns true if is payment ok Socialveo\Core\models\SocialveoModel
getPaymentsByUser() Returns a list of payments of a given user Socialveo\Core\models\Payment
getPlansPrices() Get plans prices Socialveo\Core\models\Payment
getProperties() Returns properties Socialveo\Core\models\traits\JsonProperties
getProperty() Returns property Socialveo\Core\models\traits\JsonProperties
getPropertyAsArray() Returns property as array Socialveo\Core\models\traits\JsonProperties
getRealOwner() Return real owner Socialveo\Core\models\SocialveoModel
getResourceType() Returns a string resource name of the Object (singular form) Socialveo\Core\models\SocialveoModel
getScenario() Socialveo\Core\models\SocialveoModel
getServiceAdapters() All available adapters Socialveo\Core\models\Payment
getServicePlans() Returns service plans Socialveo\Core\models\Payment
getSetters() Return setters Socialveo\Core\models\SocialveoModel
getSource() Define table mapping Socialveo\Core\models\Payment
getSourceTable() Returns the source table Socialveo\Core\models\SocialveoModel
getStatusString() Get status string Socialveo\Core\models\Payment
getStatusType() Get status type Socialveo\Core\models\Payment
getStatusesString() Returns payments statuses Socialveo\Core\models\Payment
getStatusesTypes() Returns payments types statuses Socialveo\Core\models\Payment
getStringStatus() Get string status Socialveo\Core\models\Payment
getStringStatuses() Get string statuses Socialveo\Core\models\Payment
getTarget() Get target Socialveo\Core\models\Payment
getTargetObject() Returns the target object by target_id and target_type Socialveo\Core\models\SocialveoModel
getTargetObjectFromArray() Fetches an object based on passed array Socialveo\Core\models\SocialveoModel
getTargetType() Returns target type Socialveo\Core\models\SocialveoModel
getTargetTypes() Get target types Socialveo\Core\models\Payment
getTargetUrl() Returns target url Socialveo\Core\models\Payment
getUuidsObjects() Fetch objects passed in array Socialveo\Core\models\SocialveoModel
hasChanged() Check if a specific attribute has changed This only works if the model is keeping data snapshots Socialveo\Core\models\SocialveoModel
incrementProperty() Increment property Socialveo\Core\models\traits\JsonProperties
initBehaviors() Init behaviors Socialveo\Core\models\SocialveoModel
initialize() Initialize method for model Socialveo\Core\models\Payment
isModel() Check if called class and the model name is the same Socialveo\Core\models\SocialveoModel
isNew() Checks whether model is new Socialveo\Core\models\SocialveoModel
isNewRecord() Checks whether model is new Socialveo\Core\models\SocialveoModel
isServiceEnabled() Whatever service is paid Socialveo\Core\models\Payment
isSkipValidation() Is skip validation Socialveo\Core\models\SocialveoModel
log() Writes a message to the log Socialveo\Core\models\Payment
onConstruct() OnConstruct event model Socialveo\Core\models\SocialveoModel
pluralize() Transforms words from singular to plural Socialveo\Core\models\SocialveoModel
readAttribute() Read attribute from getter Socialveo\Core\models\SocialveoModel
resourceToModel() Transforms a resource name string to a Model name (if such model exists) Socialveo\Core\models\SocialveoModel
resultsetToJson() Returns an array of typed arrays, ready to be json_encoded Socialveo\Core\models\SocialveoModel
retrieve() Returns object from cache (if set and not expired) or database Socialveo\Core\models\SocialveoModel
setGetter() Set getter Socialveo\Core\models\SocialveoModel
setProperty() Set property Socialveo\Core\models\traits\JsonProperties
setScenario() Socialveo\Core\models\SocialveoModel
setSetter() Set setter Socialveo\Core\models\SocialveoModel
setTargetObject() Set target_id and target_type Socialveo\Core\models\SocialveoModel
singularize() Transforms words from plural to singular Socialveo\Core\models\SocialveoModel
t() Gets translations Socialveo\Core\Translatable
toJson() Returns a typed array ready to be json_encoded Socialveo\Core\models\SocialveoModel
updateFields() Update only custom fields Socialveo\Core\models\SocialveoModel
userHasAccess() Returns true if user has access to resource, otherwise false Socialveo\Core\models\SocialveoModel
validation() Validations Socialveo\Core\models\Payment
writeAttribute() Write attribute using setter Socialveo\Core\models\SocialveoModel

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
_postSaveRelatedRecords() Override default method for turn off auto-updating related records Socialveo\Core\models\SocialveoModel
_preSaveRelatedRecords() Override default method for turn off auto-updating related records Socialveo\Core\models\SocialveoModel
afterFetch() After fetch hook Socialveo\Core\models\SocialveoModel
afterSave() After save hook Socialveo\Core\models\SocialveoModel
afterUpdate() After update hook Socialveo\Core\models\SocialveoModel
beforeCreate() Before create hook Socialveo\Core\models\SocialveoModel
beforeDelete() Before delete hook Socialveo\Core\models\SocialveoModel
beforeSave() Before save hook Socialveo\Core\models\SocialveoModel
beforeUpdate() Before update hook Socialveo\Core\models\SocialveoModel
getUser() Returns user model of the currently logged in (or passed-in) user Socialveo\Core\models\SocialveoModel

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
ACTIVE_DELETE 0 Delete Socialveo\Core\models\SocialveoModel
ACTIVE_OK 1 Active Socialveo\Core\models\SocialveoModel
ACTIVE_PROCESS_PAYMENT 2 Payment process Socialveo\Core\models\SocialveoModel
CURRENCY_EUR 'eur' Socialveo\Core\models\Payment
CURRENCY_USD 'usd' Socialveo\Core\models\Payment
EVENT_JOIN_NETWORK_FAIL 'payment:joinNetworkFail' Socialveo\Core\models\Payment
EVENT_JOIN_NETWORK_SUCCESS 'payment:joinNetworkSuccess' Socialveo\Core\models\Payment
EVENT_NETWORK_FAIL 'payment:networkFail' Socialveo\Core\models\Payment
EVENT_NETWORK_SUCCESS 'payment:networkSuccess' Socialveo\Core\models\Payment
EVENT_USER_REGISTRATION_FAIL 'payment:userRegistrationFail' Socialveo\Core\models\Payment
EVENT_USER_REGISTRATION_SUCCESS 'payment:userRegistrationSuccess' Socialveo\Core\models\Payment
NAME_PAYPAL 'PayPal' Socialveo\Core\models\Payment
NAME_STRIPE 'Stripe' Socialveo\Core\models\Payment
PROCESSOR_FAIL 'fail' Socialveo\Core\models\Payment
PROCESSOR_PAID 'paid' Socialveo\Core\models\Payment
PROCESSOR_PAYMENT 'payment' Socialveo\Core\models\Payment
SCENARIO_DEFAULT 'default' Socialveo\Core\models\SocialveoModel
SCENARIO_DELETE 'delete' Socialveo\Core\models\SocialveoModel
SCENARIO_PAYMENT 'payment' Socialveo\Core\models\SocialveoModel
SCENARIO_SAVE_USER 'save_user' Socialveo\Core\models\SocialveoModel
SCENARIO_SKIP_VALIDATION 'skip_validation' Socialveo\Core\models\SocialveoModel
SERVICE_PAYPAL 'paypal' Socialveo\Core\models\Payment
SERVICE_STRIPE 'stripe' Socialveo\Core\models\Payment
STATUS_ACTIVE 1 Socialveo\Core\models\Payment
STATUS_CANCELED 2 Socialveo\Core\models\Payment
STATUS_FAIL 3 Socialveo\Core\models\Payment
STATUS_PAST_DUE 4 Socialveo\Core\models\Payment
STATUS_PENDING 5 Socialveo\Core\models\Payment
STATUS_REFUNDED 6 Socialveo\Core\models\Payment
STATUS_UNPAID 0 Socialveo\Core\models\Payment
SUBSCRIPTION_FOREVER 'forever' Socialveo\Core\models\Payment
SUBSCRIPTION_MONTH 'month' Socialveo\Core\models\Payment
SUBSCRIPTION_ONE_TIME 'one-time' Socialveo\Core\models\Payment
SUBSCRIPTION_STATUS_ACTIVE 1 Socialveo\Core\models\Payment
SUBSCRIPTION_STATUS_CANCEL 2 Socialveo\Core\models\Payment
SUBSCRIPTION_STATUS_NO 0 Socialveo\Core\models\Payment
SUBSCRIPTION_YEAR 'year' Socialveo\Core\models\Payment
TARGET_CONNECTION 'connection' Socialveo\Core\models\Payment
TARGET_NETWORK 'network' Socialveo\Core\models\Payment
TARGET_USER 'user' Socialveo\Core\models\Payment
TYPE_JOIN_PREMIUM_NETWORK 'join_premium_network' Socialveo\Core\models\Payment
TYPE_PREMIUM_ACCOUNT 'premium_account' Socialveo\Core\models\Payment
TYPE_PREMIUM_NETWORK 'premium_network' Socialveo\Core\models\Payment
TYPE_REGISTRATION 'registration' Socialveo\Core\models\Payment

Property Details

$active public property (available since version 1.0)
public integer $active null
$amount public property (available since version 1.0)
public double $amount null
$created public property (available since version 1.0)
public integer $created null
$currency public property (available since version 1.0)
public string $currency null
$description public property (available since version 1.0)
public string $description null
$end_at public property (available since version 1.0)
public integer $end_at null
$id public property (available since version 1.0)
public integer $id null
$period public property (available since version 1.0)
public string $period null
$properties public property (available since version 1.0)
public stdClass|string $properties null
$service public property (available since version 1.0)
public string $service null
$status public property (available since version 1.0)
public integer $status null
$subscription_status public property (available since version 1.0)
$target_id public property (available since version 1.0)
public integer $target_id null
$target_type public property (available since version 1.0)
public string $target_type null
$target_uuid public property (available since version 1.0)
public string $target_uuid null
$type public property (available since version 1.0)
public string $type null
$updated public property (available since version 1.0)
public integer $updated null
$user_id public property (available since version 1.0)
public integer $user_id null
$user_uuid public property (available since version 1.0)
public string $user_uuid null
$uuid public property (available since version 1.0)
public string $uuid null

Method Details

behaviors() public method

public array behaviors ( )
generateHash() public method

public string generateHash ( )
getAdapter() public method (available since version 1.0)

Returns payment adapter

public Socialveo\Core\library\payment\adapter\PaymentAdapter|Socialveo\Core\library\payment\adapter\StripeAdapter|Socialveo\Core\library\payment\adapter\PayPalAdapter getAdapter ( )
throws Exception
getIsOk() public method

Returns true if is payment ok

public boolean getIsOk ( )
getLastHistory() public method

Get last payment history

public Socialveo\Core\models\PaymentHistory getLastHistory ( )
getLinkPayment() public method

public string getLinkPayment ( )
getLogger() public static method

Returns logger if it enabled

public static Phalcon\Logger\Adapter\File|boolean getLogger ( )
getPaymentsByUser() public static method (available since version 1.0)

Returns a list of payments of a given user

public static Phalcon\Mvc\Model\Resultset\Simple getPaymentsByUser ( $user_uuid, $params )
$user_uuid string
$params array
throws Exception
getPlansPrices() public static method

Get plans prices

public static array getPlansPrices ( $service, $target null )
$service string
$target Socialveo\Core\models\Network|Socialveo\Core\models\User|Socialveo\Core\models\Connection

[optional]

throws Exception
getServiceAdapters() public static method (available since version 1.0)

All available adapters

public static Socialveo\Core\library\payment\adapter\PaymentAdapter[] getServiceAdapters ( )
getServicePlans() public static method

Returns service plans

public static array getServicePlans ( $service, $target null, &$currency null, &$feeConfig null )
$service string
$target Socialveo\Core\models\Network|Socialveo\Core\models\User|Socialveo\Core\models\Connection

[optional]

$currency string|array

[optional] Reference, returns currency data

$feeConfig array|null
getSource() public method (available since version 1.0)

Define table mapping

public string getSource ( )
getStatusString() public method

Get status string

public string getStatusString ( )
getStatusType() public method

Get status type

public string getStatusType ( )
getStatusesString() public static method

Returns payments statuses

public static array getStatusesString ( )
getStatusesTypes() public static method

Returns payments types statuses

public static array getStatusesTypes ( )
getStringStatus() public method

Get string status

public integer|null getStringStatus ( )
getStringStatuses() public static method

Get string statuses

public static array getStringStatuses ( )
throws Exception
getTarget() public method

Get target

public Socialveo\Core\models\Network|Socialveo\Core\models\Connection|Socialveo\Core\models\User getTarget ( )
getTargetTypes() public static method

Get target types

public static array getTargetTypes ( )
getTargetUrl() public method

Returns target url

public string getTargetUrl ( )
initialize() public method (available since version 1.0)

Initialize method for model

public void initialize ( )
isServiceEnabled() public static method

Whatever service is paid

public static boolean isServiceEnabled ( $service, $target null )
$service string
$target Socialveo\Core\models\Network|Socialveo\Core\models\User|Socialveo\Core\models\Connection

[optional]

log() public static method

Writes a message to the log

public static void log ( $type, $message, $data null )
$type string
$message string
$data array
validation() public method (available since version 1.0)

Validations

public boolean|void validation ( )