Blesta Source Documentation

ClientPay extends AppController

Client portal pay controller

Table of Contents

Methods

confirm() Step 3 - confirm and make payment
index() Step 1 - select invoices to pay
method() Step 2 - select payment method
preAction() Pre-action
received() Nonmerchant gateway payment received callback
applyCredit() Applies any existing credits to the given invoices from this client
authorizePayment() Attempts to create a payment authorization
buildPaymentConfirmation() Authorizes a payment and builds the payment confirmation view for the gateway
getCcAccountInfo() Formats cc account info for making payments
setAchView() Sets the ACH partial view
setCcView() Sets the CC partial view
setContactView() Sets the contact partial view
Methods

confirm()

Step 3 - confirm and make payment

public confirm() : mixed

index()

Step 1 - select invoices to pay

public index() : mixed

method()

Step 2 - select payment method

public method() : mixed

preAction()

Pre-action

public preAction() : mixed

received()

Nonmerchant gateway payment received callback

public received() : mixed

applyCredit()

Applies any existing credits to the given invoices from this client

private applyCredit(array<string|int, mixed> $invoices[, array<string|int, mixed> &$errors = [] ]) : array<string|int, mixed>
Parameters
$invoices : array<string|int, mixed>

A list of invoices containing:

  • amounts A list of invoice amounts including:
    • invoice_id The ID of the invoice to pay
    • amount The amount to apply to the invoice
  • currency The currency that these invoices are in
$errors : array<string|int, mixed> = []

A reference to errors that will be set if attempting to apply credits leads to an error

Return values
array<string|int, mixed>

A subset of the given $invoices, with invoice amounts updated to the amounts still remaining

authorizePayment()

Attempts to create a payment authorization

private authorizePayment(array<string|int, mixed> $payment, array<string|int, mixed> $apply_amounts, float $total) : stdClass|null
Parameters
$payment : array<string|int, mixed>

An array of payment details

$apply_amounts : array<string|int, mixed>

An array of invoice amounts to pay

$total : float

The total amount to pay

Return values
stdClass|null

An stdClass object representing the transaction for this authorization if successful, otherwise null

buildPaymentConfirmation()

Authorizes a payment and builds the payment confirmation view for the gateway

private buildPaymentConfirmation(array<string|int, mixed> $payment, array<string|int, mixed> $apply_amounts, float $total) : string
Parameters
$payment : array<string|int, mixed>

An array of payment details

$apply_amounts : array<string|int, mixed>

An array of invoice amounts to pay

$total : float

The total amount to pay

Return values
string

The HTML for the payment confirmation

getCcAccountInfo()

Formats cc account info for making payments

private getCcAccountInfo(array<string|int, mixed> $payment) : array<string|int, mixed>
Parameters
$payment : array<string|int, mixed>

A list of payment info

Return values
array<string|int, mixed>

A formatted list of payment info

setAchView()

Sets the ACH partial view

private setAchView(stdClass $vars[, bool $edit = false ][, bool $save_account = false ]) : mixed
Parameters
$vars : stdClass

The input vars object for use in the view

$edit : bool = false

True if this is an edit, false otherwise

$save_account : bool = false

True to offer an option to save these payment details, false otherwise

Tags
see
ClientPay::index()

setCcView()

Sets the CC partial view

private setCcView(stdClass $vars[, bool $edit = false ][, bool $save_account = false ]) : mixed
Parameters
$vars : stdClass

The input vars object for use in the view

$edit : bool = false

True if this is an edit, false otherwise

$save_account : bool = false

True to offer an option to save these payment details, false otherwise

Tags
see
ClientPay::index()

setContactView()

Sets the contact partial view

private setContactView(stdClass $vars[, bool $edit = false ]) : mixed
Parameters
$vars : stdClass

The input vars object for use in the view

$edit : bool = false

True if this is an edit, false otherwise

Tags
see
ClientPay::index()
Tags
subpackage

app.controllers

copyright

Copyright (c) 2010, Phillips Data, Inc.

license

http://www.blesta.com/license/ The Blesta License Agreement

link

Blesta


        
On this page

Search results