Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 30 additions & 27 deletions src/LinkORB/Buckaroo/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ class Request

public function __construct($websiteKey = null, $testMode = false, array $soapOptions = array())
{

$this->websiteKey = $websiteKey;
$this->testMode = $testMode;

$wsdl_url = "https://checkout.buckaroo.nl/soap/soap.svc?wsdl";
$this->soapClient = new SoapClientWSSEC($wsdl_url, array_merge(static::$defaultSoapOptions, $soapOptions));
}
$wsdl_url = "https://checkout.buckaroo.nl/soap/soap.svc?wsdl";
$this->soapClient = new SoapClientWSSEC($wsdl_url, array_merge(static::$defaultSoapOptions, $soapOptions));
}

public function loadPem($filename)
{
Expand All @@ -47,7 +47,7 @@ public function loadPem($filename)

public function setChannel($channel)
{
$this->channel = $channel;
$this->channel = $channel;
}

public function sendRequest($TransactionRequest, $type)
Expand Down Expand Up @@ -95,39 +95,42 @@ public function sendRequest($TransactionRequest, $type)
$soapHeaders[] = new \SOAPHeader('https://checkout.buckaroo.nl/PaymentEngine/', 'MessageControlBlock', $Header->MessageControlBlock);
$soapHeaders[] = new \SOAPHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $Header->Security);
$this->soapClient->__setSoapHeaders($soapHeaders);
if ($this->testMode) {
$this->soapClient->__SetLocation('https://testcheckout.buckaroo.nl/soap/');
} else {
$this->soapClient->__SetLocation('https://checkout.buckaroo.nl/soap/');
}

if ($this->testMode) {
$this->soapClient->__SetLocation('https://testcheckout.buckaroo.nl/soap/');
} else {
$this->soapClient->__SetLocation('https://checkout.buckaroo.nl/soap/');
}

$return = array();
switch($type) {
case 'invoiceinfo':
switch($type) {
case 'invoiceinfo':
$return['result'] = $this->soapClient->InvoiceInfo($TransactionRequest);
break;
case 'transaction':
$return['result'] = $this->soapClient->TransactionRequest($TransactionRequest);
break;
break;
case 'transaction':
$return['result'] = $this->soapClient->TransactionRequest($TransactionRequest);
break;
case 'transactionstatus':
$return['result'] = $this->soapClient->TransactionStatus($TransactionRequest);
break;
case 'refundinfo':
case 'refundinfo':
$return['result'] = $this->soapClient->RefundInfo($TransactionRequest);
break;
}
break;
case 'data':
$return['result'] = $this->soapClient->DataRequest($TransactionRequest);
break;
}

$return['response'] = $this->soapClient->__getLastResponse();
$return['request'] = $this->soapClient->__getLastRequest();
return $return;
}
$return['response'] = $this->soapClient->__getLastResponse();
$return['request'] = $this->soapClient->__getLastRequest();
return $return;
}

/**
* @param boolean $testMode
* @return Request
*/
public function setTestMode($testMode)
public function setTestMode($testMode)
{
$this->testMode = $testMode;

Expand All @@ -137,7 +140,7 @@ public function setTestMode($testMode)
/**
* @return boolean
*/
public function getTestMode()
public function getTestMode()
{
return $this->testMode;
}
Expand All @@ -156,7 +159,7 @@ public function setCulture($culture)
/**
* @return string
*/
public function getCulture()
public function getCulture()
{
return $this->culture;
}
Expand Down