diff --git a/src/FixSoftware/WebpayWS/Api.php b/src/FixSoftware/WebpayWS/Api.php index 7a7df8a..b9cf72e 100644 --- a/src/FixSoftware/WebpayWS/Api.php +++ b/src/FixSoftware/WebpayWS/Api.php @@ -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 */ @@ -83,4 +93,4 @@ public function getResponse() { } -} \ No newline at end of file +} diff --git a/src/FixSoftware/WebpayWS/Request.php b/src/FixSoftware/WebpayWS/Request.php index 69cb42f..d04bac7 100644 --- a/src/FixSoftware/WebpayWS/Request.php +++ b/src/FixSoftware/WebpayWS/Request.php @@ -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'; @@ -92,4 +92,4 @@ private function ucpos($subject) { return $n ? $matches[0][1] : false; } -} \ No newline at end of file +} diff --git a/src/FixSoftware/WebpayWS/Response.php b/src/FixSoftware/WebpayWS/Response.php index 52f3766..bf17ec1 100644 --- a/src/FixSoftware/WebpayWS/Response.php +++ b/src/FixSoftware/WebpayWS/Response.php @@ -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';