Skip to content

Slick-Pay-Algeria/slickpay-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slick-Pay Logo

Description

Laravel package for Slick-Pay API implementation.

Prerequisites

  • PHP 7.4 or above ;
  • curl extension must be enabled ;
  • Laravel 8.0 or above.

Installation

Just run this command line :

composer require slick-pay-algeria/slickpay-laravel

Configuration

First of all, you have to publish the pakage config file with the command line :

php artisan vendor:publish --tag=slickpay-config

Now, you can find a file slickpay.php within your project config folder.

<?php

return [
    'sandbox'    => true,
    'public_key' => "",
];

sandbox

Will indicate if you want to use the sandbox or live environment (default: true).

public_key

You can retreive your PUBLIC_KEY from your slick-pay.com dashboard.

How to use?

Important: Please check the online documentation for more details about Slick-Pay API requests parameters & responses.

Available classes :

User

  • SlickPay\User\Account: Implements the user account Slick-Pay API.
    • Account::store(array $data): array : Store a new account in storage.
    • Account::show(string $uuid): array : Get the specified account data.
    • Account::index(int $offset, int $page): array : Get a listing of the user account.
    • Account::update(string $uuid, array $data): array : Update the specified account in storage.
    • Account::destroy(string $uuid): array : Remove the specified account from storage.
  • SlickPay\User\Contact: Implements the user contact Slick-Pay API.
    • Contact::store(array $data): array : Store a new contact in storage.
    • Contact::show(string $uuid): array : Get the specified contact data.
    • Contact::index(int $offset, int $page): array : Get a listing of the user contact.
    • Contact::update(string $uuid, array $data): array : Update the specified contact in storage.
    • Contact::destroy(string $uuid): array : Remove the specified contact from storage.
  • SlickPay\User\Transfer: Implements the user transfer Slick-Pay API.
    • Transfer::commission(float $amount): array : Calculate transfer commission.
    • Transfer::store(array $data): array : Store a new transfer in storage.
    • Transfer::show(int $id): array : Get the specified transfer data.
    • Transfer::index(int $offset, int $page): array : Get a listing of the user transfer.
    • Transfer::update(int $id, array $data): array : Update the specified transfer in storage.
    • Transfer::destroy(int $id): array : Remove the specified transfer from storage.
  • SlickPay\User\Aggregation: Implements the user aggregation Slick-Pay API.
    • Aggregation::commission(float $amount): array : Calculate aggregation commission.
    • Aggregation::store(array $data): array : Store a new aggregation in storage.
    • Aggregation::show(int $id): array : Get the specified aggregation data.
    • Aggregation::index(int $offset, int $page): array : Get a listing of the user aggregation.
    • Aggregation::update(int $id, array $data): array : Update the specified aggregation in storage.
    • Aggregation::destroy(int $id): array : Remove the specified aggregation from storage.
  • SlickPay\User\Invoice: Implements the user invoice Slick-Pay API.
    • Invoice::commission(float $amount): array : Calculate invoice commission.
    • Invoice::store(array $data): array : Store a new invoice in storage.
    • Invoice::show(int $id): array : Get the specified invoice data.
    • Invoice::index(int $offset, int $page): array : Get a listing of the user invoice.
    • Invoice::update(int $id, array $data): array : Update the specified invoice in storage.
    • Invoice::destroy(int $id): array : Remove the specified invoice from storage.

Merchant

  • SlickPay\Merchant\Invoice: Implements the merchant invoice Slick-Pay API.
    • Invoice::store(array $data): array : Store a new invoice in storage.
    • Invoice::show(int $id): array : Get the specified invoice data.
    • Invoice::index(int $offset, int $page): array : Get a listing of the merchant invoice.
    • Invoice::update(int $id, array $data): array : Update the specified invoice in storage.
    • Invoice::destroy(int $id): array : Remove the specified invoice from storage.

Important: All above classes methods return array with the following indexes : data (contains API response), status (HTTP response code from Slick-Pay API server) and errors (array that contains error messages).

More help

About

Laravel package for Slick-Pay API implementation.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages