定制 elad/cardcom 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elad/cardcom

Composer 安装命令:

composer require elad/cardcom

包简介

Cardcom iframe php package

README 文档

README

cardcom iframe php package

Installation

Note: Cardcom Iframe is currently in beta.

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);

Get iframe link

$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!

统计信息

  • 总下载量: 139
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-07-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固