2017 © Pedro Peláez
 

library cardcom

image

elad/cardcom

  • Thursday, March 15, 2018
  • by gasner
  • Repository
  • 1 Watchers
  • 1 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 10 % Grown

The README.md

Cardcom Iframe

cardcom iframe php package, (*1)

Installation

Note: Cardcom Iframe is currently in beta., (*2)

composer require elad/cardcom

Basic Usage

use Cardcom\Iframe;
use Cardcom\Invoice;
use Cardcom\InvoiceProduct;
use Cardcom\Setting;

require 'vendor/autoload.php';


Setting::setTerminal(<yourTrminal>);
Setting::setUser(<yourUser>);

Create iframe

$iframe = new Iframe();
$iframe->setPrice(15);
$iframe->docTypeToCreate = 400;
//$iframe->setGoodUrl("http://secure.Cardcom.co.il/DealWasSuccessful.aspx");
$iframe->setGoodUrl("http://cardcom.try/response2.php");
$iframe->setErrorUrl("http://cardcom.try/error.php");

Create invoice

$invoice = new Invoice("elad gasner", "elad@closeapp.co.il");
$product = new InvoiceProduct("מעיל", 5, 1);
$product2 = new InvoiceProduct("מעיל רוח", 5, 2);
$invoice->setProducts([$product, $product2]);
$iframe->setInvoice($invoice);
$iframe = new Iframe();
$iframe->setPrice(15);
$iframe->setInvoice($invoice);
//you can any property from the cardcom api
$iframe->docTypeToCreate = 400;

$iframe->setGoodUrl("http://cardcom.try/response2.php");
$iframe->setErrorUrl("http://cardcom.try/error.php");

// get iframe link
$result = $iframe->getIframe();



if ($result->isSuccess()) {
  $link =  $result->getUrl();
}else{
    $result->getError();
}

Good Luck!, (*3)

The Versions

15/03 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by elad gasner

15/03 2018

0.1.2

0.1.2.0

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by elad gasner

02/08 2017

0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by elad gasner

02/08 2017

0.1.1

0.1.1.0

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by elad gasner

02/08 2017

0.0.3

0.0.3.0

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by elad gasner

19/07 2017

0.0.2

0.0.2.0

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by elad gasner

17/07 2017

0.0.1

0.0.1.0

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by elad gasner