2017 © Pedro Peláez
 

silverstripe-module silverstripe-omnipayable

The Omnipayable module adds support for the Omnipay library.

image

studiobonito/silverstripe-omnipayable

The Omnipayable module adds support for the Omnipay library.

  • Friday, August 28, 2015
  • by nedmas
  • Repository
  • 2 Watchers
  • 4 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

WARNING: Module depreciated

This SilverStripe module is depreciated please consider using the silverstripe-omnipay module instead., (*1)

Omnipayable Module

Overview

The Omnipayable module is designed to provide simple payment forms for SilverStripe using Omnipay., (*2)

The following forms are currently implemented:, (*3)

  • GoCardless
  • PayPal Express Checkout
  • PayPal Payments Pro
  • Stripe

Requirements

  • SilverStripe 3.0 or newer.
  • Omnipay 0.8 or newer.

Installation Instructions

Composer

The Omnipayable module can be installed via Composer. To do so, simply add it to the composer.json file in the root of your SilverStripe installation:, (*4)

{
    "require": {
        "studiobonito/silverstripe-omnipayable": "0.2.*"
    }
}

Then run composer to update your dependencies:, (*5)

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

Manual

Copy the 'omnipayable' folder to the root of your SilverStripe installation., (*6)

Usage Overview

There is a factory method provided to with form creation. This will create the correct form for the currently configured gateway:, (*7)

$form = OmnipayableForm::create($this, 'PaymentForm');

Alternatively you can create the form directly:, (*8)

$form = new OmnipayableForm_GoCardless($this, 'PaymentForm');

Once the form is created you can set the amount that will be charged:, (*9)

$form->setAmount('10.00');

Complete Example

class Page_Controller extends ContentController
{
    public static $allowed_actions = array(
        'PaymentForm'
    );

    public function PaymentForm()
    {
        $form = OmnipayableForm::create($this, 'PaymentForm');

        $form->setAmount('10.00');

        return $form;
    }
}

When adding the form to a Controller remember to add the forms name to the $allowed_actions array., (*10)

Payment Form Fields

The base form provides form fields for all of the currently supported properties of the Omnipay CreditCard object. Each gateway specific form is intended to show only the relevant subset of fields that apply to that gateway., (*11)

The following is a list of all the base form fields and their type:, (*12)

Personal Details FieldGroup

  • FirstName TextField
  • LastName TextField
  • Company TextField
  • Email EmailField

Card Details FieldGroup

  • Number CreditCardField
  • Cvv TextField
  • ExpiryMonth DropdownField
  • ExpiryYear DropdownField
  • StartMonth DropdownField
  • StartYear DropdownField
  • IssueNumber TextField
  • Type DropdownField

Billing Address FieldGroup

  • BillingAddress1 TextField
  • BillingAddress2 TextField
  • BillingCity TextField
  • BillingPostcode TextField
  • BillingState TextField
  • BillingCountry DropdownField
  • BillingPhone PhoneField

Shipping Address FieldGroup

  • ShippingAddress1 TextField
  • ShippingAddress2 TextField
  • ShippingCity TextField
  • ShippingPostcode TextField
  • ShippingState TextField
  • ShippingCountry DropdownField
  • ShippingPhone PhoneField

The Versions

28/08 2015

dev-master

9999999-dev

The Omnipayable module adds support for the Omnipay library.

  Sources   Download

BSD-2-Clause

The Requires

 

payment omnipay silverstripe paypal gocardless

28/08 2015

0.2.1

0.2.1.0

The Omnipayable module adds support for the Omnipay library.

  Sources   Download

BSD-2-Clause

The Requires

 

payment omnipay silverstripe paypal gocardless

01/03 2013

0.2.0

0.2.0.0

The Omnipayable module adds support for the Omnipay library.

  Sources   Download

BSD-2-Clause

The Requires

 

payment omnipay silverstripe paypal gocardless

01/03 2013

0.1.0

0.1.0.0

The Omnipayable module adds support for the Omnipay library.

  Sources   Download

BSD-2-Clause

The Requires

 

payment omnipay silverstripe paypal gocardless