\Cairn_Stripe_Payment

Stripe payment processing in Cairn

Summary

Methods
Properties
Constants
initialize()
ajax_authorize_invoice()
authorize_invoice()
ajax_process_invoice()
process_invoice()
ajax_status_invoice()
status_invoice()
capture_invoice()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

initialize()

initialize()

Callback to initialize settings.

ajax_authorize_invoice()

ajax_authorize_invoice()

AJAX wrapper to authorize credit card transactions with authorize_invoice.

authorize_invoice()

authorize_invoice(array $request) : array

Authorizes a post_set from submitted credit card information.

Parameters

array $request

The posted request variables.

Returns

array —
  • id string The post_set id.
  • success boolean If the status check was successful.
  • message string The text that should be displayed to the user.
  • request array Returning the request variables back which has customer information with the addition of these:
  • received_usd float The amount that was approved and received.
  • approved boolean If the credit card was approved.
  • confirmation string The confirmation hash for the order.
  • cc_lastfour string The last four numbers of the credit card.
    • date string The date in MySQL format.

ajax_process_invoice()

ajax_process_invoice()

AJAX wrapper for process_invoice, will print JSON object from returned status.

process_invoice()

process_invoice(array $request) : array

Processes a post_set with the status of a cart and changes it to a status of hold and saves information from $request to the database.

Parameters

array $request

Request variables posted from the order form.

Returns

array —
  • id boolean If the status check was successful.
  • success boolean If the status check was successful.
  • message string The text that should be displayed to the user.
  • request array Returning the request variables back which has customer information.

ajax_status_invoice()

ajax_status_invoice()

AJAX wrapper for status_invoice, will print JSON object of the returned status.

status_invoice()

status_invoice(object $order, array $request) : array

Updates the status of a post_set and returns an assocative array of the status of the posts set.

Parameters

object $order

The posts_set object.

array $request

Request variables posted from the order form.

Returns

array —
  • success boolean If the status check was successful.
  • end boolean If this is the last check that is nessasary.
  • expired boolean If the post_set has expired.
  • seconds_remaining integer The number of seconds remaining until expired.
  • message string The text that should be displayed to the user.

capture_invoice()

capture_invoice(string $id) : array

Captures an authorized post_set for payment.

Parameters

string $id

The post_set id.

Returns

array —
  • id string The post_set id.
  • success boolean If the status check was successful.
  • message string The text that should be displayed to the user.