All Projects → sslcommerz → SSLCommerz-Laravel

sslcommerz / SSLCommerz-Laravel

Licence: other
SSLCOMMERZ is a bangladeshi payment gateway provider. This is Laravel Library for SSLCOMMERZ.

Programming Languages

PHP
23972 projects - #3 most used programming language
Blade
752 projects

Projects that are alternatives of or similar to SSLCommerz-Laravel

Paynow-NodeJS-SDK
NodeJS SDK for Zimbabwe's leading payments gateway, Paynow
Stars: ✭ 23 (-65.15%)
Mutual labels:  payment, payment-gateway
midtrans-python-client
Official Midtrans Payment API Client for Python | https://midtrans.com
Stars: ✭ 24 (-63.64%)
Mutual labels:  payment, payment-gateway
adyen-python-api-library
Adyen API Library for Python
Stars: ✭ 41 (-37.88%)
Mutual labels:  payment, payment-gateway
PayPalPlugin
Official integration with PayPal Commerce Platform
Stars: ✭ 21 (-68.18%)
Mutual labels:  payment, payment-gateway
youzan-pay
基于有赞云和有赞微小店实现个人收款解决方案。
Stars: ✭ 69 (+4.55%)
Mutual labels:  payment, payment-gateway
PaymentCardView
Custom Credit/Debit card view
Stars: ✭ 62 (-6.06%)
Mutual labels:  payment, payment-gateway
adyen-salesforce-commerce-cloud
Salesforce Commerce Cloud (formerly Demandware)
Stars: ✭ 63 (-4.55%)
Mutual labels:  payment, payment-gateway
cybersource-sdk-java
Java SDK for CyberSource Simple Order API
Stars: ✭ 44 (-33.33%)
Mutual labels:  payment, payment-gateway
paymentgateway
Dokumentace ČSOB platební brány a jejího eAPI pro platby platebními kartami, Apple Pay, mallpay a platebními tlačítky ČSOB.
Stars: ✭ 104 (+57.58%)
Mutual labels:  payment, payment-gateway
adyen-dotnet-api-library
Adyen API Library for .NET
Stars: ✭ 69 (+4.55%)
Mutual labels:  payment, payment-gateway
python-daraja
Python Wrapper for interacting with the MPESA Daraja API. More Features to be implemented
Stars: ✭ 20 (-69.7%)
Mutual labels:  payment, payment-gateway
cybersource-android-sdk
The CyberSource InApp SDK enables developers to simply and securely incorporate mobile payments into their Android applications.
Stars: ✭ 25 (-62.12%)
Mutual labels:  payment, payment-gateway
omnipay-2checkout
2Checkout driver for the Omnipay PHP payment processing library
Stars: ✭ 25 (-62.12%)
Mutual labels:  payment, payment-gateway
sep-pay
Pay.ir Payment Package for Laravel 5.3+
Stars: ✭ 17 (-74.24%)
Mutual labels:  payment, payment-gateway
laravel-pix
Uma solucão simples para integrar sua aplicação Laravel a API PIX do Banco Central do Brasil
Stars: ✭ 73 (+10.61%)
Mutual labels:  payment, payment-gateway
cashier
Cashier is an Elixir library that aims to be an easy to use payment gateway, whilst offering the fault tolerance and scalability benefits of being built on top of Erlang/OTP
Stars: ✭ 43 (-34.85%)
Mutual labels:  payment, payment-gateway
adyen-node-api-library
Adyen API Library for Node.js
Stars: ✭ 82 (+24.24%)
Mutual labels:  payment, payment-gateway
react-native-payumoney
React Native Payumoney (Android/IOS)
Stars: ✭ 18 (-72.73%)
Mutual labels:  payment, payment-gateway
nagadApi
This is Bangladeshi nagad payment gateway api development library. This library can be used in any php application.
Stars: ✭ 20 (-69.7%)
Mutual labels:  payment, payment-gateway
awesome-payment
A curated list of payment services
Stars: ✭ 22 (-66.67%)
Mutual labels:  payment, payment-gateway

SSLCommerz - Laravel Library

Tags: Payment Gateway, SSLCommerz, IPN

Requires: Laravel >= 5.6 and MySQL

License: GPLv2 or later

Core Library Directory Structure

 |-- config/
    |-- sslcommerz.php
 |-- app/Library/SslCommerz
    |-- AbstractSslCommerz.php (core file)
    |-- SslCommerzInterface.php (core file)
    |-- SslCommerzNotification.php (core file)
 |-- README.md
 |-- orders.sql (sample)

Instructions:

  • Step 1: Download and extract the library files.

  • Step 2: Copy the Library folder and put it in the laravel project's app/ directory. If needed, then run composer dump -o.

  • Step 3: Copy the config/sslcommerz.php file into your project's config/ folder.

Now, we have already copied the core library files. Let's do copy some other helpers files that is provided to understand the integration process. The other files are not related to core library.

  • Optional: If you later encounter issues with session destroying after redirect, you can set 'same_site' => null, in your config/session.php file.

  • Step 4: Add STORE_ID and STORE_PASSWORD values on your project's .env file. You can register for a store at https://developer.sslcommerz.com/registration/

  • Step 5: Copy the SslCommerzPaymentController into your project's Controllers folder.

  • Step 6: Copy the defined routes from routes/web.php into your project's route file.

  • Step 7: Add the below routes into the $excepts array of VerifyCsrfToken middleware.

protected $except = [
    '/pay-via-ajax', '/success','/cancel','/fail','/ipn'
];
  • Step 8: Copy the resources/views/*.blade.php files into your project's resources/views/ folder.

Now, let's go to the main integration part.

  • Step 9: To integrate popup checkout, use the below script before the end of body tag.
For Sandbox
<script>
    (function (window, document) {
        var loader = function () {
            var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0];
            script.src = "https://sandbox.sslcommerz.com/embed.min.js?" + Math.random().toString(36).substring(7);
            tag.parentNode.insertBefore(script, tag);
        };

        window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader);
    })(window, document);
</script>
For Live
<script>
    (function (window, document) {
        var loader = function () {
            var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0];
            script.src = "https://seamless-epay.sslcommerz.com/embed.min.js?" + Math.random().toString(36).substring(7);
            tag.parentNode.insertBefore(script, tag);
        };
    
        window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader);
    })(window, document);
</script>
  • Step 10: Use the below button where you want to show the "Pay Now" button:
<button class="your-button-class" id="sslczPayBtn"
        token="if you have any token validation"
        postdata="your javascript arrays or objects which requires in backend"
        order="If you already have the transaction generated for current order"
        endpoint="/pay-via-ajax"> Pay Now
</button>
  • Step 11: For EasyCheckout (Popup) integration, you can update the checkout_ajax.php or use a different file according to your need. We have provided a basic sample page from where you can kickstart the payment gateway integration.

  • Step 12: For Hosted Checkout integration, you can update the checkout_hosted.php or use a different file according to your need. We have provided a basic sample page from where you can kickstart the payment gateway integration.

  • Step 13: For redirecting action from SSLCommerz Payment gateway, we have also provided sample success.php, cancel.php, fail.phpfiles. You can update those files according to your need.

Contributors

Prabal Mallick

Md. Rakibul Islam

[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].