Exponent v2.7.2

paypalExpressCheckout extends billingcalculator
in package

This is the class expRecord

Tags
subpackage

Calculators

Table of Contents

PAYPAL_API_VERSION  = '124.0'
$attachable_items_to_save  : mixed
$classname  : mixed
$configdata  : mixed
$default_sort_direction  : mixed
$default_sort_field  : mixed
$do_not_validate  : mixed
$get_assoc_for  : mixed
$get_attachable_for  : mixed
$grouping_sql  : mixed
$has_and_belongs_to_many  : mixed
$has_and_belongs_to_self  : mixed
$has_extended_fields  : mixed
$has_many  : mixed
$has_many_self  : mixed
$has_one  : mixed
$identifier  : mixed
$needs_approval  : mixed
$payment_type  : mixed
$rank_by_field  : mixed
$supports_revisions  : mixed
$table  : mixed
$tablename  : mixed
$validate  : mixed
$validates  : mixed
$attachable_item_types  : mixed
$classinfo  : mixed
__construct()  : mixed
__get()  : null
Generic magic method
__isset()  : bool
Generic magic method
__set()  : mixed
Generic magic method We MUST create/set non-existing properties for Exponent code to work
__unset()  : mixed
Generic magic method
afterCreate()  : mixed
after creating item
afterDelete()  : mixed
is run after deleting item, should delete associated items here if needed
afterSave()  : mixed
after saving item
afterUpdate()  : mixed
after updating item
afterValidation()  : mixed
after validating item
afterValidationOnCreate()  : mixed
after validating item during creation
afterValidationOnUpdate()  : mixed
after validating item during update
associateWith()  : mixed
get objects this item belongs to ??
attachItem()  : bool
attach to item
beforeCreate()  : mixed
before creating item
beforeDelete()  : mixed
is run before deleting item
beforeSave()  : mixed
before saving item
beforeUpdate()  : mixed
before updating item
beforeValidation()  : mixed
before validating item
beforeValidationOnCreate()  : mixed
before validating item during creation
beforeValidationOnUpdate()  : mixed
before validating item during update
build()  : mixed
Adds table fields as class properties to current "record" class.
captureEnabled()  : mixed
checkout()  : object
Called for checkout screen
configForm()  : string
Return path to calculator configuration form template
createBillingTransaction()  : mixed
Generate a new billing transaction record
credit_transaction()  : object
credit (refund) transaction
creditEnabled()  : mixed
deformatNVP()  : array<string|int, mixed>
A utility function that will take the Name-Value-Pair string returned by PayPal API and create a multi-deminsional array matching up related data where appropriate Note that this is Paypal speciific as we need to do some funky things to match related data.
delayed_capture()  : object
capture (delayed) transaction
delete()  : void
This is called when a billing method is deleted. It can be used to clean up if you have any custom user_data storage.
description()  : string
The description that will be displayed in the payment methods selector admin screen
displayname()  : string
name of model
find()  : array<string|int, mixed>|int|object
find an item or items
findBy()  : array<string|int, mixed>
find an item by column
findValue()  : array<string|int, mixed>|bool
find a value(s) by column
findWhereAttachedTo()  : array<string|int, mixed>
this function finds models that have this attachable item attached
getAssociatedObjects()  : null
get item's associated objects
getAttachableItemTables()  : array<string|int, mixed>
used for import/export
getAVSAddressVerified()  : string
Return AVS Address Verified code
getAVSZipVerified()  : string
Return AVS Zip Verified code
getCalcName()  : string
Return billing calculator name
getCalcTitle()  : string
Return billing calculator title
getCVVMatched()  : string
Return CVV Matched code
getDefault()  : int
Return default billing calculator
getPaymentAuthorizationNumber()  : string
Return the stored payment authorization number
getPaymentMethod()  : string|null
Return the payment method, normally the calculator name
getPaymentReferenceNumber()  : string
Return the stored payment reference number
getPaymentStatus()  : string
Return the payment status
getPoster()  : null|string
return the item poster
getTimestamp()  : mixed
return the item timestamp
hasConfig()  : mixed
hasUserForm()  : bool
Does this billing calculator have a User Form?
isOffsite()  : bool
Does this billing calculator take the user offsite?
isRestricted()  : mixed
isSearchable()  : bool
is model content searchable?
isSelectable()  : bool
Is this billing calculator selectable in the payment methods. It may not be if it is meant more as base class for other calculators to extend from
makeSefUrl()  : mixed
make an sef_url for item
name()  : string
The name that will be displayes in the payment methods selector admin screen.
parseConfig()  : array<string|int, mixed>
process config form
paypalApiCall()  : array<string|int, mixed>
A utility a call to Paypal's api CURL
postProcess()  : mixed
Perform any post process actions after the order has been finalized
preprocess()  : mixed
For paypal this will call out to the PP api and get a token then redirect to PP.
process()  : object
process transaction
refresh()  : bool
re-construct the item from the database
rerank()  : mixed
rerank items
save()  : mixed
save item
saveAssociatedObjects()  : mixed
save associated objects
showOptions()  : mixed
update()  : mixed
update item
userForm()  : string
Build user input form
userFormUpdate()  : object
Process user input. This function should return an object of the user input.
userView()  : string
Returns html to display user data.
validate()  : bool
validate item sef_url
void_transaction()  : object
void transaction
voidEnabled()  : mixed
checkForAttachableItems()  : bool
check for what objects may be attached
getAttachableItems()  : mixed
get attached objects for this item
getAssociatedObjectsForThisModel()  : mixed
gets associated objects for this model
makeManyToManyTablename()  : string
create a many to many table relationship

Constants

Properties

$attachable_items_to_save

public mixed $attachable_items_to_save

$default_sort_direction

public mixed $default_sort_direction = ''

$default_sort_field

public mixed $default_sort_field = ''

$do_not_validate

public mixed $do_not_validate = array()

$get_assoc_for

public mixed $get_assoc_for = array()

$get_attachable_for

public mixed $get_attachable_for = array()

$grouping_sql

public mixed $grouping_sql = ''

$has_and_belongs_to_many

public mixed $has_and_belongs_to_many = array()

$has_and_belongs_to_self

public mixed $has_and_belongs_to_self = array()

$has_extended_fields

public mixed $has_extended_fields = array()

$has_many_self

public mixed $has_many_self = array()

$needs_approval

public mixed $needs_approval = \false

$rank_by_field

public mixed $rank_by_field = ''

$supports_revisions

public mixed $supports_revisions = \false

$validates

public mixed $validates = array()

$attachable_item_types

protected mixed $attachable_item_types = array()

$classinfo

protected mixed $classinfo = \null

Methods

__construct()

public __construct([null $params = null ][, bool $get_assoc = true ][, bool $get_attached = true ]) : mixed
Parameters
$params : null = null
$get_assoc : bool = true
$get_attached : bool = true
Tags
throws
ReflectionException
Return values
mixed —

__get()

Generic magic method

public __get( $property) : null
Parameters
$property :
Return values
null —

__isset()

Generic magic method

public __isset( $property) : bool
Parameters
$property :
Return values
bool —

__set()

Generic magic method We MUST create/set non-existing properties for Exponent code to work

public __set( $property,  $value) : mixed
Parameters
$property :
$value :
Return values
mixed —

__unset()

Generic magic method

public __unset( $property) : mixed
Parameters
$property :
Return values
mixed —

afterCreate()

after creating item

public afterCreate() : mixed
Return values
mixed —

afterDelete()

is run after deleting item, should delete associated items here if needed

public afterDelete() : mixed
Return values
mixed —

afterSave()

after saving item

public afterSave() : mixed
Return values
mixed —

afterUpdate()

after updating item

public afterUpdate() : mixed
Return values
mixed —

afterValidation()

after validating item

public afterValidation() : mixed
Return values
mixed —

afterValidationOnCreate()

after validating item during creation

public afterValidationOnCreate() : mixed
Return values
mixed —

afterValidationOnUpdate()

after validating item during update

public afterValidationOnUpdate() : mixed
Return values
mixed —

associateWith()

get objects this item belongs to ??

public associateWith( $datatype,  $id) : mixed

Type of associations has_and_belongs_to_many

Parameters
$datatype :
$id :
Return values
mixed —

attachItem()

attach to item

public attachItem( $item[, string $subtype = '' ][, bool $replace = true ]) : bool
Parameters
$item :
$subtype : string = ''
$replace : bool = true
Return values
bool —

beforeCreate()

before creating item

public beforeCreate() : mixed
Return values
mixed —

beforeDelete()

is run before deleting item

public beforeDelete() : mixed
Return values
mixed —

beforeSave()

before saving item

public beforeSave() : mixed
Return values
mixed —

beforeUpdate()

before updating item

public beforeUpdate() : mixed
Return values
mixed —

beforeValidation()

before validating item

public beforeValidation() : mixed
Return values
mixed —

beforeValidationOnCreate()

before validating item during creation

public beforeValidationOnCreate() : mixed
Return values
mixed —

beforeValidationOnUpdate()

before validating item during update

public beforeValidationOnUpdate() : mixed
Return values
mixed —

build()

Adds table fields as class properties to current "record" class.

public build([mixed $params = array() ]) : mixed

Loads Table schema data and creates new class properties based upon the fields in given table.

Additionally, if a record ID is given, that record is pulled and field values are also populated into class properties.

Parameters
$params : mixed = array()

array or Object for table selection

Tags
category

db_record

uses

[db_type]::getDataDefinition() Builds a data definition from existing table.

requires

$db

access

protected

final
PHPUnit

Not Defined

global

object $db

Return values
mixed —

checkout()

Called for checkout screen

public checkout(billingmethod $method, mixed $opts, array<string|int, mixed> $params, order $order) : object
Parameters
$method : billingmethod
$opts : mixed
$params : array<string|int, mixed>
$order : order
Return values
object —

configForm()

Return path to calculator configuration form template

public configForm() : string
Return values
string —

createBillingTransaction()

Generate a new billing transaction record

public createBillingTransaction( $method,  $amount,  $result,  $trax_state) : mixed
Parameters
$method :
$amount :
$result :
$trax_state :
Return values
mixed —

deformatNVP()

A utility function that will take the Name-Value-Pair string returned by PayPal API and create a multi-deminsional array matching up related data where appropriate Note that this is Paypal speciific as we need to do some funky things to match related data.

public deformatNVP(string $nvpstr) : array<string|int, mixed>
Parameters
$nvpstr : string

The nvp string returned by paypal.

Return values
array<string|int, mixed> —

delete()

This is called when a billing method is deleted. It can be used to clean up if you have any custom user_data storage.

public delete([string $where = '' ]) : void
Parameters
$where : string = ''
Return values
void —

description()

The description that will be displayed in the payment methods selector admin screen

public description() : string
Return values
string —

A short description

displayname()

name of model

public static displayname() : string
Return values
string —

find()

find an item or items

public find([string $range = 'all' ][, null $where = null ][, null $order = null ][, null $limit = null ], int $limitstart[, bool $get_assoc = true ][, bool $get_attached = true ][, array<string|int, mixed> $except = array() ][, bool $cascade_except = false ]) : array<string|int, mixed>|int|object
Parameters
$range : string = 'all'

// all, revisions, first, bytitle, count, bytag, bycat,

$where : null = null
$order : null = null
$limit : null = null
$limitstart : int
$get_assoc : bool = true
$get_attached : bool = true
$except : array<string|int, mixed> = array()
$cascade_except : bool = false
Return values
array<string|int, mixed>|int|object —

findBy()

find an item by column

public findBy( $column,  $value[, bool $get_assoc = true ][, bool $get_attached = true ][, array<string|int, mixed> $except = array() ][, bool $cascade_except = false ]) : array<string|int, mixed>
Parameters
$column :
$value :
$get_assoc : bool = true
$get_attached : bool = true
$except : array<string|int, mixed> = array()
$cascade_except : bool = false
Return values
array<string|int, mixed> —

findValue()

find a value(s) by column

public findValue([string $range = 'all' ][, string $column = null ][, string $where = null ][, string $order = null ][, bool $distinct = false ]) : array<string|int, mixed>|bool
Parameters
$range : string = 'all'
$column : string = null
$where : string = null
$order : string = null
$distinct : bool = false
Return values
array<string|int, mixed>|bool —

findWhereAttachedTo()

this function finds models that have this attachable item attached

public findWhereAttachedTo( $content_type) : array<string|int, mixed>
Parameters
$content_type :
Return values
array<string|int, mixed> —

getAssociatedObjects()

get item's associated objects

public getAssociatedObjects([object $obj = null ]) : null

Type of associations has_one has_many has_and_belongs_to_many

Parameters
$obj : object = null
Return values
null —

getAttachableItemTables()

used for import/export

public getAttachableItemTables() : array<string|int, mixed>
Return values
array<string|int, mixed> —

getAVSAddressVerified()

Return AVS Address Verified code

public getAVSAddressVerified(mixed $billingmethod) : string
Parameters
$billingmethod : mixed
Return values
string —

getAVSZipVerified()

Return AVS Zip Verified code

public getAVSZipVerified(mixed $billingmethod) : string
Parameters
$billingmethod : mixed
Return values
string —

getCalcName()

Return billing calculator name

public static getCalcName( $calc_id) : string
Parameters
$calc_id :
Return values
string —

getCalcTitle()

Return billing calculator title

public static getCalcTitle( $calc_id) : string
Parameters
$calc_id :
Return values
string —

getCVVMatched()

Return CVV Matched code

public getCVVMatched(mixed $billingmethod) : string
Parameters
$billingmethod : mixed
Return values
string —

getDefault()

Return default billing calculator

public static getDefault() : int
Return values
int —

getPaymentAuthorizationNumber()

Return the stored payment authorization number

public getPaymentAuthorizationNumber(mixed $billingmethod) : string
Parameters
$billingmethod : mixed
Return values
string —

getPaymentMethod()

Return the payment method, normally the calculator name

public getPaymentMethod( $billingmethod) : string|null
Parameters
$billingmethod :
Return values
string|null —

getPaymentReferenceNumber()

Return the stored payment reference number

public getPaymentReferenceNumber(mixed $billingmethod) : string
Parameters
$billingmethod : mixed
Return values
string —

getPaymentStatus()

Return the payment status

public getPaymentStatus(mixed $billingmethod) : string
Parameters
$billingmethod : mixed
Return values
string —

getPoster()

return the item poster

public getPoster([null $display = null ]) : null|string
Parameters
$display : null = null
Return values
null|string —

getTimestamp()

return the item timestamp

public getTimestamp(int $type) : mixed
Parameters
$type : int
Return values
mixed —

hasUserForm()

Does this billing calculator have a User Form?

public hasUserForm() : bool
Return values
bool —

isOffsite()

Does this billing calculator take the user offsite?

public isOffsite() : bool
Return values
bool —

isSearchable()

is model content searchable?

public static isSearchable() : bool
Return values
bool —

isSelectable()

Is this billing calculator selectable in the payment methods. It may not be if it is meant more as base class for other calculators to extend from

public isSelectable() : bool
Return values
bool —

makeSefUrl()

make an sef_url for item

public makeSefUrl() : mixed
Return values
mixed —

name()

The name that will be displayes in the payment methods selector admin screen.

public name() : string
Return values
string —

Then name of the billing calculator

parseConfig()

process config form

public parseConfig(mixed $values) : array<string|int, mixed>
Parameters
$values : mixed
Return values
array<string|int, mixed> —

paypalApiCall()

A utility a call to Paypal's api CURL

public paypalApiCall(array<string|int, mixed> $apiParams) : array<string|int, mixed>
Parameters
$apiParams : array<string|int, mixed>

an Associative array of the name-value pairs that will be sent as url params to the paypal api

Return values
array<string|int, mixed> —

An associative array containing the PayPal response or a curl error.

postProcess()

Perform any post process actions after the order has been finalized

public postProcess(order $order, array<string|int, mixed> $params) : mixed
Parameters
$order : order
$params : array<string|int, mixed>
Return values
mixed —

preprocess()

For paypal this will call out to the PP api and get a token then redirect to PP.

public preprocess(billingmethod $billingmethod, mixed $opts, array<string|int, mixed> $params, order $order) : mixed

PP then redirects back the site with token in the url. We can pick up that token from the url such that if we already have it we'll call another PP api to get the details and make it match up to the order.

Parameters
$billingmethod : billingmethod

The billing method information for this user

$opts : mixed
$params : array<string|int, mixed>

The url prameters, as if sef was off.

$order : order
Return values
mixed —

An object indicating pass of failure.

process()

process transaction

public process(billingmethod $billingmethod, mixed $opts, array<string|int, mixed> $params, order $order) : object
Parameters
$billingmethod : billingmethod
$opts : mixed
$params : array<string|int, mixed>
$order : order
Return values
object —

refresh()

re-construct the item from the database

public refresh() : bool
Tags
throws
ReflectionException
Return values
bool —

rerank()

rerank items

public rerank( $direction[, string $where = '' ]) : mixed
Parameters
$direction :
$where : string = ''
Return values
mixed —

save()

save item

public save([bool $validate = false ][, bool $force_no_revisions = false ]) : mixed
Parameters
$validate : bool = false
$force_no_revisions : bool = false
Return values
mixed —

saveAssociatedObjects()

save associated objects

public saveAssociatedObjects() : mixed

Type of associations has_one

Return values
mixed —

showOptions()

public showOptions() : mixed
Tags
deprecated
Return values
mixed —

update()

update item

public update([array<string|int, mixed>|object $params = array() ]) : mixed
Parameters
$params : array<string|int, mixed>|object = array()
Return values
mixed —

userForm()

Build user input form

public userForm([null $config_object = null ][, null $user_data = null ]) : string
Parameters
$config_object : null = null
$user_data : null = null
Return values
string —

userFormUpdate()

Process user input. This function should return an object of the user input.

public userFormUpdate( $params) : object

the returned object will be saved in the session and passed to post_process. If need be this could use another method of data storage, as long post_process can get the data.

Parameters
$params :
Return values
object —

userView()

Returns html to display user data.

public userView( $billingmethod) : string
Parameters
$billingmethod :
Return values
string —

validate()

validate item sef_url

public validate() : bool
Return values
bool —

checkForAttachableItems()

check for what objects may be attached

protected checkForAttachableItems( $params) : bool
Parameters
$params :
Return values
bool —

getAttachableItems()

get attached objects for this item

protected getAttachableItems() : mixed
Return values
mixed —

getAssociatedObjectsForThisModel()

gets associated objects for this model

private getAssociatedObjectsForThisModel([array<string|int, mixed> $except = array() ][, bool $cascade_except = false ]) : mixed

Type of associations has_extended_fields has_one has_many has_many_self has_and_belongs_to_many has_and_belongs_to_self

Parameters
$except : array<string|int, mixed> = array()
$cascade_except : bool = false
Return values
mixed —

makeManyToManyTablename()

create a many to many table relationship

private makeManyToManyTablename( $assoc_table) : string
Parameters
$assoc_table :
Return values
string —

Search results