Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • Gateway
  • Gateways
  • MerchantGateway
  • NonmerchantGateway

Interfaces

  • MerchantAch
  • MerchantAchOffsite
  • MerchantCc
  • MerchantCcForm
  • MerchantCcOffsite
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Interface MerchantCc

Merchant Credit Card processing interface. Defines all methods that a credit card payment gateway must implement. Note: not all methods are required to be supported.

Package: blesta\components\gateways
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at components/gateways/lib/merchant_cc.php
Methods summary
public array
# processCc( array $card_info, float $amount, array $invoice_amounts = null )

Charge a credit card

Charge a credit card

Parameters

$card_info

An array of credit card info including:

  • first_name The first name on the card
  • last_name The last name on the card
  • card_number The card number
  • card_exp The card expidation date in yyyymm format
  • card_security_code The 3 or 4 digit security code of the card (if available)
  • type The credit card type
  • address1 The address 1 line of the card holder
  • address2 The address 2 line of the card holder
  • city The city of the card holder
  • state An array of state info including:
    • code The 2 or 3-character state code
    • name The local name of the country
  • country An array of country info including:
    • alpha2 The 2-character country code
    • alpha3 The 3-cahracter country code
    • name The english name of the country
    • alt_name The local name of the country
  • zip The zip/postal code of the card holder
  • reference_id The reference ID attached to this account given by the payment processor (optional)
  • client_reference_id The reference ID for the client this payment account belongs to (optional)
$amount
The amount to charge this card
$invoice_amounts

An array of invoices, each containing:

  • id The ID of the invoice being processed
  • amount The amount being processed for this invoice (which is included in $amount)

Returns

array

An array of transaction data including:

  • status The status of the transaction (approved, declined, void, pending, reconciled, refunded, returned)
  • reference_id The reference ID for gateway-only use with this transaction (optional)
  • transaction_id The ID returned by the remote gateway to identify this transaction
  • message The message to be displayed in the interface in addition to the standard message for this transaction status (optional)
public array
# authorizeCc( array $card_info, float $amount, array $invoice_amounts = null )

Authorize a credit card

Authorize a credit card

Parameters

$card_info

An array of credit card info including:

  • first_name The first name on the card
  • last_name The last name on the card
  • card_number The card number
  • card_exp The card expidation date in yyyymm format
  • card_security_code The 3 or 4 digit security code of the card (if available)
  • type The credit card type
  • address1 The address 1 line of the card holder
  • address2 The address 2 line of the card holder
  • city The city of the card holder
  • state An array of state info including:
    • code The 2 or 3-character state code
    • name The local name of the country
  • country An array of country info including:
    • alpha2 The 2-character country code
    • alpha3 The 3-cahracter country code
    • name The english name of the country
    • alt_name The local name of the country
  • zip The zip/postal code of the card holder
$amount
The amount to charge this card
$invoice_amounts

An array of invoices, each containing:

  • id The ID of the invoice being processed
  • amount The amount being processed for this invoice (which is included in $amount)

Returns

array

An array of transaction data including:

  • status The status of the transaction (approved, declined, void, pending, reconciled, refunded, returned)
  • reference_id The reference ID for gateway-only use with this transaction (optional)
  • transaction_id The ID returned by the remote gateway to identify this transaction
  • message The message to be displayed in the interface in addition to the standard message for this transaction status (optional)
public array
# captureCc( string $reference_id, string $transaction_id, float $amount, array $invoice_amounts = null )

Capture the funds of a previously authorized credit card

Capture the funds of a previously authorized credit card

Parameters

$reference_id
The reference ID for the previously authorized transaction
$transaction_id
The transaction ID for the previously authorized transaction
$amount
The amount to capture on this card
$invoice_amounts

An array of invoices, each containing:

  • id The ID of the invoice being processed
  • amount The amount being processed for this invoice (which is included in $amount)

Returns

array

An array of transaction data including:

  • status The status of the transaction (approved, declined, void, pending, reconciled, refunded, returned)
  • reference_id The reference ID for gateway-only use with this transaction (optional)
  • transaction_id The ID returned by the remote gateway to identify this transaction
  • message The message to be displayed in the interface in addition to the standard message for this transaction status (optional)
public array
# voidCc( string $reference_id, string $transaction_id )

Void a credit card charge

Void a credit card charge

Parameters

$reference_id
The reference ID for the previously authorized transaction
$transaction_id
The transaction ID for the previously authorized transaction

Returns

array

An array of transaction data including:

  • status The status of the transaction (approved, declined, void, pending, reconciled, refunded, returned)
  • reference_id The reference ID for gateway-only use with this transaction (optional)
  • transaction_id The ID returned by the remote gateway to identify this transaction
  • message The message to be displayed in the interface in addition to the standard message for this transaction status (optional)
public array
# refundCc( string $reference_id, string $transaction_id, float $amount )

Refund a credit card charge

Refund a credit card charge

Parameters

$reference_id
The reference ID for the previously authorized transaction
$transaction_id
The transaction ID for the previously authorized transaction
$amount
The amount to refund this card

Returns

array

An array of transaction data including:

  • status The status of the transaction (approved, declined, void, pending, reconciled, refunded, returned)
  • reference_id The reference ID for gateway-only use with this transaction (optional)
  • transaction_id The ID returned by the remote gateway to identify this transaction
  • message The message to be displayed in the interface in addition to the standard message for this transaction status (optional)
Blesta API documentation generated by ApiGen