Code Monkey home page Code Monkey logo

halk's Introduction

Halkbank Payment Gateway for Laravel

Halk logo

Integrate Halkbank's online payment gateway seamlessly into your Laravel application with this dedicated package. Designed specifically for Macedonian businesses, this package provides an easy-to-use interface for integrating Halkbank payment services.

Credits

This package was created by KalimeroMK.

License

This package is open-sourced software licensed under the MIT license.

Prerequisites

Before you begin, ensure you have the following:

  • PHP >= 7.4

Installation

Follow these steps to install the package:

Install via Composer Run the following command to install the package:

composer require kalimeromk/halkbank-payment

Publish Configurations and Views

php artisan vendor:publish --provider="Kalimeromk\HalkbankPayment\HalkBankPaymentServiceProvider"

Middleware

Pls register CsrfExemptMiddleware in the Kernel of laravel app

Configure the Package

Edit the published config/payment.php with your Halkbank credentials and settings. Usage

Routes

Route::prefix('payment')->group(function () {
    Route::get('/{amount}', [PaymentController::class, 'showPaymentForm'])->name('payment.form');
    Route::post('/', [PaymentController::class, 'showPaymentForm'])->name('payment.post');
    Route::get('success', [PaymentController::class, 'paymentSuccess'])->name('payment.success')->middleware('csrf_exempt');
    Route::get('fail', [PaymentController::class, 'paymentFail'])->name('payment.fail')->middleware('csrf_exempt');
});

Customization

Views:

Customize the payment form in resources/views/vendor/payment.

Controller:

Extend PaymentController to modify or add new payment processing logic.

Routes:

Add new routes in your Laravel application as needed.

Halkbank Payment Gateway Configuration .env

PAYMENT_CLIENT_ID=
PAYMENT_STORE_KEY=
PAYMENT_STORE_TYPE=
PAYMENT_CURRENCY=807
PAYMENT_TRANSACTION_TYPE=Auth
PAYMENT_OK_URL=http://localhost:87/payment-success
PAYMENT_FAIL_URL=http://localhost:87/payment-fail
PAYMENT_LANG=en
PAYMENT_LAYOUT=

Fail url

Fail url returns post form with this array

[
    'ReturnOid' => '',
    'TRANID' => '',
    'PAResSyntaxOK' => '',
    'islemtipi' => '',
    'refreshtime' => '',
    'lang' => '',
    'merchantID' => '',
    'maskedCreditCard' => '',
    'amount' => '',
    'sID' => '',
    'RECEIVERPAN' => '',
    'ACQBIN' => '',
    'Ecom_Payment_Card_ExpDate_Year' => '',
    'MaskedPan' => '',
    'merchantName' => '',
    'clientIp' => '',
    '_token' => '',
    'iReqDetail' => '',
    'okUrl' => '',
    'md' => '',
    'ProcReturnCode' => '',
    'payResults_dsId' => '',
    'taksit' => '',
    'vendorCode' => '',
    'TransId' => '',
    'EXTRA_TRXDATE' => '',
    'Ecom_Payment_Card_ExpDate_Month' => '',
    'storetype' => '',
    'iReqCode' => '',
    'Response' => '',
    'SettleId' => '',
    'mdErrorMsg' => '',
    'ErrMsg' => '',
    'PAResVerified' => '',
    'cavv' => '',
    'digest' => '',
    'HostRefNum' => '',
    'callbackCall' => '',
    'AuthCode' => '',
    'failUrl' => '',
    'terms' => '',
    'cavvAlgorithm' => '',
    'xid' => '',
    'encoding' => '',
    'currency' => '',
    'oid' => '',
    'AcquirerAllowedFallback' => '',
    'mdStatus' => '',
    'dsId' => '',
    'eci' => '',
    'version' => '',
    'clientid' => '',
    'txstatus' => '',
    'HASH' => '',
    'rnd' => '',
    'HASHPARAMS' => '',
    'HASHPARAMSVAL' => '',
    'countdown' => ''
]

halk's People

Contributors

kalimeromk avatar

Stargazers

Talevski Igor avatar  avatar Aleksandar Trajchevski avatar Blasko Strasevski avatar  avatar  avatar Sentice avatar Bojan Petkovski avatar Davor Minchorov avatar Dejan Duracoski avatar Xhevat Ziberi avatar

Watchers

 avatar

Forkers

dedurus

halk's Issues

Refunds

Is there any options for refunds ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.