Code Monkey home page Code Monkey logo

codeignitercardompayment's Introduction

CodeigniterCardomPayment

Easy Implement Of Cardcom Payment Api (lowprofile) (Cardcom : http://www.cardcom.co.il/) This Implement The lowprofile Iframe Or Redrice type of payment (http://kb.cardcom.co.il/article/AA-00412/61/) You can feel free to extend this and support few more types of payments.

Install

1. Copy Application File To your Codeigniter Framework Folder

2. Loading Libary

    $this->load->library('cardcom_payment');

3. Initialize Config Params:

enter to application/config/cardcom_payment , and change the config parameters.

  • terminal_number - number of your private terminal (1000 for testing)
  • username - your username if cardcom system
  • api_level - currectly support fully api 9
  • codepage
$config['terminal_number'] = '';
$config['username'] = '';
$config['api_level'] = 9;
$config['codepage'] = 65001;

Usage

Get lowprofile redirect | iframe Url

        $cardcom = array(
			'Language'=>'he',
			'CoinID'=>'1',
			'SumToBill'=>PRICE,
			'ProductName'=>'כרטיסי נסיעה',
			'SuccessRedirectUrl'=> site_url('/order/order_success'),
			'ErrorRedirectUrl'=>site_url('/order/order_error'),
		);
		#if true will automatic redrict to url
		$this->cardcom_payment->getCardcomPaymentRedirectUrl($cardcom,true);

Set Invoice Data

if you want also to send an invoice to the buyer follow this.

		$invoices = array(
			'CustName' => $CUSTOMER_NAME,
			'SendByEmail' => "true" | pass as STRING,
			'Language' => 'he',
			'Email' => $EMAIL,
			'Items' => array(),
		);
		foreach ($order_data['data'] as $item) {
			$invoices['Items'][] = array(
				'Description' => $item->DESC,
				'Price' => $item->PRICE,
				'Quantity' => $item->quantity
			);	
		}
	$this->cardcom_payment->setInvoiceData($invoices);

codeignitercardompayment's People

Contributors

yuri1992 avatar

Stargazers

Oz Ardazi avatar

Watchers

 avatar

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.