maxelpay/maxelpay

This package is used to pay in the crypto currency

1.0.9 2024-09-10 06:27 UTC

This package is not auto-updated.

Last update: 2025-02-06 08:04:21 UTC


README

MaxelPay.com offers a simple and fast solution for accepting Ethereum, BNB, and various other cryptocurrencies. Seamlessly receive crypto payouts from fiat currencies like Euros or U.S. Dollars, all without worrying about exchange rate volatility.

INSTALLATION

You can install the package via Composer.

composer require maxelpay/maxelpay

CONFIGURATION

Compatible with Laravel versions 11.x

  1. Open bootstrap/providers.php and add this line to your Service Providers Array.
  Maxelpay\MaxelpayServiceProvider::class,
  1. Open config/app.php and add this line
// Include on the top
use Illuminate\Support\Facades\Facade;
  'aliases' => Facade::defaultAliases()->merge([
       'Maxelpay' => Maxelpay\Http\Controllers\MaxelpayController::class,
  ])->toArray(),

Compatible with Laravel versions 7.x through 10.x

  1. Open config/app.php and add this line to your Service Providers Array.
  Maxelpay\MaxelpayServiceProvider::class,
  1. Open config/app.php and add this line to your Aliases
  'Maxelpay' => Maxelpay\Http\Controllers\MaxelpayController::class,

HOW TO USE

 php artisan vendor:publish --provider="Maxelpay\MaxelpayServiceProvider"

Required ENV Variables

Click here to obtain the API Key and API Secret.

MAXELPAY_API_KEY="******************" #API Key
MAXELPAY_SECRET_KEY="******************"  #API Secret
MAXELPAY_PAYMENT_MODE="STAGING" #Payment mode STAGING or LIVE

Import classes in your controller

use URL;
use Maxelpay;

Example

 $data = array(
        "orderID"     => "123008", // Order Id
        "amount"      => "100", // Amount
        "currency"    => "INR", // Supported currencies - https://dashboard.maxelpay.com/documentation/integration
        "timestamp"   => time(), // Time stamp
        "userName"    => "ABC", // Customer Name
        "siteName"    => "Maxelpay", // Website name
        "userEmail"   => "abc@gmail.com", // Customer Email
        "redirectUrl" => URL::to('success'), // Success URL
        "websiteUrl"  => URL::to('/'), // Website URL
        "cancelUrl"   => URL::to('cancel'), // Cancel URL
        "webhookUrl"  => URL::to('webhook') // Webhook URL
    );
$response = Maxelpay::payload($data);
// print_r($response);