Documentation

Shop_Payment_System_Handler
in package

AbstractYes

Online shop.

Tags
subpackage

Shop

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$_aDiscountPrices  : array<string|int, mixed>
$_adminMailContentType  : mixed
Content-type письма администратору о заказе
$_adminMailSubject  : mixed
Тема письма администратору о заказе
$_allowOrderPropertyFiles  : bool
Allow upload files for order's property
$_amount  : array<string|int, mixed>
$_amountPurchaseDiscount  : array<string|int, mixed>
$_applyDiscountCards  : bool
Apply Discount Cards
$_applyDiscounts  : bool
Round prices
$_aProperties  : array<string|int, mixed>
List of properties
$_aProperty_Dirs  : array<string|int, mixed>
Property directories
$_bonusMultiplier  : int
DEPRECATED as of HostCMS 6.9.2
$_from  : mixed
Адреса отправителя
$_notificationModes  : mixed
Массив с режимами, при использовании которых должно происходить уведомление о покупке - apply - применение изменений заказа из списка заказа, включая изменение статуса - edit - редактирование заказа - changeStatusPaid - изменение статуса оплаты из списка заказов - cancelPaid - отмена заказа
$_orderParams  : array<string|int, mixed>
Params of the order
$_quantity  : array<string|int, mixed>
$_quantityPurchaseDiscount  : array<string|int, mixed>
$_round  : bool
Round prices
$_senderName  : mixed
Имя отправителя
$_Shop_Payment_System_Model  : Shop_Payment_System_Model
Payment system
$_shopOrder  : mixed
Объект заказа
$_shopOrderBeforeAction  : mixed
Объект заказа до изменения.
$_siteuserMailContentType  : mixed
Content-type письма пользователю о заказе
$_siteuserMailSubject  : mixed
Тема письма пользователю о заказе
$_weight  : array<string|int, mixed>
$_xsl  : mixed
XSL данных о заказе
$_xslAdminMail  : mixed
XSL письма администратору о заказе
$_xslSiteuserMail  : mixed
XSL письма пользователю о заказе

Methods

__construct()  : mixed
Constructor.
adminMailContentType()  : self
Set Content-type of admin's e-mail
adminMailSubject()  : self
Set subject to shop's administrator e-mail
allowOrderPropertyFiles()  : self
Allow upload files for order's property
applyBonuses()  : self
Apply Bonuses
applyDiscountCards()  : self
Apply Discount Cards
applyDiscounts()  : self
Apply Discounts
applyPartialPayment()  : self
Apply Partial Payment by Siteuser's account
changedOrder()  : mixed
Уведомление об операциях с заказом
checkAfterContent()  : mixed
Call ->checkPaymentAfterContent() on each shop's Shop_Payment_System_Handlers
checkBeforeContent()  : mixed
Call ->checkPaymentBeforeContent() on each shop's Shop_Payment_System_Handlers
createNotification()  : self
Create Notifications
createOrder()  : mixed
Create a new order by $this->_orderParams
execute()  : mixed
Executes the business logic.
factory()  : mixed
Create instance of payment system
from()  : self
Set FROM
getAdminEmail()  : Core_Mail
Get admin e-mail
getAdminEmails()  : array<string|int, mixed>
Get array of admin emails
getInvoice()  : mixed
Get invoice form
getNotification()  : mixed
Get notification form
getShopOrder()  : Shop_Order_Model
Get Shop_Order Model
getShopOrderBeforeAction()  : Shop_Order_Model
Get order before change
getSiteuserEmail()  : Core_Mail
Get user mail
orderParams()  : self
Set order params
printInvoice()  : self
Shows invoice
printNotification()  : self
Shows notification
round()  : self
Round prices
send()  : mixed
Send emails about order
sendAdminEmail()  : self
Send e-mail to shop's administrator
senderName()  : self
Set subject to user e-mail
sendSiteuserEmail()  : self
Send e-mail to user
setMailSubjects()  : self
Set Mail Subjects
setNotificationModes()  : self
Set $this->_notificationModes
setXSLs()  : self
Set XSLs to e-mail
shopOrder()  : self
Set order
shopOrderBeforeAction()  : self
Set order before change
siteuserMailContentType()  : self
Set Content-type of user's e-mail
siteuserMailSubject()  : self
Set subject to user e-mail
userExecute()  : self
Клиентская логика обработки платежа
xsl()  : self
Set XSL for order data
xslAdminMail()  : self
Set XSL for admin's e-mail
xslSiteuserMail()  : self
Set XSL for user's e-mail
_addDelivery()  : self
Add a delivery into the order
_addPropertiesList()  : self
Add list of user's properties to XML
_addPurchaseDiscount()  : self
Add a discount to the purchase
_addShopDiscountcardBonusTransaction()  : self
Добавление транзакции со списанием бонусов, используется для возврата бонусов при отмене оплаты заказа
_applyBonuses()  : self
Backward compatibility, see applyBonuses()
_attachDigitalItems()  : self
Attach digital items to mail
_check()  : mixed
Protected method to call $methodName on each shop's Shop_Payment_System_Handlers
_createNotification()  : self
Backward compatibility, see createNotifications()
_getDeliveryName()  : string
Get delivery name
_getEmailFrom()  : string
Get sender email
_prepareXml()  : Shop_Model
Prepare XML
_processOrder()  : mixed
Создание нового заказа на основе данных, указанных в orderParams
_processXml()  : mixed
Process XML

Properties

$_aDiscountPrices

protected array<string|int, mixed> $_aDiscountPrices = array()

$_adminMailContentType

Content-type письма администратору о заказе

protected mixed $_adminMailContentType = 'text/html'

$_adminMailSubject

Тема письма администратору о заказе

protected mixed $_adminMailSubject = \NULL

$_allowOrderPropertyFiles

Allow upload files for order's property

protected bool $_allowOrderPropertyFiles = \FALSE

$_amount

protected array<string|int, mixed> $_amount = \NULL

$_amountPurchaseDiscount

protected array<string|int, mixed> $_amountPurchaseDiscount = \NULL

$_applyDiscountCards

Apply Discount Cards

protected bool $_applyDiscountCards = \TRUE

$_applyDiscounts

Round prices

protected bool $_applyDiscounts = \TRUE

$_aProperties

List of properties

protected array<string|int, mixed> $_aProperties = array()

$_aProperty_Dirs

Property directories

protected array<string|int, mixed> $_aProperty_Dirs = array()

$_bonusMultiplier

DEPRECATED as of HostCMS 6.9.2

protected int $_bonusMultiplier = 1

$_from

Адреса отправителя

protected mixed $_from = \NULL

$_notificationModes

Массив с режимами, при использовании которых должно происходить уведомление о покупке - apply - применение изменений заказа из списка заказа, включая изменение статуса - edit - редактирование заказа - changeStatusPaid - изменение статуса оплаты из списка заказов - cancelPaid - отмена заказа

protected mixed $_notificationModes = array('changeStatusPaid', 'edit')

$_orderParams

Params of the order

protected array<string|int, mixed> $_orderParams = \NULL

$_quantity

protected array<string|int, mixed> $_quantity = \NULL

$_quantityPurchaseDiscount

protected array<string|int, mixed> $_quantityPurchaseDiscount = \NULL

$_round

Round prices

protected bool $_round = \TRUE

$_senderName

Имя отправителя

protected mixed $_senderName = \NULL

$_shopOrder

Объект заказа

protected mixed $_shopOrder = \NULL

$_shopOrderBeforeAction

Объект заказа до изменения.

protected mixed $_shopOrderBeforeAction = \NULL

$_siteuserMailContentType

Content-type письма пользователю о заказе

protected mixed $_siteuserMailContentType = 'text/html'

$_siteuserMailSubject

Тема письма пользователю о заказе

protected mixed $_siteuserMailSubject = \NULL

$_weight

protected array<string|int, mixed> $_weight = \NULL

$_xsl

XSL данных о заказе

protected mixed $_xsl = \NULL

$_xslAdminMail

XSL письма администратору о заказе

protected mixed $_xslAdminMail = \NULL

$_xslSiteuserMail

XSL письма пользователю о заказе

protected mixed $_xslSiteuserMail = \NULL

Methods

adminMailContentType()

Set Content-type of admin's e-mail

public adminMailContentType(string $contentType) : self
Parameters
$contentType : string

Content-type

Return values
self

adminMailSubject()

Set subject to shop's administrator e-mail

public adminMailSubject(string $subject) : self
Parameters
$subject : string

subject

Return values
self

allowOrderPropertyFiles()

Allow upload files for order's property

public allowOrderPropertyFiles(bool $allowOrderPropertyFiles) : self
Parameters
$allowOrderPropertyFiles : bool
Return values
self

applyBonuses()

Apply Bonuses

public applyBonuses() : self
Return values
self

applyDiscountCards()

Apply Discount Cards

public applyDiscountCards(bool $applyDiscountCards) : self
Parameters
$applyDiscountCards : bool
Return values
self

applyDiscounts()

Apply Discounts

public applyDiscounts(bool $applyDiscounts) : self
Parameters
$applyDiscounts : bool
Return values
self

applyPartialPayment()

Apply Partial Payment by Siteuser's account

public applyPartialPayment() : self
Return values
self

changedOrder()

Уведомление об операциях с заказом

public changedOrder(string $mode) : mixed
Parameters
$mode : string

режим изменения:

  • apply - применение изменений заказа из списка заказа, включая изменение статуса
  • edit - редактирование заказа
  • changeStatusPaid - изменение статуса оплаты из списка заказов
  • cancelPaid - отмена заказа
Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeChangedOrder

hostcms-event

Shop_Payment_System_Handler.onAfterChangedOrder

checkAfterContent()

Call ->checkPaymentAfterContent() on each shop's Shop_Payment_System_Handlers

public static checkAfterContent(Shop_Model $oShop) : mixed
Parameters
$oShop : Shop_Model

checkBeforeContent()

Call ->checkPaymentBeforeContent() on each shop's Shop_Payment_System_Handlers

public static checkBeforeContent(Shop_Model $oShop) : mixed
Parameters
$oShop : Shop_Model

createNotification()

Create Notifications

public createNotification() : self
Return values
self

createOrder()

Create a new order by $this->_orderParams

public createOrder() : mixed

execute()

Executes the business logic.

public execute() : mixed
Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeExecute

hostcms-event

Shop_Payment_System_Handler.onAfterExecute

from()

Set FROM

public from(string $from) : self
Parameters
$from : string
Return values
self

getAdminEmails()

Get array of admin emails

public getAdminEmails() : array<string|int, mixed>
Tags
hostcms-event

Shop_Payment_System_Handler.onGetAdminEmails

Return values
array<string|int, mixed>

getInvoice()

Get invoice form

public getInvoice() : mixed

getNotification()

Get notification form

public getNotification() : mixed

orderParams()

Set order params

public orderParams(array<string|int, mixed> $orderParams) : self
Parameters
$orderParams : array<string|int, mixed>
Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeOrderParams

hostcms-event

Shop_Payment_System_Handler.onAfterOrderParams

Return values
self

printInvoice()

Shows invoice

public printInvoice() : self
Return values
self

printNotification()

Shows notification

public printNotification() : self
Return values
self

round()

Round prices

public round(bool $round) : self
Parameters
$round : bool
Return values
self

send()

Send emails about order

public send() : mixed
Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeSend

hostcms-event

Shop_Payment_System_Handler.onAfterSend

sendAdminEmail()

Send e-mail to shop's administrator

public sendAdminEmail(Core_Mail $oCore_Mail) : self
Parameters
$oCore_Mail : Core_Mail

mail

Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeSendAdminEmail

hostcms-event

Shop_Payment_System_Handler.onAfterSendAdminEmail

Return values
self

senderName()

Set subject to user e-mail

public senderName(mixed $senderName) : self
Parameters
$senderName : mixed
Return values
self

sendSiteuserEmail()

Send e-mail to user

public sendSiteuserEmail(Core_Mail $oCore_Mail) : self
Parameters
$oCore_Mail : Core_Mail

mail

Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeSendSiteuserEmail

hostcms-event

Shop_Payment_System_Handler.onAfterSendSiteuserEmail

Return values
self

setMailSubjects()

Set Mail Subjects

public setMailSubjects() : self
Return values
self

setNotificationModes()

Set $this->_notificationModes

public setNotificationModes(array<string|int, mixed> $notificationModes) : self
Parameters
$notificationModes : array<string|int, mixed>
Return values
self

setXSLs()

Set XSLs to e-mail

public setXSLs() : self
Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeSetXSLs

hostcms-event

Shop_Payment_System_Handler.onAfterSetXSLs

Return values
self

shopOrderBeforeAction()

Set order before change

public shopOrderBeforeAction(Shop_Order_Model $oShopOrderBeforeAction) : self
Parameters
$oShopOrderBeforeAction : Shop_Order_Model
Return values
self

siteuserMailContentType()

Set Content-type of user's e-mail

public siteuserMailContentType(string $contentType) : self
Parameters
$contentType : string

Content-type

Return values
self

siteuserMailSubject()

Set subject to user e-mail

public siteuserMailSubject(string $subject) : self
Parameters
$subject : string

subject

Return values
self

userExecute()

Клиентская логика обработки платежа

public userExecute() : self
Return values
self

xslAdminMail()

Set XSL for admin's e-mail

public xslAdminMail(Xsl_Model $oXsl) : self
Parameters
$oXsl : Xsl_Model
Return values
self

xslSiteuserMail()

Set XSL for user's e-mail

public xslSiteuserMail(Xsl_Model $oXsl) : self
Parameters
$oXsl : Xsl_Model
Return values
self

_addDelivery()

Add a delivery into the order

protected _addDelivery() : self
Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeAddDelivery

hostcms-event

Shop_Payment_System_Handler.onAfterAddDelivery

Return values
self

_addPropertiesList()

Add list of user's properties to XML

protected _addPropertiesList(int $parent_id, object $parentObject) : self
Parameters
$parent_id : int

parent directory

$parentObject : object
Return values
self

_addPurchaseDiscount()

Add a discount to the purchase

protected _addPurchaseDiscount() : self
Return values
self

_addShopDiscountcardBonusTransaction()

Добавление транзакции со списанием бонусов, используется для возврата бонусов при отмене оплаты заказа

protected _addShopDiscountcardBonusTransaction(int $shop_discountcard_bonus_id, float $amount) : self
Parameters
$shop_discountcard_bonus_id : int
$amount : float
Return values
self

_applyBonuses()

Backward compatibility, see applyBonuses()

protected _applyBonuses() : self
Return values
self

_attachDigitalItems()

Attach digital items to mail

protected _attachDigitalItems(Core_Mail $oCore_Mail) : self
Parameters
$oCore_Mail : Core_Mail

mail

Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeAttachDigitalItems

hostcms-event

Shop_Payment_System_Handler.onAfterAttachDigitalItems

Return values
self

_check()

Protected method to call $methodName on each shop's Shop_Payment_System_Handlers

protected static _check(Shop_Model $oShop, mixed $methodName) : mixed
Parameters
$oShop : Shop_Model
$methodName : mixed

_createNotification()

Backward compatibility, see createNotifications()

protected _createNotification() : self
Return values
self

_getDeliveryName()

Get delivery name

protected _getDeliveryName(Shop_Delivery_Model $oShop_Delivery[, mixed $shop_delivery_condition_name = NULL ]) : string
Parameters
$oShop_Delivery : Shop_Delivery_Model
$shop_delivery_condition_name : mixed = NULL
Return values
string

_getEmailFrom()

Get sender email

protected _getEmailFrom() : string
Return values
string

_prepareXml()

Prepare XML

protected _prepareXml() : Shop_Model
Tags
hostcms-event

Shop_Payment_System_Handler.onBeforePrepareXml

hostcms-event

Shop_Payment_System_Handler.onAfterPrepareXml

Return values
Shop_Model

_processOrder()

Создание нового заказа на основе данных, указанных в orderParams

protected _processOrder() : mixed
Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeProcessOrder

hostcms-event

Shop_Payment_System_Handler.onAfterItemGetPrices

hostcms-event

Shop_Payment_System_Handler.onAfterAddShopOrderItem

hostcms-event

Shop_Payment_System_Handler.onAfterProcessOrder

_processXml()

Process XML

protected _processXml() : mixed
Tags
hostcms-event

Shop_Payment_System_Handler.onBeforeProcessXml

hostcms-event

Shop_Payment_System_Handler.onAfterProcessXml


        
On this page

Search results