Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jul 6, 2017
0 parents commit 8ab127b
Show file tree
Hide file tree
Showing 58 changed files with 2,541 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

build
.DS_Store
phpunit.local.xml
*.log

# IDE
.idea
.project
.settings
.buildpath
atlassian-ide-plugin.xml
*.bak

# Composer
vendor
composer.lock
composer.phar

# Project
var
tools

# Groc
node_modules
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Paycorp PHP Library
=====================

Paycorp API for Paycorp's REST web services.
21 changes: 21 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "bitixel/paycorp",
"description": "Paycorp API - PHP",
"license": "MIT",
"keywords": ["paycorp"],
"authors": [
{
"name": "Bitixel Crew",
"email": "[email protected]"
}
],
"require": {},
"require-dev": {
"phpunit/phpunit": "4.0.*"
},
"autoload": {
"psr-4": {
"bitixel\\paycorp\\": "src"
}
}
}
35 changes: 35 additions & 0 deletions src/GatewayClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace bitixel\paycorp;

use bitixel\paycorp\config\ClientConfig;
use bitixel\paycorp\facade\Payment;
use bitixel\paycorp\facade\Vault;

class GatewayClient {

private $payment;
private $vault;

public function __construct(ClientConfig $config) {
$this->payment = new Payment($config);
$this->vault = new Vault($config);
}

public function getPayment() {
return $this->payment;
}

public function setPayment($payment) {
$this->payment = $payment;
}

public function getVault() {
return $this->vault;
}

public function setVault($vault) {
$this->vault =$vault;
}

}
98 changes: 98 additions & 0 deletions src/component/CreditCard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?php

namespace bitixel\paycorp\component;

class CreditCard {

private $type;
private $holderName;
private $number;
private $expiry;
private $secureId;
private $secureIdSupplied;
private $track1;
private $track2;
private $track3;
private $cardChipData;

public function getType() {
return $this->type;
}

public function setType($type) {
$this->type = $type;
}

public function getHolderName() {
return $this->holderName;
}

public function setHolderName($holderName) {
$this->holderName = $holderName;
}

public function getNumber() {
return $this->number;
}

public function setNumber($number) {
$this->number = $number;
}

public function getExpiry() {
return $this->expiry;
}

public function setExpiry($expiry) {
$this->expiry = $expiry;
}

public function getSecureId() {
return $this->secureId;
}

public function setSecureId($secureId) {
$this->secureId = $secureId;
}

public function getSecureIdSupplied() {
return $this->secureIdSupplied;
}

public function setSecureIdSupplied($secureIdSupplied) {
$this->secureIdSupplied = $secureIdSupplied;
}

public function getTrack1() {
return $this->track1;
}

public function setTrack1($track1) {
$this->track1 = $track1;
}

public function getTrack2() {
return $this->track2;
}

public function setTrack2($track2) {
$this->track2 = $track2;
}

public function getTrack3() {
return $this->track3;
}

public function setTrack3($track3) {
$this->track3 = $track3;
}

public function getCardChipData() {
return $this->cardChipData;
}

public function setCardChipData($cardChipData) {
$this->cardChipData = $cardChipData;
}

}
83 changes: 83 additions & 0 deletions src/component/CreditTransaction.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?php

namespace bitixel\paycorp\component;

use bitixel\paycorp\enums\TransactionType;

class CreditTransaction {

private $clientId;
private $originalTxnReference;
private $creditCard;
private $transactionType;
private $transactionAmount;
private $clientRef;
private $comment;
private $extraData;

public function getClientId() {
return $this->clientId;
}

public function setClientId($clientId) {
$this->clientId = $clientId;
}

public function getOriginalTxnReference() {
return $this->originalTxnReference;
}

public function setOriginalTxnReference($originalTxnReference) {
$this->originalTxnReference = $originalTxnReference;
}

public function getCreditCard() {
return $this->creditCard;
}

public function setCreditCard(CreditCard $creditCard) {
$this->creditCard = $creditCard;
}

public function getTransactionType() {
return $this->transactionType;
}

public function setTransactionType(TransactionType $transactionType) {
$this->transactionType = $transactionType;
}

public function getTransactionAmount() {
return $this->transactionAmount;
}

public function setTransactionAmount(TransactionAmount $transactionAmount) {
$this->transactionAmount = $transactionAmount;
}

public function getClientRef() {
return $this->clientRef;
}

public function setClientRef($clientRef) {
$this->clientRef = $clientRef;
}

public function getComment() {
return comment;
}

public function setComment($comment) {
$this->comment = $comment;
}

public function getExtraData() {
return $this->extraData;
}

public function setExtraData($extraData) {
$this->extraData = $extraData;
}


}
40 changes: 40 additions & 0 deletions src/component/Redirect.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

namespace bitixel\paycorp\component;

class Redirect {

private $returnUrl;
private $cancelUrl;
private $returnMethod;

public function __construct($retrnUrl){
$this->returnUrl = $retrnUrl;
$this->returnMethod = 'GET';
}

public function getReturnUrl() {
return $this->returnUrl;
}

public function setReturnUrl($returnUrl) {
$this->returnUrl = $returnUrl;
}

public function getCancelUrl() {
return $this->cancelUrl;
}

public function setCancelUrl($cancelUrl) {
$this->cancelUrl = $cancelUrl;
}

public function getReturnMethod() {
return $this->returnMethod;
}

public function setReturnMethod($returnMethod) {
$this->returnMethod = $returnMethod;
}

}
26 changes: 26 additions & 0 deletions src/component/RequestHeader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace bitixel\paycorp\component;

class RequestHeader {

private $authToken;
private $hmac;

public function getAuthToken() {
return $this->authToken;
}

public function setAuthToken($authToken) {
$this->authToken = $authToken;
}

public function getHmac() {
return $this->hmac;
}

public function setHmac($hmac) {
$this->hmac = $hmac;
}

}
54 changes: 54 additions & 0 deletions src/component/ThreeDSecure.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

namespace bitixel\paycorp\component;

class ThreeDSecure {

private $xid;
private $eci;

// ucaf for mastercard
private $cavv;
private $vERes;
private $pARes;

public function getXid() {
return $this->xid;
}

public function setXid($xid) {
$this->xid = $xid;
}

public function getEci() {
return $this->eci;
}

public function setEci($eci) {
$this->eci = $eci;
}

public function getCavv() {
return $this->cavv;
}

public function setCavv($cavv) {
$this->cavv = $cavv;
}

public function getvERes() {
return $this->vERes;
}

public function setvERes($vERes) {
$this->vERes = $vERes;
}

public function getpARes() {
return $this->pARes;
}

public function setpARes($pARes) {
$this->pARes = $pARes;
}
}
Loading

0 comments on commit 8ab127b

Please sign in to comment.