2017 © Pedro Peláez
 

library laravel-sagepayments

Laravel SagePayments

image

midwesterninteractive/laravel-sagepayments

Laravel SagePayments

  • Friday, November 17, 2017
  • by midwesternInteractive
  • Repository
  • 3 Watchers
  • 1 Stars
  • 208 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

laravel-sagepayments

PHP SDK for working with basic Sage Payment Bankcard methods., (*1)

For more information visit Sage Payments, (*2)

Installation

$ composer require midwesterninteractive/laravel-sagepayments
$ php artisan vendor:publish --tag=config

Configuration

You may modify the config file that is published config/sagepayments.php and provide the default options or add the following to your .env file:, (*3)

# Merchant/Client
SAGE_MERCH_ID=[sage-client-id]
SAGE_MERCH_KEY=[sage-client-key]

# Sage App
SAGE_APP_ID=[sage-app-id]
SAGE_APP_KEY=[sage-app-key]

You'll need to get the Sage Merch creds from your client or login to your Sage Portal. You may also request that Sage set up a test client for development., (*4)

For your Sage App creds you'll need to login to your developer account and grab them from your exisiting application or create a new one., (*5)

Service Provider

If you're on laravel 5.5 the service provider will be automatially loaded, if not, add to your config/app.php providers, (*6)

'providers' => [
    // ...
    MidwesternInteractive\Laravel\SagePaymentsServiceProvider::class,
],

Usage

Use in class, (*7)

use MidwesternInteractive\Laravel\SagePayments;

Create Charge

Utilizes post_charges for more information on available parameters visit the documentation, (*8)

$data = [
    'retail' => [
        'amounts' => [
            'total' => 100
        ],
        'billing' => [
            'name' => 'John Smith',
            'address' => '123 Address Ave',
            'city' => 'City',
            'state' => 'ST',
            'postalCode' => '12345',
            'country' => 'US'
        ],
        'cardData' => [
            'number' => '5454545454545454',
            'expiration' => '0920',
            'cvv' => '987'
        ]
    ]
];
$type = 'Sale';

$response = SagePayments::create($data, $type);

Return Charges

Utilizes get_charges for more information on available parameters visit the documentation, (*9)

$data = [
    'pageSize' => '20'
];

$response = SagePayments::charges($data);

Return Charge Details

Utilizes get_charges_detail for more information on available parameters visit the documentation, (*10)

// Charge ID
$reference = '[charge-reference-id]';

$response = SagePayments::details($reference);

The Versions

17/11 2017

dev-master

9999999-dev

Laravel SagePayments

  Sources   Download

GPL-3.0

The Requires

 

laravel php payments sage

17/11 2017

v1.2

1.2.0.0

Laravel SagePayments

  Sources   Download

GPL-3.0

The Requires

 

laravel php payments sage

07/11 2017

v1.1.2

1.1.2.0

Laravel SagePayments

  Sources   Download

GPL-3.0

The Requires

 

laravel php payments sage

07/11 2017

v1.1

1.1.0.0

Laravel SagePayments

  Sources   Download

GPL-3.0

The Requires

 

laravel php payments sage

21/09 2017

v1.0.1

1.0.1.0

Laravel SagePayments

  Sources   Download

GPL-3.0

The Requires

 

laravel php payments sage

21/09 2017

v1.0

1.0.0.0

Laravel SagePayments

  Sources   Download

GPL-3.0

The Requires

 

laravel php payments sage