diff --git a/src/Message/ShopServerAuthorizeRequest.php b/src/Message/ShopServerAuthorizeRequest.php index 8cdf7a7..c537991 100644 --- a/src/Message/ShopServerAuthorizeRequest.php +++ b/src/Message/ShopServerAuthorizeRequest.php @@ -85,6 +85,46 @@ public function getData() // Items/Cart details $data = array_merge($data, $this->getDataItems()); + if ($this->getMerchantInvoiceId()) { + $data['invoiceid'] = $this->getMerchantInvoiceId(); + } + + if ($this->getInvoiceDeliveryMode()) { + $data['invoice_deliverymode'] = $this->getInvoiceDeliveryMode(); + } + + if ($this->getInvoiceDeliveryDate()) { + $data['invoice_deliverydate'] = $this->getInvoiceDeliveryDate(); + } + + if ($this->getInvoiceDeliveryEndDate()) { + $data['invoice_deliveryenddate'] = $this->getInvoiceDeliveryEndDate(); + } + + if ($this->getInvoiceAppendix()) { + $data['invoiceappendix'] = $this->getInvoiceAppendix(); + } + + if ($this->getWalletType()) { + $data['wallettype'] = $this->getWalletType(); + } + + if ($this->getOnlinebankTransferType()) { + $data['onlinebanktransfertype'] = $this->getOnlinebankTransferType(); + } + + if ($this->getBankCountry()) { + $data['bankcountry'] = $this->getBankCountry(); + } + + if ($this->getIban()) { + $data['iban'] = $this->getIban(); + } + + if ($this->getMandateId()) { + $data['mandate_identification'] = $this->getMandateId(); + } + return $data; } @@ -92,4 +132,110 @@ protected function createResponse($data) { return $this->response = new ShopServerAuthorizeResponse($this, $data); } + + /** + * See static::INVOICE_DELIVERY_MODE_* + */ + public function setInvoiceDeliveryMode($deliveryMode) + { + return $this->setParameter('invoiceDeliveryMode', $deliveryMode); + } + + public function getInvoiceDeliveryMode() + { + return $this->getParameter('invoiceDeliveryMode'); + } + + public function setInvoiceDeliveryDate($deliveryDate) + { + return $this->setParameter('invoiceDeliveryDate', $deliveryDate); + } + + public function getInvoiceDeliveryDate() + { + return $this->getParameter('invoiceDeliveryDate'); + } + + /** + * @param string $deliveryEndDate Format YYYYMMDD + */ + public function setInvoiceDeliveryEndDate($deliveryEndDate) + { + return $this->setParameter('invoiceDeliveryEndDate', $deliveryEndDate); + } + + public function getInvoiceDeliveryEndDate() + { + return $this->getParameter('invoiceDeliveryEndDate'); + } + + public function setInvoiceAppendix($invoiceAppendix) + { + return $this->setParameter('invoiceAppendix', $invoiceAppendix); + } + + public function getInvoiceAppendix() + { + return $this->getParameter('invoiceAppendix'); + } + + public function setMerchantInvoiceId($invoiceId) + { + return $this->setParameter('merchantInvoiceId', $invoiceId); + } + + public function getMerchantInvoiceId() + { + return $this->getParameter('merchantInvoiceId'); + } + + public function setWalletType($walletType) + { + return $this->setParameter('walletType', $walletType); + } + + public function getWalletType() + { + return $this->getParameter('walletType'); + } + + public function setOnlinebankTransferType($onlinebankTransferType) + { + return $this->setParameter('onlinebankTransferType', $onlinebankTransferType); + } + + public function getOnlinebankTransferType() + { + return $this->getParameter('onlinebankTransferType'); + } + + public function setBankCountry($bankCountry) + { + return $this->setParameter('bankCountry', $bankCountry); + } + + public function getBankCountry() + { + return $this->getParameter('bankCountry'); + } + + public function setIban($iban) + { + return $this->setParameter('iban', $iban); + } + + public function getIban() + { + return $this->getParameter('iban'); + } + + public function getMandateId() + { + return $this->getParameter('mandateId'); + } + + public function setMandateId($id) + { + return $this->setParameter('mandateId', $id); + } } diff --git a/src/Message/ShopServerCaptureRequest.php b/src/Message/ShopServerCaptureRequest.php index 9746419..a552d07 100644 --- a/src/Message/ShopServerCaptureRequest.php +++ b/src/Message/ShopServerCaptureRequest.php @@ -79,6 +79,10 @@ public function getData() $data['invoiceappendix'] = $this->getInvoiceAppendix(); } + if ($this->getMandateId()) { + $data['mandate_identification'] = $this->getMandateId(); + } + return $data; } @@ -134,63 +138,4 @@ public function getSettleAccount() { return $this->getParameter('settleAccount'); } - - public function setMerchantInvoiceId($invoiceId) - { - return $this->setParameter('merchantInvoiceId', $invoiceId); - } - - public function getMerchantInvoiceId() - { - return $this->getParameter('merchantInvoiceId'); - } - - /** - * See static::INVOICE_DELIVERY_MODE_* - */ - public function setInvoiceDeliveryMode($deliveryMode) - { - return $this->setParameter('invoiceDeliveryMode', $deliveryMode); - } - - public function getInvoiceDeliveryMode() - { - return $this->getParameter('invoiceDeliveryMode'); - } - - /** - * @param string $deliveryDate Format YYYYMMDD - */ - public function setInvoiceDeliveryDate($deliveryDate) - { - return $this->setParameter('invoiceDeliveryDate', $deliveryDate); - } - - public function getInvoiceDeliveryDate() - { - return $this->getParameter('invoiceDeliveryDate'); - } - - /** - * @param string $deliveryEndDate Format YYYYMMDD - */ - public function setInvoiceDeliveryEndDate($deliveryEndDate) - { - return $this->setParameter('invoiceDeliveryEndDate', $deliveryEndDate); - } - - public function getInvoiceDeliveryEndDate() - { - return $this->getParameter('invoiceDeliveryEndDate'); - } - - public function setInvoiceAppendix($invoiceAppendix) - { - return $this->setParameter('invoiceAppendix', $invoiceAppendix); - } - - public function getInvoiceAppendix() - { - return $this->getParameter('invoiceAppendix'); - } }