Skip to content

A symfony wrapper bundle for Saman Electeronic Payment

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

moosti/SamanPaymentBundle

Repository files navigation

SamanPaymentBundle

A symfony wrapper bundle for Saman Electeronic Payment.

Install

Via Composer

composer require ericomgroup/saman-payment-bundle

Edit your app/AppKernel.php to register the bundle in the registerBundles() method as above if you haven't symfony flex:

class AppKernel extends Kernel
{

    public function registerBundles()
    {
        $bundles = array(
            // ...
            // register the bundle here
            new EricomGroup\SamanPaymentBundle\SamanPaymentBundle()
        );
    }
}

Usage

Wherever you have access to the service container :

<?php
    // get the saman_payment as a service
    $samanPayment = $this->container->get('saman_payment');

    // set merchantID and password
    $samanPayment->setMerchantId('your-merchantId')->setPassword('your-password');
    
    //receive param from bank gateway; (verify payed amount and return true or false)
    $result = $samanPayment->receiverParams($refNum, $state, $amountMustBePayed);

License

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

About

A symfony wrapper bundle for Saman Electeronic Payment

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published