Difference between revisions of "Freeside:1.7:Documentation:Developer/FS/payment gateway"

From Freeside
Jump to: navigation, search
(import from POD)
 
m (Edit via perl MediaWiki framework (1.13))
 
Line 34: Line 34:
 
; check
 
; check
 
:Checks all fields to make sure this is a valid payment gateway. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
 
:Checks all fields to make sure this is a valid payment gateway. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
 +
; agent_payment_gateway
 +
:Returns any agent overrides for this payment gateway.
 +
; disable
 +
:Disables this payment gateway: deletes all associated agent_payment_gateway overrides and sets the ''disabled'' field to "'''Y'''".
  
 
==BUGS==
 
==BUGS==
 
==SEE ALSO==
 
==SEE ALSO==
 
[[Freeside:1.7:Documentation:Developer/FS/Record|FS::Record]], schema.html from the base documentation.
 
[[Freeside:1.7:Documentation:Developer/FS/Record|FS::Record]], schema.html from the base documentation.

Latest revision as of 13:02, 23 July 2009

NAME

FS::payment_gateway - Object methods for payment_gateway records

SYNOPSIS

 use FS::payment_gateway;

 $record = new FS::payment_gateway \%hash;
 $record = new FS::payment_gateway { 'column' => 'value' };

 $error = $record->insert;

 $error = $new_record->replace($old_record);

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::payment_gateway object represents an payment gateway. FS::payment_gateway inherits from FS::Record. The following fields are currently supported:

gatewaynum - primary key; gateway_module - Business::OnlinePayment:: module name; gateway_username - payment gateway username; gateway_password - payment gateway password; gateway_action - optional action or actions (multiple actions are separated with `,': for example: `Authorization Only, Post Authorization'). Defaults to `Normal Authorization'.; disabled - Disabled flag, empty or 'Y'

METHODS

new HASHREF
Creates a new payment gateway. To add the payment gateway to the database, see "insert".
Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the hash method.
insert
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
delete
Delete this record from the database.
replace OLD_RECORD
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
check
Checks all fields to make sure this is a valid payment gateway. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
agent_payment_gateway
Returns any agent overrides for this payment gateway.
disable
Disables this payment gateway: deletes all associated agent_payment_gateway overrides and sets the disabled field to "Y".

BUGS

SEE ALSO

FS::Record, schema.html from the base documentation.