Open Journal Systems  3.3.0
Payment Class Reference
Inheritance diagram for Payment:
CompletedPayment QueuedPayment

Public Member Functions

 __construct ($amount=null, $currencyCode=null, $userId=null, $assocId=null)
 
 getAmount ()
 
 getAssocId ()
 
 getContextId ()
 
 getCurrencyCode ()
 
 getId ()
 
 getType ()
 
 getUserId ()
 
 setAmount ($amount)
 
 setAssocId ($assocId)
 
 setContextId ($contextId)
 
 setCurrencyCode ($currencyCode)
 
 setId ($paymentId)
 
 setType ($type)
 
 setUserId ($userId)
 

Data Fields

 $_type
 
 $amount
 
 $assocId
 
 $contextId
 
 $currencyCode
 
 $paymentId
 
 $userId
 

Detailed Description

Abstract class for payments.

DOES NOT inherit from DataObject for the sake of concise serialization

Definition at line 23 of file Payment.inc.php.

Constructor & Destructor Documentation

◆ __construct()

Payment::__construct (   $amount = null,
  $currencyCode = null,
  $userId = null,
  $assocId = null 
)

Constructor

Parameters
$amountnumber
$currencyCodestring
$userIdint
$assocIdint optional

Reimplemented in QueuedPayment.

Definition at line 73 of file Payment.inc.php.

References $amount, $assocId, $currencyCode, and $userId.

Member Function Documentation

◆ getAmount()

Payment::getAmount ( )

Get the payment amount

Returns
numeric

Definition at line 110 of file Payment.inc.php.

References $amount.

◆ getAssocId()

Payment::getAssocId ( )

Get the association ID for the payment.

Returns
int

Definition at line 194 of file Payment.inc.php.

References $assocId.

◆ getContextId()

Payment::getContextId ( )

Get the context ID for the payment.

Returns
int

Definition at line 135 of file Payment.inc.php.

References $contextId.

◆ getCurrencyCode()

Payment::getCurrencyCode ( )

Get the currency code for the transaction (ISO 4217)

Returns
string

Definition at line 127 of file Payment.inc.php.

References $currencyCode.

◆ getId()

Payment::getId ( )

Get the row id of the payment.

Returns
int

Definition at line 84 of file Payment.inc.php.

References $paymentId.

◆ getType()

Payment::getType ( )

Get the type of this payment (PAYMENT_TYPE_...)

Returns
int PAYMENT_TYPE_...

Definition at line 160 of file Payment.inc.php.

◆ getUserId()

Payment::getUserId ( )

Get the user ID of the customer.

Returns
int

Definition at line 177 of file Payment.inc.php.

References $userId.

◆ setAmount()

Payment::setAmount (   $amount)

Set the payment amount

Parameters
$amountnumeric
Returns
numeric new amount

Definition at line 102 of file Payment.inc.php.

References $amount.

◆ setAssocId()

Payment::setAssocId (   $assocId)

Set the association ID for the payment.

Parameters
$assocIdint
Returns
int New association ID

Definition at line 186 of file Payment.inc.php.

References $assocId.

◆ setContextId()

Payment::setContextId (   $contextId)

Set the context ID for the payment.

Parameters
$contextIdint

Definition at line 143 of file Payment.inc.php.

References $contextId.

◆ setCurrencyCode()

Payment::setCurrencyCode (   $currencyCode)

Set the currency code for the transaction (ISO 4217)

Parameters
$currencyCodestring
Returns
string new currency code

Definition at line 119 of file Payment.inc.php.

References $currencyCode.

◆ setId()

Payment::setId (   $paymentId)

Set the id of payment

Parameters
$paymentIdint
Returns
int new payment id

Definition at line 93 of file Payment.inc.php.

References $paymentId.

◆ setType()

Payment::setType (   $type)

Set the type for this payment (PAYMENT_TYPE_...)

Parameters
$typeint PAYMENT_TYPE_...
Returns
int New payment type

Definition at line 152 of file Payment.inc.php.

◆ setUserId()

Payment::setUserId (   $userId)

Set the user ID of the customer.

Parameters
$userIdint
Returns
int New user ID

Definition at line 169 of file Payment.inc.php.

References $userId.

Field Documentation

◆ $_type

int Payment::$_type

PAYMENT_TYPE_...

Definition at line 64 of file Payment.inc.php.

◆ $amount

numeric Payment::$amount

amount of payment in $currencyCode units

Definition at line 40 of file Payment.inc.php.

Referenced by QueuedPayment\__construct(), __construct(), getAmount(), and setAmount().

◆ $assocId

int Payment::$assocId

association ID for payment

Definition at line 58 of file Payment.inc.php.

Referenced by QueuedPayment\__construct(), __construct(), getAssocId(), and setAssocId().

◆ $contextId

int Payment::$contextId

Context ID

Definition at line 34 of file Payment.inc.php.

Referenced by getContextId(), and setContextId().

◆ $currencyCode

string Payment::$currencyCode

ISO 4217 alpha currency code

Definition at line 46 of file Payment.inc.php.

Referenced by QueuedPayment\__construct(), __construct(), getCurrencyCode(), and setCurrencyCode().

◆ $paymentId

int Payment::$paymentId

payment id

Definition at line 28 of file Payment.inc.php.

Referenced by getId(), and setId().

◆ $userId

int Payment::$userId

user ID of customer making payment

Definition at line 52 of file Payment.inc.php.

Referenced by QueuedPayment\__construct(), __construct(), getUserId(), and setUserId().


The documentation for this class was generated from the following file: