Skip to content
Open
Show file tree
Hide file tree
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
16 changes: 13 additions & 3 deletions src/FixSoftware/WebpayWS/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,18 @@ class Api {

/** @var array */
private $soapWrapperNameIrregulars = [
'processMasterPaymentRevoke' => 'masterPaymentStatus'
// TODO: add other irregularities
'processMasterPaymentRevoke' => [
'request' => 'masterPaymentStatusRequest',
'response' => 'masterPaymentStatusResponse',
],
'processBatchClose' => [
'request' => 'batchClose',
'response' => 'batchCloseResponse',
],
'processRefund' => [
'request' => 'refundRequest',
'response' => 'refundRequestResponse',
],
];

/** @var Config */
Expand Down Expand Up @@ -83,4 +93,4 @@ public function getResponse() {

}

}
}
4 changes: 2 additions & 2 deletions src/FixSoftware/WebpayWS/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function getSoapMethod() {
public function getSoapWrapperName() {

if(isset($this->soapWrapperNameIrregulars[$this->method]))
return $this->soapWrapperNameIrregulars[$this->method] . 'Request';
return $this->soapWrapperNameIrregulars[$this->method]['request'];

return lcfirst(substr($this->method, $this->ucpos($this->method))) . 'Request';

Expand All @@ -92,4 +92,4 @@ private function ucpos($subject) {
return $n ? $matches[0][1] : false;
}

}
}
2 changes: 1 addition & 1 deletion src/FixSoftware/WebpayWS/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function getError() {
public function getSoapWrapperName() {

if(isset($this->soapWrapperNameIrregulars[$this->method]))
return $this->soapWrapperNameIrregulars[$this->method] . 'Response';
return $this->soapWrapperNameIrregulars[$this->method]['response'];

return lcfirst(substr($this->method, $this->ucpos($this->method))) . 'Response';

Expand Down