Overview

Packages

  • akismet
  • None
  • PHP
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • plugins
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Signatures
    • Signed
    • Transport
  • wa-apps
    • blog
      • actions
        • backend
        • blog
        • comment
        • cron
        • design
        • frontend
        • page
        • plugin
        • post
      • api
        • v1
      • cli
      • layout
      • model
      • plugin
        • aksimet
        • category
        • emailsubscription
        • favorite
        • gravatar
        • import
        • markdown
        • myposts
        • tag
        • troll
      • settings
    • checklists
      • backend
      • json
    • contacts
      • backend
    • developer
    • dummy
    • guestbook
    • guestbook2
    • photos
      • album
      • api
        • v1
      • backend
      • design
      • dialog
      • frontend
      • page
      • photo
      • plugin
        • comment
        • imageeffects
        • import
        • publicgallery
        • watermark
      • search
      • settings
      • stack
      • tag
      • upload
    • site
      • backend
      • blocks
      • config
      • design
      • domains
      • files
      • frontend
      • helper
      • layout
      • pages
      • routing
      • setting
    • stickies
      • api
        • v1
      • sheet
      • stiky
  • wa-plugin
    • payment
    • shipping
    • sms
  • wa-plugins
    • shipping
      • usps
  • wa-system
    • API
    • Auth
      • Adapters
    • Autoload
    • Cache
      • Adapter
    • Captcha
    • Config
    • Contact
    • controller
    • currency
    • database
    • datetime
    • design
    • event
    • exception
    • files
    • image
    • layout
    • locale
    • log
    • mail
    • page
      • action
      • model
    • payment
    • plugin
    • request
    • response
    • routing
    • shipping
    • sms
    • storage
    • user
    • util
    • validator
    • view
    • webasyst
      • api
      • backend
      • cli
      • config
      • layout
      • login
      • model
      • password
      • payment
      • profile
      • settings
      • shipment
    • widget
    • workflow
  • waPlugins
    • Payment
  • webasyst
    • wa-system
      • helper

Classes

  • waAppPayment
  • waOrder
  • waPayment

Interfaces

  • waIPayment
  • waIPaymentCancel
  • waIPaymentCapture
  • waIPaymentRefund

Exceptions

  • waPaymentException
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class waPayment

This file is part of Webasyst framework.

Licensed under the terms of the GNU Lesser General Public License (LGPL). http://www.webasyst.com/framework/license/

waSystemPlugin
Extended by waPayment

Direct known subclasses

assistPayment, authorizenetsimPayment, private24Payment, qiwiPayment, rbkmoneyPayment, robokassaPayment, sagepayPayment, twocheckoutPayment, webmoneyPayment, worldpayPayment, yandexmoneyPayment, cashPayment, chasepaymentechPayment, interkassaPayment, invoicejurPayment, invoicephysPayment, liqpayPayment, payonlinePayment, paypalPayment
Abstract
Package: wa-system\payment
Copyright: 2011 Webasyst LLC
Author: Webasyst LLC
Link: http://www.webasyst.com/
Located at wa-system/payment/waPayment.class.php
Methods summary
public static waPayment
# factory( string $id, integer $merchant_id = null, string|waAppPayment $app_adapter = null )

Get payment plugin instance

Parameters

$id
string
$id plugin identity (e.g. cash, paypal, etc.)
$merchant_id
integer
$merchant_id Merchant settings key
$app_adapter
string|waAppPayment
$app_adapter app_id or application adapter

Returns

waPayment

Overrides

waSystemPlugin::factory()
final public static array
# enumerate( mixed $options = array(), null $type = null )

Enumerate available payment plugins

Enumerate available payment plugins

Parameters

$options
mixed
$options array
$type
null
$type will be ignored

Returns

array

Overrides

waSystemPlugin::enumerate()
final public static string[string]
# info( string $id, array $options = array(), null $type = null )

Get plugin description

Parameters

$id
string
$id
$options
array
$options
$type
null
$type will be ignored

Returns

string[string]
string['name']
string['description']
string['version']
string['build']
string['logo']
string[unt]['icon'][int]
string['img']

Overrides

waSystemPlugin::info()
protected waPayment
# init( )

Returns

waPayment
public string|string[]
# allowedCurrency( )

Returns

string|string[]
ISO3 currency code
public string
# payment( array $payment_form_data, waOrder $order_data, boolean $auto_submit = false )

Parameters

$payment_form_data
array
$payment_form_data POST form data
$order_data
waOrder
$order_data formalized order data
$auto_submit
boolean
$auto_submit

Returns

string
HTML payment form
final public static
# callback( mixed $module_id, mixed $request = array() )
protected
# callbackExceptionHandler( Exception $ex )
protected waPayment
# callbackInit( array $request )

Determine target application and merchant key

Parameters

$request
array
$request

Returns

waPayment
protected
# callbackHandler( mixed $request )

Parameters

$request
mixed
$request array
protected array[string]mixed
# execAppCallback( string $method, array $transaction_data )

Enter description here ...

Parameters

$method
string
$method
$transaction_data
array
$transaction_data

Returns

array[string]mixed
array['order_id']int
array['customer_id']int
array['result']boolean
array['error']string
public array
# supportedOperations( )

Returns

array
final public
# getSupportedTransactions( )
public
# getCustomerPaymentFields( mixed $customer_data = null, mixed $payment_form_data = null, mixed $order_data = null )
public
# validateCustomerPaymentData( mixed $payment_form_data )
public array()
# getSettingsList( )

Deprecated

Returns

array()
protected
# checkPayments( )
final public static array
# listModules( mixed $options = array() )

Deprecated

use enumerate instead

Parameters

$options
mixed
$options array

Returns

array
final public static
# filterModules( mixed $methods, mixed $properties = array(), mixed $strict = false )
public
# __call( mixed $method, mixed $params )
protected static
# log( mixed $module_id, mixed $data )
final protected array
# saveTransaction( mixed $wa_transaction_data, array $transaction_raw_data = null )

Saves formatted data and raw data to DB

Saves formatted data and raw data to DB

Parameters

$wa_transaction_data
mixed
$wa_transaction_data
$transaction_raw_data
array
$transaction_raw_data

Returns

array

Tutorial

$transaction_data array format: type – one of: 'AUTH+CAPTURE', 'AUTH ONLY', 'CAPTURE', 'REFUND', 'CANCEL', 'CHARGEBACK' amount currency_id – 3-letter ISO-code date_time order_id customer_id transaction_OK — true/false flag error_description – string view_data – string comment - string (optional) native_id - original transaction id from payment gateway parent_id - primary transaction id (optional)
final public static array
# getTransaction( integer $wa_transaction_id )

Get WA transaction by ID

Get WA transaction by ID

Parameters

$wa_transaction_id
integer
$wa_transaction_id

Returns

array
$transaction
protected boolean
# allowedTransactionCustomized( array $transaction_data, array $transaction_raw_data )

void method (optionally used in child methods)

void method (optionally used in child methods)

Parameters

$transaction_data
array
$transaction_data
$transaction_raw_data
array
$transaction_raw_data

Returns

boolean
final public static array
# allowedTransaction( integer $wa_transaction_id )

Returns available post-payment transaction types

Returns available post-payment transaction types

Parameters

$wa_transaction_id
integer
$wa_transaction_id

Returns

array
protected array
# formalizeData( array $transaction_raw_data )

Convert transaction raw data to formatted data

Convert transaction raw data to formatted data

Parameters

$transaction_raw_data
array
$transaction_raw_data

Returns

array
$transaction_data
final public static boolean
# addTransactionData( mixed $wa_transaction_id, mixed $result = null )

Adds order [and customer] info to wa_transaction DB table (for cases like Google Checkout)

Adds order [and customer] info to wa_transaction DB table (for cases like Google Checkout)

Deprecated

Parameters

$wa_transaction_id
mixed
$wa_transaction_id int
$result
mixed
$result array

Returns

boolean
result
final public static array
# getTransactionsByFields( array $conditions )

Get transactions list

Get transactions list

Parameters

$conditions
array
$conditions - $key=>$value pairs

Returns

array
$transactions - transactions list
final public string
# getRelayUrl( boolean $force_https = null )

Parameters

$force_https
boolean
$force_https

Returns

string
callback relay url
public static mixed
# execTransactionCallback( mixed $request, mixed $module_id )

Handle callback from payment gateway

Handle callback from payment gateway

Deprecated

Parameters

$request
mixed
$module_id string Module identity
$module_id
mixed
$request array

Returns

mixed

Example

waPayment::execTransactionCallback(waPayment::TRANSACTION_CAPTURE,'AuthorizeNet',$request)
public static array
# settingCurrencySelect( )

Returns

array
Array of available currencies in format for options at waHtmlControl
public array[string]array
# getPrintForms( waOrder $order = null )

Parameters

$order
waOrder
$order

Returns

array[string]array
array[string]['name']string
название печатной формы
array[string]['description']string
описание печатной формы
private
# guide( )
public
# getGuide( mixed $params = array() )
public
# customFields( waOrder $order )
public string
# displayPrintForm( string $id, waOrder $order, array $params = array() )

Displays printable form content (HTML) by id

Parameters

$id
string
$id
$order
waOrder
$order
$params
array
$params

Returns

string
final protected waAppPayment
# getAdapter( )

Returns

waAppPayment

Throws

waException
protected mixed
# getCountryISO2Code( mixed $iso3code )

Parameters

$iso3code
mixed
$iso3code

Returns

mixed

Throws

waException
Methods inherited from waSystemPlugin
__construct(), __get(), __isset(), _w(), getDescription(), getId(), getName(), getPath(), getProperties(), getSettings(), getSettingsHTML(), getType(), initControls(), registerControl(), saveSettings(), setSettings()
Constants summary
string TRANSACTION_CONFIRM 'confirm'
#
string TRANSACTION_AUTH 'auth'
#
string TRANSACTION_REFUND 'refund'
#
string TRANSACTION_CAPTURE 'capture'
#
string TRANSACTION_CANCEL 'cancel'
#
string TRANSACTION_PAYMENT 'payment'
#
string CALLBACK_PAYMENT 'payment'
#

Обработка оплаты

string CALLBACK_REFUND 'refund'
#

Обработка возврата

string CALLBACK_CONFIRMATION 'confirmation'
#

Валидация оплаты

string CALLBACK_CAPTURE 'capture'
#

Обработка подтверждения

string CALLBACK_DECLINE 'decline'
#

Обработка отказа

string CALLBACK_CANCEL 'cancel'
#

Обработка отмены

string CALLBACK_CHARGEBACK 'chargeback'
#

Обработка отказа

string CALLBACK_NOTIFY 'notify'
#

Обработка информационного сообщения

Обработка информационного сообщения

string OPERATION_AUTH_CAPTURE 'AUTH+CAPTURE'
#

Авторизация с подтверждением

string OPERATION_AUTH_ONLY 'AUTH_ONLY'
#

Только авторизация без подтверждения

string OPERATION_CAPTURE 'CAPTURE'
#

Подтверждение авторизованной транзакции

string OPERATION_REFUND 'REFUND'
#

Возврат подтвержденной транзакции

string OPERATION_CANCEL 'CANCEL'
#

Отмена неподтвержденной транзакции

string OPERATION_CHECK 'CHECK'
#

Проверка статуса оплаты по номеру заказа

string OPERATION_INTERNAL_PAYMENT 'INTERNAL_PAYMENT'
#

Прием платежных данных на текущем сервере

string OPERATION_HOSTED_PAYMENT_PRIOR_ORDER 'HOSTED_PAYMENT_PRIOR_ORDER'
#

Оформление заказа и оплата на стороне платежной системы PayPal Express Checkout, Google Checkout

Todo

try use HOSTED_ORDER
string OPERATION_HOSTED_PAYMENT_AFTER_ORDER 'HOSTED_PAYMENT_AFTER_ORDER'
#

Оплата заказа на стороне платежной системы

Todo

try use HOSTED_PAYMENT
string STATE_CAPTURED 'CAPTURED'
#
string STATE_AUTH 'AUTH'
#
string STATE_REFUNDED 'REFUNDED'
#
string STATE_CANCELED 'CANCELED'
#
string STATE_PARTIAL_REFUNDED 'PARTIAL_REFUNDED'
#
string STATE_DECLINED 'DECLINED'
#
string STATE_VERIFIED 'VERIFIED'
#
string TYPE_CARD 'card'
#
string TYPE_ONLINE 'online'
#
string TYPE_MANUAL 'manual'
#
string TYPE_OBSOLETE 'obsolete'
#
string PLUGIN_TYPE 'payment'
#
Properties summary
private static array $module_pool array()
#
private static boolean $init false
#
protected mixed $properties
#
protected integer $merchant_id
#

Alias to plugin instance key

private waAppPayment $app_adapter
#
protected mixed $app_id
#
private mixed $guide null
#
Properties inherited from waSystemPlugin
$id, $key, $path, $type
My fork of Webasyst Framework API documentation generated by ApiGen 2.8.0