Download the PHP package dgvai/laravel-sslcommerz without Composer

On this page you can find all versions of the php package dgvai/laravel-sslcommerz. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sslcommerz

SSLCommerz Payment Gateway Package for Laravel

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads composer.lock

This package is built for SSLCommerz online payment gateway in Bangladesh for Laravel 5.5+, 6.x and 7.x. (not tested for lower versions (< 5.5))

Contents

Installation

You can install the package via composer:

Publish Configuration

Publish configuration file

Setup and configure

Update your app environment (.env)

NOTE SSLCROUTE* variables are route name() not url()

Create four POST routes for SSLCommerz

NOTE These named routes are being used in .env file

Add exception in app\Http\Middleware\VerifyCsrfToken.php

NOTE This will be the initial group of those four routes

After done configuraing

Usage

Make Payment

Now you can call for payment in you controller method:

NOTE This is the minimalist basic need to perform a payment.

Refund Process

Also you can call for Refund Request and check Refund State

Transaction Query

Also you can query for your Transaction based on the Transaction ID you provided.

Available Methods

required amount($amount)

Description: Set the amount of payment

Usage: $sslc->amount(50)

required trxid($trxid = null)

Description: Set the Transaction ID. If null passed, php uniqid() will be used to generate the TrxID

Usage: $sslc->trxid(mt_rand(10000000,999999999))

required product($name [,$category])

Description: Set the Product Name (required) and Category (optional)

Usage: $sslc->product($product->name, $product->category)

required customer($name, $email [,$phone, $address, $city, $state, $postal, $country, $fax])

Description: Set the Customer Name and Email (required), Phone,Address,City,State,Postal Code, Country, FAX Code (optional)

Usage: $sslc->customer($user->name, $user->email, $user->phone)

optional setUrl($url_array[])

Description: To Manually set the success,failure,cancel and ipn URL not using from .env one

Usage: $sslc->setUrl([route('custome.success'), route('custom.failure'), .. ])

optional setCurrency($currency)

Description: To Manually set the currency not using from .env one

Usage: $sslc->setCurrency('USD')

optional setBin($bin)

Description: You can provide the BIN of card to allow the transaction must be completed by this BIN. You can declare by coma ',' separate of these BIN. Example: 371598,371599,376947,376948,376949

Usage: $sslc->setBin('371598,371599,376947')

optional enableEMI($installment, $max_installment, bool $restrict_emi_only = false)

Description: This method enables EMI payment.

installment = Customer selects from your Site, So no instalment option will be displayed at gateway page

max_installment = Max instalment Option, Here customer will get 3,6, 9 instalment at gateway page

restrict_emi_only = Value is true/false, if value is true then only EMI transaction is possible, in payment page. No Mobile banking and internet banking channel will not display.

Usage: $sslc->enableEMI(5,12,false)

optional setShipping($product_number, $name, $address, $city [,$postal, $state, $country])

Description: This method sets shipping details. Not required usually!

Usage: $sslc->setShipping(5,'productname','24/7 Beijing Street','Dhaka',1234)

optional setAirlineTicketProfile($flight_type, $hours_till_departure, $pnr, $journey_from_to, $third_party_booking)

Description: This method is Mandatory, if product_profile is airline-tickets! Not usually required! See Official Documentation for this section.

Usage: $sslc->setAirlineTicketProfile('bus',3,1,'DHK-RAJ',null)

optional setTravelVerticalProfile($hotel_name, $length_of_stay, $check_in_time, $hotel_city)

Description: This method is Mandatory, if product_profile is travel-vertical! Not usually required! See Official Documentation for this section.

Usage: $sslc->setTravelVerticalProfile('Dalas',3,'12:00pm',Rajshahi)

optional setTelecomVerticleProfile($product_type, $topup_number, $country_topup)

Description: This method is Mandatory, if product_profile is telecom-vertical! Not usually required! See Official Documentation for this section.

Usage: $sslc->setTelecomVerticleProfile('Flexiload',0170000000,'BD')

optional setCarts($cart, $product_amount, $vat, $discount_amount, $convenience_fee)

Description: This method is not usually used! See Official Documentation for this section.

Usage: $sslc->setCarts($cart_json,5,'3%','20%','500')

optional setExtras($extra1, $extra2, $extra3, $extra4)

Description: This method is used to pass to the success/failure response as extra parameter, if it is needed. Not mandatory! See Official Documentation for this section.

Usage: $sslc->setExtras($my_token)

required make_payment($checkout = false)

Description: Make the payment. 1. For hosted mode (default), pass nothing/false. 2. For checkout mode, pass the first param true, and it will return JSON

Usage: $sslc->make_payment()

Changelog

Please see CHANGELOG for more information what has changed recently.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-sslcommerz with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ~7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dgvai/laravel-sslcommerz contains the following files

Loading the files please wait ....