Cheetah
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ChPmtModule Class Reference
Inheritance diagram for ChPmtModule:
ChWsbModule

Public Member Functions

 __construct ($aModule)
 
 getExtraJs ($sType)
 
 getMoreWindow ()
 
 getManualOrderWindow ()
 
 getOrdersBlock ($sType, $iUserId=CH_PMT_EMPTY_ID)
 
 serviceGetOrdersUrl ()
 
 actionGetItems ($iModuleId)
 
 actionGetOrder ()
 
 actionGetOrders ()
 
 actionManualOrderSubmit ()
 
 actionOrdersSubmit ($sType)
 
 getDetailsForm ($iUserId=CH_PMT_EMPTY_ID)
 
 serviceGetCurrencyInfo ()
 
 serviceGetAdmins ()
 
 getSettingsForm ($mixedResult)
 
 setSettings ($aData)
 
 serviceUpdateDependentModules ($sModuleUri='all', $bInstall=true)
 
 getCartHistory ($iVendorId)
 
 getCartContent ($mixedVendor=null)
 
 serviceGetCartJs ($bWrapped=true)
 
 serviceGetAddToCartJs ($iVendorId, $mixedModuleId, $iItemId, $iItemCount, $bNeedRedirect=false, $bWrapped=true)
 
 serviceGetAddToCartLink ($iVendorId, $mixedModuleId, $iItemId, $iItemCount, $bNeedRedirect=false)
 
 serviceGetCartItemCount ($iUserId, $iOldCount=0)
 
 serviceGetCartItems ()
 
 serviceGetCartUrl ()
 
 serviceGetCartItemDescriptor ($iVendorId, $iModuleId, $iItemId, $iItemCount)
 
 actionCartSubmit ()
 
 actionAddToCart ($iVendorId, $iModuleId, $iItemId, $iItemCount)
 
 serviceAddToCart ($iVendorId, $iModuleId, $iItemId, $iItemCount)
 
 actionDeleteFromCart ($iVendorId, $iModuleId, $iItemId)
 
 actionEmptyCart ($iVendorId)
 
 serviceGetProviders ($iVendorId, $sProvider='')
 
 serviceInitializeCheckout ($iVendorId, $sProvider, $aItems=array())
 
 initializeCheckout ($iVendorId, $sProvider, $aItems=array())
 
 actionFinalizeCheckout ($sProvider, $mixedVendorId="")
 
 actionCheckoutFinished ($sProvider, $mixedVendorId="")
 
 serviceGetTransactionsInfo ($aConditions)
 
 serviceGetOption ($sOption)
 
 serviceResponse ($oAlert)
 
 performJoin ($iPendingId, $aPayment=array())
 
 actionJoin ()
 
 _onProfileJoin ($iProfileId)
 
 _onResultAlert ($aResult)
 
 _onResultInline ($aResult)
 
 _onResultPage ($aResult)
 
- Public Member Functions inherited from ChWsbModule
 isLogged ()
 
 getUserId ()
 
 getUserPassword ()
 
 getTitleKey ($sUri)
 
 serviceGetBaseUrl ()
 

Public Attributes

 $_iUserId
 
 $_oDetails
 
 $_oCart
 
 $_oOrders
 
 $_aOrderTypes
 
 $_sGeneralPrefix
 
 $_sLangsPrefix
 
 $_sEmailTemplatesPrefix
 
- Public Attributes inherited from ChWsbModule
 $_aModule
 
 $_oDb
 
 $_oTemplate
 
 $_oConfig
 

Protected Attributes

 $_sSessionKeyPending
 
 $_sRequestKeyPending
 

Additional Inherited Members

- Static Public Member Functions inherited from ChWsbModule
static getInstance ($sClassName)
 
static getTitle ($sUri)
 

Detailed Description

Payment module by Cheetah

This module is needed to work with payment providers and organize the process of some item purchasing. Shopping Cart and Orders Manager are included.

Integration notes: To integrate your module with this one, you need:

  1. Get 'Add To Cart' button using serviceGetAddToCartLink service.
  2. Add info about your module in the 'ch_pmt_modules' table.
  3. Realize the following service methods in your Module class. a. serviceGetItems($iVendorId) - Is used in Orders Administration to get all products of the requested seller(vendor). b. serviceGetCartItem($iClientId, $iItemId) - Is used in Shopping Cart to get one product by specified id. c. serviceRegisterCartItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrderId) - Register purchased product. d. serviceUnregisterCartItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrderId) - Unregister the product purchased earlier.
    See also
    You may see an example of integration in Membership module.
    Profile's Wall: no spy events

Spy: no spy events

Memberships/ACL: Doesn't depend on user's membership.

Service methods:

Is used to get "Add to cart" link for some item(s) in your module.

See also
ChPmtModule::serviceGetAddToCartLink ChWsbService::call('payment', 'get_add_to_cart_link', array($iVendorId, $mixedModuleId, $iItemId, $iItemCount));

Check transaction(s) in database which satisty all conditions.

See also
ChPmtModule::serviceGetTransactionsInfo ChWsbService::call('payment', 'get_transactions_info', array($aConditions));

Get total count of items in Shopping Cart.

See also
ChPmtModule::serviceGetCartItemCount ChWsbService::call('payment', 'get_cart_item_count', array($iUserId, $iOldCount));
Note
is needed for internal usage(integration with member tool bar).

Get Shopping cart content.

See also
ChPmtModule::serviceGetCartItems ChWsbService::call('payment', 'get_cart_items');
Note
is needed for internal usage(integration with member tool bar).

Alerts: no alerts available

Definition at line 78 of file ChPmtModule.php.

Constructor & Destructor Documentation

◆ __construct()

ChPmtModule::__construct (   $aModule)

Constructor

Reimplemented from ChWsbModule.

Definition at line 95 of file ChPmtModule.php.

Member Function Documentation

◆ _onProfileJoin()

ChPmtModule::_onProfileJoin (   $iProfileId)

Private Methods of Common Usage

Definition at line 823 of file ChPmtModule.php.

◆ _onResultAlert()

ChPmtModule::_onResultAlert (   $aResult)

Definition at line 842 of file ChPmtModule.php.

◆ _onResultInline()

ChPmtModule::_onResultInline (   $aResult)

Definition at line 846 of file ChPmtModule.php.

◆ _onResultPage()

ChPmtModule::_onResultPage (   $aResult)

Definition at line 858 of file ChPmtModule.php.

◆ actionAddToCart()

ChPmtModule::actionAddToCart (   $iVendorId,
  $iModuleId,
  $iItemId,
  $iItemCount 
)

Definition at line 511 of file ChPmtModule.php.

◆ actionCartSubmit()

ChPmtModule::actionCartSubmit ( )

Definition at line 486 of file ChPmtModule.php.

◆ actionCheckoutFinished()

ChPmtModule::actionCheckoutFinished (   $sProvider,
  $mixedVendorId = "" 
)

Definition at line 672 of file ChPmtModule.php.

◆ actionDeleteFromCart()

ChPmtModule::actionDeleteFromCart (   $iVendorId,
  $iModuleId,
  $iItemId 
)

Isn't used yet.

Definition at line 525 of file ChPmtModule.php.

◆ actionEmptyCart()

ChPmtModule::actionEmptyCart (   $iVendorId)

Isn't used yet.

Definition at line 535 of file ChPmtModule.php.

◆ actionFinalizeCheckout()

ChPmtModule::actionFinalizeCheckout (   $sProvider,
  $mixedVendorId = "" 
)

Definition at line 638 of file ChPmtModule.php.

◆ actionGetItems()

ChPmtModule::actionGetItems (   $iModuleId)

Definition at line 173 of file ChPmtModule.php.

◆ actionGetOrder()

ChPmtModule::actionGetOrder ( )

Definition at line 186 of file ChPmtModule.php.

◆ actionGetOrders()

ChPmtModule::actionGetOrders ( )

Definition at line 202 of file ChPmtModule.php.

◆ actionJoin()

ChPmtModule::actionJoin ( )

Definition at line 754 of file ChPmtModule.php.

◆ actionManualOrderSubmit()

ChPmtModule::actionManualOrderSubmit ( )

Definition at line 235 of file ChPmtModule.php.

◆ actionOrdersSubmit()

ChPmtModule::actionOrdersSubmit (   $sType)

Definition at line 252 of file ChPmtModule.php.

◆ getCartContent()

ChPmtModule::getCartContent (   $mixedVendor = null)

Definition at line 395 of file ChPmtModule.php.

◆ getCartHistory()

ChPmtModule::getCartHistory (   $iVendorId)

Cart Processing Methods

Definition at line 385 of file ChPmtModule.php.

◆ getDetailsForm()

ChPmtModule::getDetailsForm (   $iUserId = CH_PMT_EMPTY_ID)

Payment Details Methods

Definition at line 302 of file ChPmtModule.php.

◆ getExtraJs()

ChPmtModule::getExtraJs (   $sType)

Public Methods of Common Usage

Definition at line 137 of file ChPmtModule.php.

◆ getManualOrderWindow()

ChPmtModule::getManualOrderWindow ( )

Definition at line 158 of file ChPmtModule.php.

◆ getMoreWindow()

ChPmtModule::getMoreWindow ( )

Manage Orders Methods

Definition at line 154 of file ChPmtModule.php.

◆ getOrdersBlock()

ChPmtModule::getOrdersBlock (   $sType,
  $iUserId = CH_PMT_EMPTY_ID 
)

Definition at line 162 of file ChPmtModule.php.

◆ getSettingsForm()

ChPmtModule::getSettingsForm (   $mixedResult)

Admin Settings Methods

Definition at line 334 of file ChPmtModule.php.

◆ initializeCheckout()

ChPmtModule::initializeCheckout (   $iVendorId,
  $sProvider,
  $aItems = array() 
)

Definition at line 570 of file ChPmtModule.php.

◆ performJoin()

ChPmtModule::performJoin (   $iPendingId,
  $aPayment = array() 
)

Join Methods

Definition at line 734 of file ChPmtModule.php.

◆ serviceAddToCart()

ChPmtModule::serviceAddToCart (   $iVendorId,
  $iModuleId,
  $iItemId,
  $iItemCount 
)

Definition at line 518 of file ChPmtModule.php.

◆ serviceGetAddToCartJs()

ChPmtModule::serviceGetAddToCartJs (   $iVendorId,
  $mixedModuleId,
  $iItemId,
  $iItemCount,
  $bNeedRedirect = false,
  $bWrapped = true 
)

Definition at line 422 of file ChPmtModule.php.

◆ serviceGetAddToCartLink()

ChPmtModule::serviceGetAddToCartLink (   $iVendorId,
  $mixedModuleId,
  $iItemId,
  $iItemCount,
  $bNeedRedirect = false 
)

Definition at line 435 of file ChPmtModule.php.

◆ serviceGetAdmins()

ChPmtModule::serviceGetAdmins ( )

Definition at line 313 of file ChPmtModule.php.

◆ serviceGetCartItemCount()

ChPmtModule::serviceGetCartItemCount (   $iUserId,
  $iOldCount = 0 
)

Definition at line 448 of file ChPmtModule.php.

◆ serviceGetCartItemDescriptor()

ChPmtModule::serviceGetCartItemDescriptor (   $iVendorId,
  $iModuleId,
  $iItemId,
  $iItemCount 
)

Definition at line 482 of file ChPmtModule.php.

◆ serviceGetCartItems()

ChPmtModule::serviceGetCartItems ( )

Definition at line 464 of file ChPmtModule.php.

◆ serviceGetCartJs()

ChPmtModule::serviceGetCartJs (   $bWrapped = true)

Definition at line 418 of file ChPmtModule.php.

◆ serviceGetCartUrl()

ChPmtModule::serviceGetCartUrl ( )

Definition at line 475 of file ChPmtModule.php.

◆ serviceGetCurrencyInfo()

ChPmtModule::serviceGetCurrencyInfo ( )

Definition at line 306 of file ChPmtModule.php.

◆ serviceGetOption()

ChPmtModule::serviceGetOption (   $sOption)

Definition at line 707 of file ChPmtModule.php.

◆ serviceGetOrdersUrl()

ChPmtModule::serviceGetOrdersUrl ( )

Definition at line 166 of file ChPmtModule.php.

◆ serviceGetProviders()

ChPmtModule::serviceGetProviders (   $iVendorId,
  $sProvider = '' 
)

Payment Processing Methods

Definition at line 550 of file ChPmtModule.php.

◆ serviceGetTransactionsInfo()

ChPmtModule::serviceGetTransactionsInfo (   $aConditions)

Check transaction(s) in database which satisty all conditions.

Parameters
array$aConditionsan array of pears('key' => 'value'). Available keys are the following: a. order_id - internal order ID (string) b. client_id - client's ID (integer) c. seller_id - seller's ID (integer) d. module_id - modules's where the purchased product is located. (integer) e. item_id - item id in the database. (integer) f. date - the date when the payment was processed(UNIXTIME STAMP)
Returns
array of transactions. Each transaction has full info(client ID, seller ID, external transaction ID, date and so on)

Definition at line 702 of file ChPmtModule.php.

◆ serviceInitializeCheckout()

ChPmtModule::serviceInitializeCheckout (   $iVendorId,
  $sProvider,
  $aItems = array() 
)

Definition at line 563 of file ChPmtModule.php.

◆ serviceResponse()

ChPmtModule::serviceResponse (   $oAlert)

Definition at line 713 of file ChPmtModule.php.

◆ serviceUpdateDependentModules()

ChPmtModule::serviceUpdateDependentModules (   $sModuleUri = 'all',
  $bInstall = true 
)

Definition at line 363 of file ChPmtModule.php.

◆ setSettings()

ChPmtModule::setSettings (   $aData)

Definition at line 351 of file ChPmtModule.php.

Member Data Documentation

◆ $_aOrderTypes

ChPmtModule::$_aOrderTypes

Definition at line 84 of file ChPmtModule.php.

◆ $_iUserId

ChPmtModule::$_iUserId

Definition at line 80 of file ChPmtModule.php.

◆ $_oCart

ChPmtModule::$_oCart

Definition at line 82 of file ChPmtModule.php.

◆ $_oDetails

ChPmtModule::$_oDetails

Definition at line 81 of file ChPmtModule.php.

◆ $_oOrders

ChPmtModule::$_oOrders

Definition at line 83 of file ChPmtModule.php.

◆ $_sEmailTemplatesPrefix

ChPmtModule::$_sEmailTemplatesPrefix

Definition at line 87 of file ChPmtModule.php.

◆ $_sGeneralPrefix

ChPmtModule::$_sGeneralPrefix

Definition at line 85 of file ChPmtModule.php.

◆ $_sLangsPrefix

ChPmtModule::$_sLangsPrefix

Definition at line 86 of file ChPmtModule.php.

◆ $_sRequestKeyPending

ChPmtModule::$_sRequestKeyPending
protected

Definition at line 90 of file ChPmtModule.php.

◆ $_sSessionKeyPending

ChPmtModule::$_sSessionKeyPending
protected

Definition at line 89 of file ChPmtModule.php.


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