cjsdevelopment/cmpayservice

Use the CM Pay service with Laravel

dev-master 2016-01-25 13:27 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:04:41 UTC


README

CmPayService is a Laravel package for the API of CM Payments. (pay.cm.nl)

How to use it:

composer

Require it:

  • "CJSDevelopment/CmPayService" : "dev-master"

app.php

Add the following data:

ServiceProvider

  • 'CJSDevelopment\CmPayServiceProvider'

Facade

  • 'PaymentService' => 'CJSDevelopment\CmPayService',

Deploy / Update

Execute the following commands in your console:

  • sudo composer selfupdate
  • sudo composer update
  • sudo php artisan vendor:publish

Config

After executing the vendor:publish command you will find a config file in the Laravel config folder. Fill the Mandatory fields, check the optional.

Don't forget to fill in the right company name and product token

Usage in your code:

Initializing

For payment methods & options:

  • CmPayService::getPaymentMethods($amount (should be integer));

Executing

To forward the customer to the payment screen of their financial instance.

  • CmPayService::getTransactionUrl($amount, $method, $option, $parameters);

The Parameters options:

Check

  • You can check it yourself by your own lovings.