diff --git a/Client/Gateway.php b/Client/Gateway.php
new file mode 100755
index 0000000..6128167
--- /dev/null
+++ b/Client/Gateway.php
@@ -0,0 +1,56 @@
+httpClient = $httpClient;
+ }
+
+ /** {@inheritdoc} */
+ public function send($paymentAccessKey, $parameters, $hostAddress)
+ {
+ $encodedData = base64_encode($paymentAccessKey);
+ $headers = [
+ 'Content-Type' => 'application/json',
+ 'charset' => 'utf-8',
+ 'Accept' => 'application/json',
+ 'X-NN-Access-Key' => $encodedData,
+ ];
+
+ $response = $this->httpClient->request(
+ 'POST',
+ $hostAddress,
+ $this->getRequestOptions($parameters, $headers)
+ );
+ $result = json_decode($response->getBody(true), true);
+ return $result;
+ }
+
+ /**
+ * @param object $config
+ * @return array
+ */
+ protected function getRequestOptions($parameters, $headers)
+ {
+ $requestOptions = [
+ 'json' => $parameters,
+ 'headers' => $headers
+ ];
+
+ return $requestOptions;
+ }
+}
diff --git a/Client/GatewayInterface.php b/Client/GatewayInterface.php
new file mode 100755
index 0000000..a0e44fd
--- /dev/null
+++ b/Client/GatewayInterface.php
@@ -0,0 +1,16 @@
+get(DoctrineHelper::class);
+ $novalnetTransactionDetails->setToken(null);
+ $novalnetTransactionDetails->setPaymentData(null);
+ $entityManager = $doctrineHelper->getEntityManager('NovalnetBundle:NovalnetTransactionDetails');
+ $entityManager->persist($novalnetTransactionDetails);
+ $entityManager->flush();
+ } catch (\Exception $exception) {
+ $success = false;
+ }
+
+ return new JsonResponse(['successful' => $success]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getSubscribedServices()
+ {
+ return array_merge(parent::getSubscribedServices(), [
+ DoctrineHelper::class
+ ]);
+ }
+}
diff --git a/Controller/NovalnetExtensionController.php b/Controller/NovalnetExtensionController.php
new file mode 100755
index 0000000..baefc0d
--- /dev/null
+++ b/Controller/NovalnetExtensionController.php
@@ -0,0 +1,357 @@
+getNovalnetTransactionDetails($paymentTransaction);
+
+ return ['transactionDetails' => $transactionDetails];
+ }
+
+
+ /**
+ * @Route(
+ * "/show-refund/{paymentTransactionId}/",
+ * name="novalnet_transaction_show_refund"
+ * )
+ * @ParamConverter(
+ * "paymentTransaction",
+ * class="OroPaymentBundle:PaymentTransaction",
+ * options={"id" = "paymentTransactionId"}
+ * )
+ * @Template
+ */
+ public function showRefundAction(PaymentTransaction $paymentTransaction)
+ {
+ $transactionDetails = $this->getNovalnetTransactionDetails($paymentTransaction);
+ return ['transactionDetails' => $transactionDetails];
+ }
+
+
+ /**
+ * @Route(
+ * "/execute-refund",
+ * name="novalnet_transaction_execute_refund",
+ * methods={"POST"}
+ * )
+ * @CsrfProtection()
+ *
+ * @param Request $request
+ * @return JsonResponse
+ */
+ public function executeRefundAction(Request $request)
+ {
+
+ $tid = $request->get('tid');
+ $amount = $request->get('amount');
+ $reason = $request->get('reason');
+ $paymentAccessKey = $request->get('paymentAccessKey');
+ $paymentTransactionID = $request->get('paymentTransactionID');
+
+ $data = [];
+
+ // Build Merchant Data
+ $data['transaction'] = [
+
+ // the TID which need to be refund
+ 'tid' => $tid,
+
+ // The refund amount
+ 'amount' => $amount,
+ ];
+ $data['custom'] = [
+ 'shop_invoked' => 1
+ ];
+
+ if(!empty($reason))
+ {
+ $data['transaction']['reason'] = $reason;
+ }
+ $client = $this->get(Gateway::class);
+ $response = $client->send($paymentAccessKey, $data, 'https://payport.novalnet.de/v2/transaction/refund');
+
+
+ if ($response['result']['status_code'] == 100) {
+ $repository = $this->getDoctrine()->getRepository(NovalnetTransactionDetails::class);
+ $nnTransactionDetail = $repository->findOneBy(['tid' => $tid]);
+
+ $orderRepository = $this->getDoctrine()->getRepository(Order::class);
+ $orderDetails = $orderRepository->findOneBy(['id' => $nnTransactionDetail->getOrderNo()]);
+
+ $novalnetHelper = $this->get(NovalnetHelper::class);
+ $doctrineHelper = $this->get(DoctrineHelper::class);
+ $translator = $this->get(TranslatorInterface::class);
+ $paymentTransaction = $this->getDoctrine()->getRepository(PaymentTransaction::class)->findOneBy([
+ 'id' => $paymentTransactionID
+ ]);
+
+ $comments = sprintf(
+ $translator->trans('novalnet.refund_with_parent_tid'),
+ $response['transaction']['tid'],
+ $novalnetHelper->amountFormat($response['transaction']['refund']['amount']),
+ $response['transaction']['refund']['currency']
+ );
+
+ if ($response['transaction']['refund']['tid']) {
+ $comments = sprintf(
+ $translator->trans('novalnet.refund_with_child_tid'),
+ $response['transaction']['tid'],
+ $novalnetHelper->amountFormat($response['transaction']['refund']['amount']),
+ $response['transaction']['refund']['currency'],
+ $response['transaction']['refund']['tid']
+ );
+ }
+
+ $novalnetHelper->updateOrderComments($orderDetails, $doctrineHelper, $comments);
+ $novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+
+ $paymentTransactionProvider = $this->get(PaymentTransactionProvider::class);
+ $paymentTransactionProvider->savePaymentTransaction($paymentTransaction);
+
+ $refundedAmount = $nnTransactionDetail->getRefundedAmount() + $response['transaction']['refund']['amount'];
+
+ $nnTransactionDetail->setRefundedAmount($refundedAmount);
+ $nnTransactionDetail->setStatus($response['transaction']['status']);
+
+ $entityManager = $doctrineHelper->getEntityManager('NovalnetBundle:NovalnetTransactionDetails');
+
+ $entityManager->persist($nnTransactionDetail);
+ $entityManager->flush();
+ }
+
+
+ return new JsonResponse($response);
+ }
+
+ /**
+ * @Route(
+ * "/execute-manage-transaction",
+ * name="novalnet_transaction_execute_manage_transaction",
+ * methods={"POST"}
+ * )
+ * @CsrfProtection()
+ *
+ * @param Request $request
+ * @return JsonResponse
+ */
+ public function executeManageTransactionAction(Request $request)
+ {
+ $tid = $request->get('tid');
+ $action = $request->get('transactionAction');
+ $paymentAccessKey = $request->get('paymentAccessKey');
+ $paymentTransactionID = $request->get('paymentTransactionID');
+
+ $data = [];
+
+ // Build Merchant Data
+ $data['transaction'] = [
+
+ // The TID which need to be captured
+ 'tid' => $tid,
+ ];
+ $data['custom'] = [
+ 'shop_invoked' => 1
+ ];
+
+ $url = 'https://payport.novalnet.de/v2/transaction/' . $action;
+
+ if($action == 'instalment_cancel') {
+ $data['instalment']['tid'] = $tid;
+ unset($data['transaction']);
+ $url = 'https://payport.novalnet.de/v2/instalment/cancel';
+ }
+
+ $client = $this->get(Gateway::class);
+
+ $response = $client->send($paymentAccessKey, $data, $url);
+
+
+ if ($response['result']['status_code'] == 100) {
+ $repository = $this->getDoctrine()->getRepository(NovalnetTransactionDetails::class);
+ $nnTransactionDetail = $repository->findOneBy(['tid' => $tid]);
+
+ $novalnetHelper = $this->get(NovalnetHelper::class);
+ $doctrineHelper = $this->get(DoctrineHelper::class);
+ $translator = $this->get(TranslatorInterface::class);
+
+ $nnTransactionDetail->setStatus($response['transaction']['status']);
+ $entityManager = $doctrineHelper->getEntityManager('NovalnetBundle:NovalnetTransactionDetails');
+ $entityManager->persist($nnTransactionDetail);
+ $entityManager->flush();
+
+ $orderRepository = $this->getDoctrine()->getRepository(Order::class);
+ $orderDetails = $orderRepository->findOneBy(['id' => $nnTransactionDetail->getOrderNo()]);
+
+ $paymentTransaction = $this->getDoctrine()->getRepository(PaymentTransaction::class)->findOneBy([
+ 'id' => $paymentTransactionID
+ ]);
+
+ $comments = sprintf(
+ $translator->trans('novalnet.transaction_confirmed'),
+ date('d-m-Y'),
+ date('H:i:s')
+ );
+
+ if (in_array($response['transaction']['status'], ['DEACTIVATED', 'FAILURE'])) {
+ $comments = ($action == 'instalment_cancel') ? sprintf(
+ $translator->trans('novalnet.instalment_cancel_text'), $tid) : sprintf(
+ $translator->trans('novalnet.transaction_cancelled'),
+ date('d-m-Y'),
+ date('H:i:s')
+ );
+ } elseif ($nnTransactionDetail->getPaymentType() == 'PAYPAL') {
+ $paymentData = ['paypal_account' => $response['transaction']['payment_data']['paypal_account']];
+ $nnTransactionDetail->setPaymentData(json_encode($paymentData));
+ }
+
+ if($response['transaction']['status'] == 'CONFIRMED' && !empty($response['transaction']['bank_details'])) {
+ $novalnetHelper->prepareInvoiceComments($translator, $comments, $response);
+ }
+
+ $novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $paymentTransactionProvider = $this->get(PaymentTransactionProvider::class);
+ $paymentTransactionProvider->savePaymentTransaction($paymentTransaction);
+
+ $novalnetHelper->updateOrderComments($orderDetails, $doctrineHelper, $comments);
+ }
+ return new JsonResponse($response);
+ }
+
+
+ /**
+ * Get Novalnet Transaction Details
+ * @param $paymentTransaction
+ * @return array
+ */
+ public function getNovalnetTransactionDetails($paymentTransaction)
+ {
+ $doctrineHelper = $this->get(DoctrineHelper::class);
+ $order = $doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+
+ $paymentCode = preg_replace('/_[0-9]{1,}$/', '', $paymentTransaction->getPaymentMethod());
+
+ $paymentProviderNamespace = ' Novalnet\/Bundle\/NovalnetBundle\/PaymentMethod\/Provider\/';
+ $paymentProviderNamespace = str_replace('/', '', $paymentProviderNamespace);
+ $paymentProviderClass = str_replace(' ', '', ucwords(str_replace('_', ' ', $paymentCode)));
+
+ $paymentProvider = $this->get(trim($paymentProviderNamespace.$paymentProviderClass.'MethodProvider'));
+ $paymentMethod = $paymentProvider->getPaymentMethod($paymentTransaction->getPaymentMethod());
+
+ $paymentAccessKey = $paymentMethod->config->getPaymentAccessKey();
+
+ $repository = $this->getDoctrine()->getRepository(NovalnetTransactionDetails::class);
+
+ $qryBuilder = $repository->createQueryBuilder('nn')
+ ->select('nn.tid, nn.amount, nn.paymentType, nn.additionalInfo, nn.status')
+ ->where('nn.orderNo = :orderNo')
+ ->setParameter('orderNo', (string) $order->getId());
+
+ $transactionDetails = $qryBuilder->getQuery()->getArrayResult();
+ $transactionDetails[0]['instalmentDetails'] = [];
+ if($transactionDetails[0]['additionalInfo']) {
+ $transactionDetails[0]['instalmentDetails'] = json_decode($transactionDetails[0]['additionalInfo'], true);
+ }
+ $transactionDetails[0]['paymentAccessKey'] = $paymentAccessKey;
+ $transactionDetails[0]['paymentTransactionID'] = $paymentTransaction->getId();
+
+ return $transactionDetails[0];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getSubscribedServices()
+ {
+
+ return array_merge(parent::getSubscribedServices(), [
+ DoctrineHelper::class,
+ Gateway::class,
+ NovalnetHelper::class,
+ TranslatorInterface::class,
+ PaymentTransactionProvider::class,
+ NovalnetCreditCardMethodProvider::class,
+ NovalnetBancontactMethodProvider::class,
+ NovalnetBanktransferMethodProvider::class,
+ NovalnetCashpaymentMethodProvider::class,
+ NovalnetEpsMethodProvider::class,
+ NovalnetGiropayMethodProvider::class,
+ NovalnetGuaranteedInvoiceMethodProvider::class,
+ NovalnetGuaranteedSepaMethodProvider::class,
+ NovalnetIdealMethodProvider::class,
+ NovalnetInstalmentInvoiceMethodProvider::class,
+ NovalnetInstalmentSepaMethodProvider::class,
+ NovalnetInvoiceMethodProvider::class,
+ NovalnetMultibancoMethodProvider::class,
+ NovalnetPaypalMethodProvider::class,
+ NovalnetPostfinanceCardMethodProvider::class,
+ NovalnetPostfinanceMethodProvider::class,
+ NovalnetPrepaymentMethodProvider::class,
+ NovalnetPrzelewyMethodProvider::class,
+ NovalnetSepaMethodProvider::class,
+ NovalnetAlipayMethodProvider::class,
+ NovalnetWechatpayMethodProvider::class,
+ NovalnetOnlinebanktransferMethodProvider::class,
+ NovalnetTrustlyMethodProvider::class
+ ]);
+ }
+}
diff --git a/Controller/NovalnetSettingsController.php b/Controller/NovalnetSettingsController.php
new file mode 100755
index 0000000..38fbf22
--- /dev/null
+++ b/Controller/NovalnetSettingsController.php
@@ -0,0 +1,54 @@
+get('privateKey');
+ $productActivationKey = $request->get('publicKey');
+
+ $data = ['merchant' => [
+ 'signature' => $productActivationKey
+ ]];
+
+ $client = $this->get(Gateway::class);
+ $response = $client->send($paymentAccessKey, $data, 'https://payport.novalnet.de/v2/merchant/details');
+
+ return new JsonResponse($response);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getSubscribedServices()
+ {
+ return array_merge(parent::getSubscribedServices(), [
+ Gateway::class
+ ]);
+ }
+}
diff --git a/Datagrid/ActionPermissionProvider.php b/Datagrid/ActionPermissionProvider.php
new file mode 100755
index 0000000..14bacc8
--- /dev/null
+++ b/Datagrid/ActionPermissionProvider.php
@@ -0,0 +1,88 @@
+manager = $manager;
+ $this->doctrineHelper = $doctrineHelper;
+ }
+
+ /**
+ * Display Novalnet extension options
+ * @param ResultRecordInterface $record
+ * @return array
+ */
+ public function getActionPermissions(ResultRecordInterface $record): array
+ {
+ $paymentTransaction = $this->manager->getRepository(PaymentTransaction::class)->find($record->getValue('id'));
+
+ $displayRefundOption = false;
+ $displayManageTransactionOption = false;
+
+ if ($paymentTransaction) {
+ $paymentMethodName = $paymentTransaction->getPaymentMethod();
+ if (strpos($paymentMethodName, 'novalnet') !== false) {
+ $orderDetails = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+
+ $repository = $this->manager->getRepository(NovalnetTransactionDetails::class);
+
+ $qryBuilder = $repository->createQueryBuilder('nn')
+ ->select('nn.paymentType, nn.status, nn.refundedAmount, nn.amount')
+ ->where('nn.orderNo = :orderNo')
+ ->setParameter('orderNo', (string) $orderDetails->getId());
+
+ $transactionDetails = $qryBuilder->getQuery()->getArrayResult();
+ $paymentType = $transactionDetails[0]['paymentType'];
+ $status = $transactionDetails[0]['status'];
+ $refundedAmount = $transactionDetails[0]['refundedAmount'];
+ $orderAmount = $transactionDetails[0]['amount'];
+
+ if ($status == 'ON_HOLD') {
+ $displayManageTransactionOption = true;
+ }
+ elseif(($status == 'CONFIRMED' || (in_array($paymentType, ['INVOICE', 'PREPAYMENT', 'CASHPAYMENT']) && $status == 'PENDING')) && $orderAmount > $refundedAmount) {
+ $displayRefundOption = true;
+ }
+ }
+ }
+
+ return [
+ 'refund' => $displayRefundOption,
+ 'manage_transaction' => $displayManageTransactionOption
+ ];
+ }
+}
diff --git a/DependencyInjection/NovalnetExtension.php b/DependencyInjection/NovalnetExtension.php
new file mode 100755
index 0000000..15ecbbf
--- /dev/null
+++ b/DependencyInjection/NovalnetExtension.php
@@ -0,0 +1,38 @@
+load('services.yml');
+ $loader->load('method.yml');
+ $loader->load('callbacks.yml');
+ $loader->load('form_types.yml');
+ $loader->load('controllers.yml');
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getAlias()
+ {
+ return self::ALIAS;
+ }
+}
diff --git a/Entity/NovalnetCallbackHistory.php b/Entity/NovalnetCallbackHistory.php
new file mode 100755
index 0000000..bf2313a
--- /dev/null
+++ b/Entity/NovalnetCallbackHistory.php
@@ -0,0 +1,203 @@
+id;
+ }
+
+ /**
+ * @return int
+ */
+ public function getCallbackAmount()
+ {
+ return $this->callbackAmount;
+ }
+
+ /**
+ * @param int $callbackAmount
+ * @return NovalnetCallbackHistory
+ */
+ public function setCallbackAmount($callbackAmount)
+ {
+ $this->callbackAmount = (int)$callbackAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getEventType()
+ {
+ return $this->eventType;
+ }
+
+ /**
+ * @param int $eventType
+ * @return NovalnetCallbackHistory
+ */
+ public function setEventType($eventType)
+ {
+ $this->eventType = $eventType;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPaymentType()
+ {
+ return $this->paymentType;
+ }
+
+ /**
+ * @param int $paymentType
+ * @return NovalnetCallbackHistory
+ */
+ public function setPaymentType($paymentType)
+ {
+ $this->paymentType = $paymentType;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getOrderNo()
+ {
+ return $this->orderNo;
+ }
+
+ /**
+ * @param string $orderNo
+ * @return NovalnetCallbackHistory
+ */
+ public function setOrderNo($orderNo)
+ {
+ $this->orderNo = $orderNo;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getOrgTid()
+ {
+ return $this->orgTid;
+ }
+
+ /**
+ * @param string $orgTid
+ * @return NovalnetCallbackHistory
+ */
+ public function setOrgTid($orgTid)
+ {
+ $this->orgTid = $orgTid;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCallbackTid()
+ {
+ return $this->callbackTid;
+ }
+
+ /**
+ * @param string $callbackTid
+ * @return NovalnetCallbackHistory
+ */
+ public function setCallbackTid($callbackTid)
+ {
+ $this->callbackTid = $callbackTid;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getDate()
+ {
+ return $this->date;
+ }
+
+ /**
+ * @param \DateTime $date
+ * @return NovalnetCallbackHistory
+ */
+ public function setDate(\DateTime $date)
+ {
+ $this->date = $date;
+
+ return $this;
+ }
+}
diff --git a/Entity/NovalnetSettings.php b/Entity/NovalnetSettings.php
new file mode 100755
index 0000000..184db08
--- /dev/null
+++ b/Entity/NovalnetSettings.php
@@ -0,0 +1,4025 @@
+creditCardLabel = $creditCardLabel;
+ return $this;
+ }
+
+
+ /**
+ * Get creditCardLabel.
+ *
+ * @return string
+ */
+ public function getCreditCardLabel()
+ {
+ return $this->creditCardLabel;
+ }
+
+ /**
+ * Add sepaLabel.
+ *
+ * @param $sepaLabel
+ *
+ * @return $this
+ */
+ public function setSepaLabel($sepaLabel)
+ {
+ $this->sepaLabel = $sepaLabel;
+ return $this;
+ }
+
+ /**
+ * Get sepaLabel.
+ *
+ * @return string
+ */
+ public function getSepaLabel()
+ {
+ return $this->sepaLabel;
+ }
+
+ /**
+ * Add sepaShortLabel.
+ *
+ * @param $sepaShortLabel
+ *
+ * @return $this
+ */
+ public function setSepaShortLabel($sepaShortLabel)
+ {
+ $this->sepaShortLabel = $sepaShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get sepaShortLabel.
+ *
+ * @return string
+ */
+ public function getSepaShortLabel()
+ {
+ return $this->sepaShortLabel;
+ }
+
+ /**
+ * Add creditCardShortLabel.
+ *
+ * @param $creditCardShortLabel
+ *
+ * @return $this
+ */
+ public function setCreditCardShortLabel($creditCardShortLabel)
+ {
+ $this->creditCardShortLabel = $creditCardShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get creditCardShortLabel.
+ *
+ * @return string
+ */
+ public function getCreditCardShortLabel()
+ {
+ return $this->creditCardShortLabel;
+ }
+
+ /**
+ * Add invoiceLabel.
+ *
+ * @param $invoiceLabel
+ *
+ * @return $this
+ */
+ public function setInvoiceLabel($invoiceLabel)
+ {
+ $this->invoiceLabel = $invoiceLabel;
+ return $this;
+ }
+
+
+
+ /**
+ * Get invoiceLabel.
+ *
+ * @return string
+ */
+ public function getInvoiceLabel()
+ {
+ return $this->invoiceLabel;
+ }
+
+ /**
+ * Add InstalmentinvoiceLabel.
+ *
+ * @param $instalmentInvoiceLabel
+ *
+ * @return $this
+ */
+ public function setInstalmentInvoiceLabel($instalmentInvoiceLabel)
+ {
+ $this->instalmentInvoiceLabel = $instalmentInvoiceLabel;
+ return $this;
+ }
+
+
+ /**
+ * Get instalmentInvoiceLabel.
+ *
+ * @return string
+ */
+ public function getInstalmentInvoiceLabel()
+ {
+ return $this->instalmentInvoiceLabel;
+ }
+
+ /**
+ * Add InstalmentsepaLabel.
+ *
+ * @param $instalmentSepaLabel
+ *
+ * @return $this
+ */
+ public function setInstalmentSepaLabel($instalmentSepaLabel)
+ {
+ $this->instalmentSepaLabel = $instalmentSepaLabel;
+ return $this;
+ }
+
+ /**
+ * Get instalmentSepaLabel.
+ *
+ * @return string
+ */
+ public function getInstalmentSepaLabel()
+ {
+ return $this->instalmentSepaLabel;
+ }
+
+ /**
+ * Add invoiceShortLabel.
+ *
+ * @param $invoiceShortLabel
+ *
+ * @return $this
+ */
+ public function setInvoiceShortLabel($invoiceShortLabel)
+ {
+ $this->invoiceShortLabel = $invoiceShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get invoiceShortLabel.
+ *
+ * @return string
+ */
+ public function getInvoiceShortLabel()
+ {
+ return $this->invoiceShortLabel;
+ }
+
+ /**
+ * Add instalmentInvoiceShortLabel.
+ *
+ * @param $instalmentInvoiceShortLabel
+ *
+ * @return $this
+ */
+ public function setInstalmentInvoiceShortLabel($instalmentInvoiceShortLabel)
+ {
+ $this->instalmentInvoiceShortLabel = $instalmentInvoiceShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get instalmentInvoiceShortLabel.
+ *
+ * @return string
+ */
+ public function getInstalmentInvoiceShortLabel()
+ {
+ return $this->instalmentInvoiceShortLabel;
+ }
+
+ /**
+ * Add instalmentSepaShortLabel.
+ *
+ * @param $instalmentSepaShortLabel
+ *
+ * @return $this
+ */
+ public function setInstalmentSepaShortLabel($instalmentSepaShortLabel)
+ {
+ $this->instalmentSepaShortLabel = $instalmentSepaShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get instalmentSepaShortLabel.
+ *
+ * @return string
+ */
+ public function getInstalmentSepaShortLabel()
+ {
+ return $this->instalmentSepaShortLabel;
+ }
+
+ /**
+ * Add prepaymentLabel.
+ *
+ * @param $prepaymentLabel
+ *
+ * @return $this
+ */
+ public function setPrepaymentLabel($prepaymentLabel)
+ {
+ $this->prepaymentLabel = $prepaymentLabel;
+ return $this;
+ }
+
+ /**
+ * Get prepaymentLabel.
+ *
+ * @return string
+ */
+ public function getPrepaymentLabel()
+ {
+ return $this->prepaymentLabel;
+ }
+
+ /**
+ * Add prepaymentShortLabel.
+ *
+ * @param $prepaymentShortLabel
+ *
+ * @return $this
+ */
+ public function setPrepaymentShortLabel($prepaymentShortLabel)
+ {
+ $this->prepaymentShortLabel = $prepaymentShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get prepaymentShortLabel.
+ *
+ * @return string
+ */
+ public function getPrepaymentShortLabel()
+ {
+ return $this->prepaymentShortLabel;
+ }
+
+ /**
+ * Add cashpaymentLabel.
+ *
+ * @param $cashpaymentLabel
+ *
+ * @return $this
+ */
+ public function setCashpaymentLabel($cashpaymentLabel)
+ {
+ $this->cashpaymentLabel = $cashpaymentLabel;
+ return $this;
+ }
+
+ /**
+ * Get cashpaymentLabel.
+ *
+ * @return string
+ */
+ public function getCashpaymentLabel()
+ {
+ return $this->cashpaymentLabel;
+ }
+
+ /**
+ * Add cashpaymentShortLabel.
+ *
+ * @param $cashpaymentShortLabel
+ *
+ * @return $this
+ */
+ public function setCashpaymentShortLabel($cashpaymentShortLabel)
+ {
+ $this->cashpaymentShortLabel = $cashpaymentShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get cashpaymentShortLabel.
+ *
+ * @return string
+ */
+ public function getCashpaymentShortLabel()
+ {
+ return $this->cashpaymentShortLabel;
+ }
+
+ /**
+ * Add paypalLabel.
+ *
+ * @param $paypalLabel
+ *
+ * @return $this
+ */
+ public function setPaypalLabel($paypalLabel)
+ {
+ $this->paypalLabel = $paypalLabel;
+ return $this;
+ }
+
+ /**
+ * Get paypalLabel.
+ *
+ * @return string
+ */
+ public function getPaypalLabel()
+ {
+ return $this->paypalLabel;
+ }
+
+ /**
+ * Add paypalShortLabel.
+ *
+ * @param $paypalShortLabel
+ *
+ * @return $this
+ */
+ public function setPaypalShortLabel($paypalShortLabel)
+ {
+ $this->paypalShortLabel = $paypalShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get paypalShortLabel.
+ *
+ * @return string
+ */
+ public function getPaypalShortLabel()
+ {
+ return $this->paypalShortLabel;
+ }
+
+ /**
+ * Add banktransferLabel.
+ *
+ * @param $banktransferLabel
+ *
+ * @return $this
+ */
+ public function setBanktransferLabel($banktransferLabel)
+ {
+ $this->banktransferLabel = $banktransferLabel;
+ return $this;
+ }
+
+ /**
+ * Get banktransferLabel.
+ *
+ * @return string
+ */
+ public function getBanktransferLabel()
+ {
+ return $this->banktransferLabel;
+ }
+
+ /**
+ * Add banktransferShortLabel.
+ *
+ * @param $banktransferShortLabel
+ *
+ * @return $this
+ */
+ public function setBanktransferShortLabel($banktransferShortLabel)
+ {
+ $this->banktransferShortLabel = $banktransferShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get banktransferShortLabel.
+ *
+ * @return string
+ */
+ public function getBanktransferShortLabel()
+ {
+ return $this->banktransferShortLabel;
+ }
+
+ /**
+ * Add idealLabel.
+ *
+ * @param $idealLabel
+ *
+ * @return $this
+ */
+ public function setIdealLabel($idealLabel)
+ {
+ $this->idealLabel = $idealLabel;
+ return $this;
+ }
+
+ /**
+ * Get idealLabel.
+ *
+ * @return string
+ */
+ public function getIdealLabel()
+ {
+ return $this->idealLabel;
+ }
+
+ /**
+ * Add idealShortLabel.
+ *
+ * @param $idealShortLabel
+ *
+ * @return $this
+ */
+ public function setIdealShortLabel($idealShortLabel)
+ {
+ $this->idealShortLabel = $idealShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get idealShortLabel.
+ *
+ * @return string
+ */
+ public function getIdealShortLabel()
+ {
+ return $this->idealShortLabel;
+ }
+
+ /**
+ * Add guaranteedSepaLabel.
+ *
+ * @param $guaranteedSepaLabel
+ *
+ * @return $this
+ */
+ public function setGuaranteedSepaLabel($guaranteedSepaLabel)
+ {
+ $this->guaranteedSepaLabel = $guaranteedSepaLabel;
+ return $this;
+ }
+
+ /**
+ * Get guaranteedSepaLabel.
+ *
+ * @return string
+ */
+ public function getGuaranteedSepaLabel()
+ {
+ return $this->guaranteedSepaLabel;
+ }
+
+ /**
+ * Add guaranteedSepaShortLabel.
+ *
+ * @param $guaranteedSepaShortLabel
+ *
+ * @return $this
+ */
+ public function setGuaranteedSepaShortLabel($guaranteedSepaShortLabel)
+ {
+ $this->guaranteedSepaShortLabel = $guaranteedSepaShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get guaranteedSepaShortLabel.
+ *
+ * @return string
+ */
+ public function getGuaranteedSepaShortLabel()
+ {
+ return $this->guaranteedSepaShortLabel;
+ }
+
+ /**
+ * Add guaranteedInvoiceLabel.
+ *
+ * @param $guaranteedInvoiceLabel
+ *
+ * @return $this
+ */
+ public function setGuaranteedInvoiceLabel($guaranteedInvoiceLabel)
+ {
+ $this->guaranteedInvoiceLabel = $guaranteedInvoiceLabel;
+ return $this;
+ }
+
+ /**
+ * Get guaranteedInvoiceLabel.
+ *
+ * @return string
+ */
+ public function getGuaranteedInvoiceLabel()
+ {
+ return $this->guaranteedInvoiceLabel;
+ }
+
+ /**
+ * Add guaranteedInvoiceShortLabel.
+ *
+ * @param $guaranteedInvoiceShortLabel
+ *
+ * @return $this
+ */
+ public function setGuaranteedInvoiceShortLabel($guaranteedInvoiceShortLabel)
+ {
+ $this->guaranteedInvoiceShortLabel = $guaranteedInvoiceShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get guaranteedInvoiceShortLabel.
+ *
+ * @return string
+ */
+ public function getGuaranteedInvoiceShortLabel()
+ {
+ return $this->guaranteedInvoiceShortLabel;
+ }
+
+ /**
+ * Add giropayLabel.
+ *
+ * @param $giropayLabel
+ *
+ * @return $this
+ */
+ public function setGiropayLabel($giropayLabel)
+ {
+ $this->giropayLabel = $giropayLabel;
+ return $this;
+ }
+
+ /**
+ * Get giropayLabel.
+ *
+ * @return string
+ */
+ public function getGiropayLabel()
+ {
+ return $this->giropayLabel;
+ }
+
+ /**
+ * Add giropayShortLabel.
+ *
+ * @param $giropayShortLabel
+ *
+ * @return $this
+ */
+ public function setGiropayShortLabel($giropayShortLabel)
+ {
+ $this->giropayShortLabel = $giropayShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get giropayShortLabel.
+ *
+ * @return string
+ */
+ public function getGiropayShortLabel()
+ {
+ return $this->giropayShortLabel;
+ }
+
+ /**
+ * Add epsLabel.
+ *
+ * @param $epsLabel
+ *
+ * @return $this
+ */
+ public function setEpsLabel($epsLabel)
+ {
+ $this->epsLabel = $epsLabel;
+ return $this;
+ }
+
+ /**
+ * Get epsLabel.
+ *
+ * @return string
+ */
+ public function getEpsLabel()
+ {
+ return $this->epsLabel;
+ }
+
+ /**
+ * Add epsShortLabel.
+ *
+ * @param $epsShortLabel
+ *
+ * @return $this
+ */
+ public function setEpsShortLabel($epsShortLabel)
+ {
+ $this->epsShortLabel = $epsShortLabel;
+ return $this;
+ }
+
+
+ /**
+ * Get epsShortLabel.
+ *
+ * @return string
+ */
+ public function getEpsShortLabel()
+ {
+ return $this->epsShortLabel;
+ }
+
+ /**
+ * Add przelewyLabel.
+ *
+ * @param $przelewyLabel
+ *
+ * @return $this
+ */
+ public function setPrzelewyLabel($przelewyLabel)
+ {
+ $this->przelewyLabel = $przelewyLabel;
+ return $this;
+ }
+
+ /**
+ * Get przelewyLabel.
+ *
+ * @return string
+ */
+ public function getPrzelewyLabel()
+ {
+ return $this->przelewyLabel;
+ }
+
+ /**
+ * Add PostfinanceLabel.
+ *
+ * @param $postfinanceLabel
+ *
+ * @return $this
+ */
+ public function setPostfinanceLabel($postfinanceLabel)
+ {
+ $this->postfinanceLabel = $postfinanceLabel;
+ return $this;
+ }
+
+ /**
+ * Get PostfinanceLabel.
+ *
+ * @return string
+ */
+ public function getPostfinanceLabel()
+ {
+ return $this->postfinanceLabel;
+ }
+
+ /**
+ * Add PostfinanceCardLabel.
+ *
+ * @param $postfinanceCardLabel
+ *
+ * @return $this
+ */
+ public function setPostfinanceCardLabel($postfinanceCardLabel)
+ {
+ $this->postfinanceCardLabel = $postfinanceCardLabel;
+ return $this;
+ }
+
+
+ /**
+ * Get PostfinanceCardLabel.
+ *
+ * @return string
+ */
+ public function getPostfinanceCardLabel()
+ {
+ return $this->postfinanceCardLabel;
+ }
+
+ /**
+ * Add MultibancoLabel.
+ *
+ * @param $multibancoLabel
+ *
+ * @return $this
+ */
+ public function setMultibancoLabel($multibancoLabel)
+ {
+ $this->multibancoLabel = $multibancoLabel;
+ return $this;
+ }
+
+
+ /**
+ * Get MultibancoLabel.
+ *
+ * @return string
+ */
+ public function getMultibancoLabel()
+ {
+ return $this->multibancoLabel;
+ }
+
+ /**
+ * Add BancontactLabel.
+ *
+ * @param $bancontactLabel
+ *
+ * @return $this
+ */
+ public function setBancontactLabel($bancontactLabel)
+ {
+ $this->bancontactLabel = $bancontactLabel;
+ return $this;
+ }
+
+
+ /**
+ * Get bancontactLabel.
+ *
+ * @return string
+ */
+ public function getBancontactLabel()
+ {
+ return $this->bancontactLabel;
+ }
+
+ /**
+ * Add przelewyShortLabel.
+ *
+ * @param $przelewyShortLabel
+ *
+ * @return $this
+ */
+ public function setPrzelewyShortLabel($przelewyShortLabel)
+ {
+ $this->przelewyShortLabel = $przelewyShortLabel;
+ return $this;
+ }
+
+
+
+ /**
+ * Get przelewyShortLabel.
+ *
+ * @return string
+ */
+ public function getPrzelewyShortLabel()
+ {
+ return $this->przelewyShortLabel;
+ }
+
+ /**
+ * Add PostfinanceShortLabel.
+ *
+ * @param $postfinanceShortLabel
+ *
+ * @return $this
+ */
+ public function setPostfinanceShortLabel($postfinanceShortLabel)
+ {
+ $this->postfinanceShortLabel = $postfinanceShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get postfinanceShortLabel.
+ *
+ * @return string
+ */
+ public function getPostfinanceShortLabel()
+ {
+ return $this->postfinanceShortLabel;
+ }
+
+ /**
+ * Add PostfinanceCardShortLabel.
+ *
+ * @param $postfinanceCardShortLabel
+ *
+ * @return $this
+ */
+ public function setPostfinanceCardShortLabel($postfinanceCardShortLabel)
+ {
+ $this->postfinanceCardShortLabel = $postfinanceCardShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get postfinanceCardShortLabel.
+ *
+ * @return string
+ */
+ public function getPostfinanceCardShortLabel()
+ {
+ return $this->postfinanceCardShortLabel;
+ }
+
+ /**
+ * Add BancontactShortLabel.
+ *
+ * @param $bancontactShortLabel
+ *
+ * @return $this
+ */
+ public function setBancontactShortLabel($bancontactShortLabel)
+ {
+ $this->bancontactShortLabel = $bancontactShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get BancontactShortLabel.
+ *
+ * @return string
+ */
+ public function getBancontactShortLabel()
+ {
+ return $this->bancontactShortLabel;
+ }
+
+ /**
+ * Add MultibancoShortLabel.
+ *
+ * @param $multibancoShortLabel
+ *
+ * @return $this
+ */
+ public function setMultibancoShortLabel($multibancoShortLabel)
+ {
+ $this->multibancoShortLabel = $multibancoShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get MultibancoShortLabel.
+ *
+ * @return string
+ */
+ public function getMultibancoShortLabel()
+ {
+ return $this->multibancoShortLabel;
+ }
+
+ /**
+ * Add alipayLabel.
+ *
+ * @param $alipayLabel
+ *
+ * @return $this
+ */
+ public function setAlipayLabel($alipayLabel)
+ {
+ $this->alipayLabel = $alipayLabel;
+ return $this;
+ }
+
+ /**
+ * Get alipayLabel.
+ *
+ * @return string
+ */
+ public function getAlipayLabel()
+ {
+ return $this->alipayLabel;
+ }
+
+ /**
+ * Add wechatpayLabel.
+ *
+ * @param $wechatpayLabel
+ *
+ * @return $this
+ */
+ public function setWechatpayLabel($wechatpayLabel)
+ {
+ $this->wechatpayLabel = $wechatpayLabel;
+ return $this;
+ }
+
+ /**
+ * Get wechatpayLabel.
+ *
+ * @return string
+ */
+ public function getWechatpayLabel()
+ {
+ return $this->wechatpayLabel;
+ }
+
+ /**
+ * Add trustlyLabel.
+ *
+ * @param $trustlyLabel
+ *
+ * @return $this
+ */
+ public function setTrustlyLabel($trustlyLabel)
+ {
+ $this->trustlyLabel = $trustlyLabel;
+ return $this;
+ }
+
+ /**
+ * Get trustlyLabel.
+ *
+ * @return string
+ */
+ public function getTrustlyLabel()
+ {
+ return $this->trustlyLabel;
+ }
+
+ /**
+ * Add onlinebanktransferLabel.
+ *
+ * @param $onlinebanktransferLabel
+ *
+ * @return $this
+ */
+ public function setOnlinebanktransferLabel($onlinebanktransferLabel)
+ {
+ $this->onlinebanktransferLabel = $onlinebanktransferLabel;
+ return $this;
+ }
+
+ /**
+ * Get onlinebanktransferLabel.
+ *
+ * @return string
+ */
+ public function getOnlinebanktransferLabel()
+ {
+ return $this->onlinebanktransferLabel;
+ }
+
+ /**
+ * Add alipayShortLabel.
+ *
+ * @param $alipayShortLabel
+ *
+ * @return $this
+ */
+ public function setAlipayShortLabel($alipayShortLabel)
+ {
+ $this->alipayShortLabel = $alipayShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get alipayShortLabel.
+ *
+ * @return string
+ */
+ public function getAlipayShortLabel()
+ {
+ return $this->alipayShortLabel;
+ }
+
+ /**
+ * Add wechatpayShortLabel.
+ *
+ * @param $wechatpayShortLabel
+ *
+ * @return $this
+ */
+ public function setWechatpayShortLabel($wechatpayShortLabel)
+ {
+ $this->wechatpayShortLabel = $wechatpayShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get wechatpayShortLabel.
+ *
+ * @return string
+ */
+ public function getWechatpayShortLabel()
+ {
+ return $this->wechatpayShortLabel;
+ }
+
+ /**
+ * Add trustlyShortLabel.
+ *
+ * @param $trustlyShortLabel
+ *
+ * @return $this
+ */
+ public function setTrustlyShortLabel($trustlyShortLabel)
+ {
+ $this->trustlyShortLabel = $trustlyShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get trustlyShortLabel.
+ *
+ * @return string
+ */
+ public function getTrustlyShortLabel()
+ {
+ return $this->trustlyShortLabel;
+ }
+
+ /**
+ * Add onlinebanktransferShortLabel.
+ *
+ * @param $onlinebanktransferShortLabel
+ *
+ * @return $this
+ */
+ public function setOnlinebanktransferShortLabel($onlinebanktransferShortLabel)
+ {
+ $this->onlinebanktransferShortLabel = $onlinebanktransferShortLabel;
+ return $this;
+ }
+
+ /**
+ * Get onlinebanktransferShortLabel.
+ *
+ * @return string
+ */
+ public function getOnlinebanktransferShortLabel()
+ {
+ return $this->onlinebanktransferShortLabel;
+ }
+
+ /**
+ * @return string
+ */
+ public function getProductActivationKey()
+ {
+ return $this->productActivationKey;
+ }
+
+ /**
+ * @param string $productActivationKey
+ *
+ * @return NovalnetSettings
+ */
+ public function setProductActivationKey($productActivationKey)
+ {
+ $this->productActivationKey = $productActivationKey;
+
+ return $this;
+ }
+ /**
+ * @return string
+ */
+ public function getPaymentAccessKey()
+ {
+ return $this->paymentAccessKey;
+ }
+
+ /**
+ * @param string $paymentAccessKey
+ *
+ * @return NovalnetSettings
+ */
+ public function setPaymentAccessKey($paymentAccessKey)
+ {
+ $this->paymentAccessKey = $paymentAccessKey;
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getCallbackTestMode()
+ {
+ return $this->callbackTestMode;
+ }
+
+ /**
+ * @param string $callbackTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setCallbackTestMode($callbackTestMode)
+ {
+ $this->callbackTestMode = $callbackTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCallbackEmailTo()
+ {
+ return $this->callbackEmailTo;
+ }
+
+ /**
+ * @param string $callbackEmailTo
+ *
+ * @return NovalnetSettings
+ */
+ public function setCallbackEmailTo($callbackEmailTo)
+ {
+ $this->callbackEmailTo = $callbackEmailTo;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getClientKey()
+ {
+ return $this->clientKey;
+ }
+
+ /**
+ * @param string $clientKey
+ *
+ * @return NovalnetSettings
+ */
+ public function setClientKey($clientKey)
+ {
+ $this->clientKey = $clientKey;
+
+ return $this;
+ }
+
+
+ /**
+ * @return integer
+ */
+ public function getTariff()
+ {
+ return $this->tariff;
+ }
+
+ /**
+ * @param integer $tariff
+ *
+ * @return NovalnetSettings
+ */
+ public function setTariff($tariff)
+ {
+ $this->tariff = $tariff;
+
+ return $this;
+ }
+
+ /**
+ * @return boolean
+ */
+ public function getDisplayPaymentLogo()
+ {
+ return $this->displayPaymentLogo;
+ }
+
+ /**
+ * @param boolean $displayPaymentLogo
+ *
+ * @return NovalnetSettings
+ */
+ public function setDisplayPaymentLogo($displayPaymentLogo)
+ {
+ $this->displayPaymentLogo = $displayPaymentLogo;
+
+ return $this;
+ }
+
+
+ /**
+ * @return boolean
+ */
+ public function getCreditCardEnforce3d()
+ {
+ return $this->creditCardEnforce3d;
+ }
+
+ /**
+ * @param boolean $creditCardEnforce3d
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardEnforce3d($creditCardEnforce3d)
+ {
+ $this->creditCardEnforce3d = $creditCardEnforce3d;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCreditCardPaymentAction()
+ {
+ return $this->creditCardPaymentAction;
+ }
+
+ /**
+ * @param string $creditCardPaymentAction
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardPaymentAction($creditCardPaymentAction)
+ {
+ $this->creditCardPaymentAction = $creditCardPaymentAction;
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getCreditCardOnholdAmount()
+ {
+ return $this->creditCardOnholdAmount;
+ }
+
+ /**
+ * @param integer $creditCardOnholdAmount
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardOnholdAmount($creditCardOnholdAmount)
+ {
+ $this->creditCardOnholdAmount = $creditCardOnholdAmount;
+ return $this;
+ }
+
+ /**
+ * @return boolean
+ */
+ public function getCreditCardOneclick()
+ {
+ return $this->creditCardOneclick;
+ }
+
+ /**
+ * @param boolean $creditCardOneclick
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardOneclick($creditCardOneclick)
+ {
+ $this->creditCardOneclick = $creditCardOneclick;
+ return $this;
+ }
+
+ /**
+ * @return boolean
+ */
+ public function getCreditCardInlineForm()
+ {
+ return $this->creditCardInlineForm;
+ }
+
+ /**
+ * @param boolean $creditCardInlineForm
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardInlineForm($creditCardInlineForm)
+ {
+ $this->creditCardInlineForm = $creditCardInlineForm;
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getCreditCardLogo()
+ {
+ return $this->creditCardLogo;
+ }
+
+ /**
+ * @param array $creditCardLogo
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardLogo($creditCardLogo)
+ {
+ $this->creditCardLogo = $creditCardLogo;
+ return $this;
+ }
+
+
+ /**
+ * @return integer
+ */
+ public function getCreditCardTestMode()
+ {
+ return $this->creditCardTestMode;
+ }
+
+ /**
+ * @param integer $creditCardTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardTestMode($creditCardTestMode)
+ {
+ $this->creditCardTestMode = $creditCardTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCreditCardBuyerNotification()
+ {
+ return $this->creditCardBuyerNotification;
+ }
+
+ /**
+ * @param string $creditCardBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardBuyerNotification($creditCardBuyerNotification)
+ {
+ $this->creditCardBuyerNotification = $creditCardBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCreditCardInputStyle()
+ {
+ return $this->creditCardInputStyle;
+ }
+
+ /**
+ * @param string $creditCardInputStyle
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardInputStyle($creditCardInputStyle)
+ {
+ $this->creditCardInputStyle = $creditCardInputStyle;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCreditCardLabelStyle()
+ {
+ return $this->creditCardLabelStyle;
+ }
+
+ /**
+ * @param string $creditCardLabelStyle
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardLabelStyle($creditCardLabelStyle)
+ {
+ $this->creditCardLabelStyle = $creditCardLabelStyle;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCreditCardContainerStyle()
+ {
+ return $this->creditCardContainerStyle;
+ }
+
+ /**
+ * @param string $creditCardContainerStyle
+ *
+ * @return NovalnetSettings
+ */
+ public function setCreditCardContainerStyle($creditCardContainerStyle)
+ {
+ $this->creditCardContainerStyle = $creditCardContainerStyle;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getInvoiceTestMode()
+ {
+ return $this->invoiceTestMode;
+ }
+
+ /**
+ * @param integer $invoiceTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setInvoiceTestMode($invoiceTestMode)
+ {
+ $this->invoiceTestMode = $invoiceTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInvoiceDuedate()
+ {
+ return $this->invoiceDuedate;
+ }
+
+ /**
+ * @param string $invoiceDuedate
+ *
+ * @return NovalnetSettings
+ */
+ public function setInvoiceDuedate($invoiceDuedate)
+ {
+ $this->invoiceDuedate = $invoiceDuedate;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInvoicePaymentAction()
+ {
+ return $this->invoicePaymentAction;
+ }
+
+ /**
+ * @param string $invoicePaymentAction
+ *
+ * @return NovalnetSettings
+ */
+ public function setInvoicePaymentAction($invoicePaymentAction)
+ {
+ $this->invoicePaymentAction = $invoicePaymentAction;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getInvoiceOnholdAmount()
+ {
+ return $this->invoiceOnholdAmount;
+ }
+
+ /**
+ * @param int $invoiceOnholdAmount
+ * @return NovalnetSettings
+ */
+ public function setInvoiceOnholdAmount($invoiceOnholdAmount)
+ {
+ $this->invoiceOnholdAmount = $invoiceOnholdAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInvoiceBuyerNotification()
+ {
+ return $this->invoiceBuyerNotification;
+ }
+
+ /**
+ * @param string $invoiceBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setInvoiceBuyerNotification($invoiceBuyerNotification)
+ {
+ $this->invoiceBuyerNotification = $invoiceBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getInstalmentInvoiceTestMode()
+ {
+ return $this->instalmentInvoiceTestMode;
+ }
+
+ /**
+ * @param integer $instalmentInvoiceTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentInvoiceTestMode($instalmentInvoiceTestMode)
+ {
+ $this->instalmentInvoiceTestMode = $instalmentInvoiceTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInstalmentInvoicePaymentAction()
+ {
+ return $this->instalmentInvoicePaymentAction;
+ }
+
+ /**
+ * @param string $instalmentInvoicePaymentAction
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentInvoicePaymentAction($instalmentInvoicePaymentAction)
+ {
+ $this->instalmentInvoicePaymentAction = $instalmentInvoicePaymentAction;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getInstalmentInvoiceOnholdAmount()
+ {
+ return $this->instalmentInvoiceOnholdAmount;
+ }
+
+ /**
+ * @param int $instalmentInvoiceOnholdAmount
+ * @return NovalnetSettings
+ *
+ */
+ public function setInstalmentInvoiceOnholdAmount($instalmentInvoiceOnholdAmount)
+ {
+ $this->instalmentInvoiceOnholdAmount = $instalmentInvoiceOnholdAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInstalmentInvoiceBuyerNotification()
+ {
+ return $this->instalmentInvoiceBuyerNotification;
+ }
+
+ /**
+ * @param string $instalmentInvoiceBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentInvoiceBuyerNotification($instalmentInvoiceBuyerNotification)
+ {
+ $this->instalmentInvoiceBuyerNotification = $instalmentInvoiceBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInstalmentInvoiceMinAmount()
+ {
+ return $this->instalmentInvoiceMinAmount;
+ }
+
+ /**
+ * @param string $instalmentInvoiceMinAmount
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentInvoiceMinAmount($instalmentInvoiceMinAmount)
+ {
+ $this->instalmentInvoiceMinAmount = $instalmentInvoiceMinAmount;
+
+ return $this;
+ }
+
+
+
+ /**
+ * @return string
+ */
+ public function getInstalmentInvoiceCycle()
+ {
+ return $this->instalmentInvoiceCycle;
+ }
+
+ /**
+ * @param string $instalmentInvoiceCycle
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentInvoiceCycle($instalmentInvoiceCycle)
+ {
+ $this->instalmentInvoiceCycle = $instalmentInvoiceCycle;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getInstalmentSepaTestMode()
+ {
+ return $this->instalmentSepaTestMode;
+ }
+
+ /**
+ * @param integer $instalmentSepaTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentSepaTestMode($instalmentSepaTestMode)
+ {
+ $this->instalmentSepaTestMode = $instalmentSepaTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInstalmentSepaDuedate()
+ {
+ return $this->instalmentSepaDuedate;
+ }
+
+ /**
+ * @param string $instalmentSepaDuedate
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentSepaDuedate($instalmentSepaDuedate)
+ {
+ $this->instalmentSepaDuedate = $instalmentSepaDuedate;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInstalmentSepaPaymentAction()
+ {
+ return $this->instalmentSepaPaymentAction;
+ }
+
+ /**
+ * @param string $instalmentSepaPaymentAction
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentSepaPaymentAction($instalmentSepaPaymentAction)
+ {
+ $this->instalmentSepaPaymentAction = $instalmentSepaPaymentAction;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getInstalmentSepaOnholdAmount()
+ {
+ return $this->instalmentSepaOnholdAmount;
+ }
+
+ /**
+ * @param int $instalmentSepaOnholdAmount
+ * @return NovalnetSettings
+ *
+ */
+ public function setInstalmentSepaOnholdAmount($instalmentSepaOnholdAmount)
+ {
+ $this->instalmentSepaOnholdAmount = $instalmentSepaOnholdAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInstalmentSepaBuyerNotification()
+ {
+ return $this->instalmentSepaBuyerNotification;
+ }
+
+ /**
+ * @param string $instalmentSepaBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentSepaBuyerNotification($instalmentSepaBuyerNotification)
+ {
+ $this->instalmentSepaBuyerNotification = $instalmentSepaBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInstalmentSepaMinAmount()
+ {
+ return $this->instalmentSepaMinAmount;
+ }
+
+ /**
+ * @param string $instalmentSepaMinAmount
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentSepaMinAmount($instalmentSepaMinAmount)
+ {
+ $this->instalmentSepaMinAmount = $instalmentSepaMinAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getInstalmentSepaCycle()
+ {
+ return $this->instalmentSepaCycle;
+ }
+
+ /**
+ * @param string $instalmentSepaCycle
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentSepaCycle($instalmentSepaCycle)
+ {
+ $this->instalmentSepaCycle = $instalmentSepaCycle;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getInstalmentSepaOneclick()
+ {
+ return $this->instalmentSepaOneclick;
+ }
+
+ /**
+ * @param integer $instalmentSepaOneclick
+ *
+ * @return NovalnetSettings
+ */
+ public function setInstalmentSepaOneclick($instalmentSepaOneclick)
+ {
+ $this->instalmentSepaOneclick = $instalmentSepaOneclick;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getSepaDuedate()
+ {
+ return $this->sepaDuedate;
+ }
+
+ /**
+ * @param string $sepaDuedate
+ *
+ * @return NovalnetSettings
+ */
+ public function setSepaDuedate($sepaDuedate)
+ {
+ $this->sepaDuedate = $sepaDuedate;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getSepaTestMode()
+ {
+ return $this->sepaTestMode;
+ }
+
+ /**
+ * @param integer $sepaTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setSepaTestMode($sepaTestMode)
+ {
+ $this->sepaTestMode = $sepaTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getSepaOneclick()
+ {
+ return $this->sepaOneclick;
+ }
+
+ /**
+ * @param integer $sepaOneclick
+ *
+ * @return NovalnetSettings
+ */
+ public function setSepaOneclick($sepaOneclick)
+ {
+ $this->sepaOneclick = $sepaOneclick;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getSepaPaymentAction()
+ {
+ return $this->sepaPaymentAction;
+ }
+
+ /**
+ * @param string $sepaPaymentAction
+ *
+ * @return NovalnetSettings
+ */
+ public function setSepaPaymentAction($sepaPaymentAction)
+ {
+ $this->sepaPaymentAction = $sepaPaymentAction;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getSepaOnholdAmount()
+ {
+ return $this->sepaOnholdAmount;
+ }
+
+ /**
+ * @param integer $sepaOnholdAmount
+ *
+ * @return NovalnetSettings
+ */
+ public function setSepaOnholdAmount($sepaOnholdAmount)
+ {
+ $this->sepaOnholdAmount = $sepaOnholdAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getSepaBuyerNotification()
+ {
+ return $this->sepaBuyerNotification;
+ }
+
+ /**
+ * @param string $sepaBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setSepaBuyerNotification($sepaBuyerNotification)
+ {
+ $this->sepaBuyerNotification = $sepaBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getPaypalTestMode()
+ {
+ return $this->paypalTestMode;
+ }
+
+ /**
+ * @param integer $paypalTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setPaypalTestMode($paypalTestMode)
+ {
+ $this->paypalTestMode = $paypalTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPaypalPaymentAction()
+ {
+ return $this->paypalPaymentAction;
+ }
+
+ /**
+ * @param string $paypalPaymentAction
+ *
+ * @return NovalnetSettings
+ */
+ public function setPaypalPaymentAction($paypalPaymentAction)
+ {
+ $this->paypalPaymentAction = $paypalPaymentAction;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getPaypalOnholdAmount()
+ {
+ return $this->paypalOnholdAmount;
+ }
+
+ /**
+ * @param integer $paypalOnholdAmount
+ *
+ * @return NovalnetSettings
+ */
+ public function setPaypalOnholdAmount($paypalOnholdAmount)
+ {
+ $this->paypalOnholdAmount = $paypalOnholdAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPaypalBuyerNotification()
+ {
+ return $this->paypalBuyerNotification;
+ }
+
+ /**
+ * @param string $paypalBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setPaypalBuyerNotification($paypalBuyerNotification)
+ {
+ $this->paypalBuyerNotification = $paypalBuyerNotification;
+
+ return $this;
+ }
+ /**
+ * @return integer
+ */
+ public function getPaypalOneclick()
+ {
+ return $this->paypalOneclick;
+ }
+
+ /**
+ * @param int $paypalOneclick
+ *
+ * @return NovalnetSettings
+ */
+ public function setPaypalOneclick($paypalOneclick)
+ {
+ $this->paypalOneclick = $paypalOneclick;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getCashpaymentTestMode()
+ {
+ return $this->cashpaymentTestMode;
+ }
+
+ /**
+ * @param integer $cashpaymentTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setCashpaymentTestMode($cashpaymentTestMode)
+ {
+ $this->cashpaymentTestMode = $cashpaymentTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCashpaymentDuedate()
+ {
+ return $this->cashpaymentDuedate;
+ }
+
+ /**
+ * @param string $cashpaymentDuedate
+ *
+ * @return NovalnetSettings
+ */
+ public function setCashpaymentDuedate($cashpaymentDuedate)
+ {
+ $this->cashpaymentDuedate = $cashpaymentDuedate;
+
+ return $this;
+ }
+
+
+ /**
+ * @return string
+ */
+ public function getCashpaymentBuyerNotification()
+ {
+ return $this->cashpaymentBuyerNotification;
+ }
+
+ /**
+ * @param string $cashpaymentBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setCashpaymentBuyerNotification($cashpaymentBuyerNotification)
+ {
+ $this->cashpaymentBuyerNotification = $cashpaymentBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getPrepaymentTestMode()
+ {
+ return $this->prepaymentTestMode;
+ }
+
+ /**
+ * @param integer $prepaymentTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setPrepaymentTestMode($prepaymentTestMode)
+ {
+ $this->prepaymentTestMode = $prepaymentTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getPrepaymentDuedate()
+ {
+ return $this->prepaymentDuedate;
+ }
+
+ /**
+ * @param integer $prepaymentDuedate
+ *
+ * @return NovalnetSettings
+ */
+ public function setPrepaymentDuedate($prepaymentDuedate)
+ {
+ $this->prepaymentDuedate = $prepaymentDuedate;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPrepaymentBuyerNotification()
+ {
+ return $this->prepaymentBuyerNotification;
+ }
+
+ /**
+ * @param string $prepaymentBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setPrepaymentBuyerNotification($prepaymentBuyerNotification)
+ {
+ $this->prepaymentBuyerNotification = $prepaymentBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getBanktransferTestMode()
+ {
+ return $this->banktransferTestMode;
+ }
+
+ /**
+ * @param integer $banktransferTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setBanktransferTestMode($banktransferTestMode)
+ {
+ $this->banktransferTestMode = $banktransferTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getBanktransferBuyerNotification()
+ {
+ return $this->banktransferBuyerNotification;
+ }
+
+ /**
+ * @param string $banktransferBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setBanktransferBuyerNotification($banktransferBuyerNotification)
+ {
+ $this->banktransferBuyerNotification = $banktransferBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getIdealTestMode()
+ {
+ return $this->idealTestMode;
+ }
+
+ /**
+ * @param integer $idealTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setIdealTestMode($idealTestMode)
+ {
+ $this->idealTestMode = $idealTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getIdealBuyerNotification()
+ {
+ return $this->idealBuyerNotification;
+ }
+
+ /**
+ * @return string
+ */
+ public function setIdealBuyerNotification($idealBuyerNotification)
+ {
+ $this->idealBuyerNotification = $idealBuyerNotification;
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getAlipayTestMode()
+ {
+ return $this->alipayTestMode;
+ }
+
+ /**
+ * @param integer $alipayTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setAlipayTestMode($alipayTestMode)
+ {
+ $this->alipayTestMode = $alipayTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getAlipayBuyerNotification()
+ {
+ return $this->alipayBuyerNotification;
+ }
+
+ /**
+ * @return string
+ */
+ public function setAlipayBuyerNotification($alipayBuyerNotification)
+ {
+ $this->alipayBuyerNotification = $alipayBuyerNotification;
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getWechatpayTestMode()
+ {
+ return $this->wechatpayTestMode;
+ }
+
+ /**
+ * @param integer $wechatpayTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setWechatpayTestMode($wechatpayTestMode)
+ {
+ $this->wechatpayTestMode = $wechatpayTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getWechatpayBuyerNotification()
+ {
+ return $this->wechatpayBuyerNotification;
+ }
+
+ /**
+ * @return string
+ */
+ public function setWechatpayBuyerNotification($wechatpayBuyerNotification)
+ {
+ $this->wechatpayBuyerNotification = $wechatpayBuyerNotification;
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getTrustlyTestMode()
+ {
+ return $this->trustlyTestMode;
+ }
+
+ /**
+ * @param integer $trustlyTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setTrustlyTestMode($trustlyTestMode)
+ {
+ $this->trustlyTestMode = $trustlyTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTrustlyBuyerNotification()
+ {
+ return $this->trustlyBuyerNotification;
+ }
+
+ /**
+ * @return string
+ */
+ public function setTrustlyBuyerNotification($trustlyBuyerNotification)
+ {
+ $this->trustlyBuyerNotification = $trustlyBuyerNotification;
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getOnlinebanktransferTestMode()
+ {
+ return $this->onlinebanktransferTestMode;
+ }
+
+ /**
+ * @param integer $onlinebanktransferTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setOnlinebanktransferTestMode($onlinebanktransferTestMode)
+ {
+ $this->onlinebanktransferTestMode = $onlinebanktransferTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getOnlinebanktransferBuyerNotification()
+ {
+ return $this->onlinebanktransferBuyerNotification;
+ }
+
+ /**
+ * @return string
+ */
+ public function setOnlinebanktransferBuyerNotification($onlinebanktransferBuyerNotification)
+ {
+ $this->onlinebanktransferBuyerNotification = $onlinebanktransferBuyerNotification;
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getGuaranteedSepaTestMode()
+ {
+ return $this->guaranteedSepaTestMode;
+ }
+
+ /**
+ * @param integer $guaranteedSepaTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedSepaTestMode($guaranteedSepaTestMode)
+ {
+ $this->guaranteedSepaTestMode = $guaranteedSepaTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getGuaranteedSepaBuyerNotification()
+ {
+ return $this->guaranteedSepaBuyerNotification;
+ }
+
+ /**
+ * @param string $guaranteedSepaBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedSepaBuyerNotification($guaranteedSepaBuyerNotification)
+ {
+ $this->guaranteedSepaBuyerNotification = $guaranteedSepaBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getGuaranteedSepaMinAmount()
+ {
+ return $this->guaranteedSepaMinAmount;
+ }
+
+ /**
+ * @param string $guaranteedSepaMinAmount
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedSepaMinAmount($guaranteedSepaMinAmount)
+ {
+ $this->guaranteedSepaMinAmount = $guaranteedSepaMinAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getGuaranteedSepaOnholdAmount()
+ {
+ return $this->guaranteedSepaOnholdAmount;
+ }
+
+ /**
+ * @param string $guaranteedSepaOnholdAmount
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedSepaOnholdAmount($guaranteedSepaOnholdAmount)
+ {
+ $this->guaranteedSepaOnholdAmount = $guaranteedSepaOnholdAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getGuaranteedSepaPaymentAction()
+ {
+ return $this->guaranteedSepaPaymentAction;
+ }
+
+ /**
+ * @param string $guaranteedSepaPaymentAction
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedSepaPaymentAction($guaranteedSepaPaymentAction)
+ {
+ $this->guaranteedSepaPaymentAction = $guaranteedSepaPaymentAction;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getGuaranteedSepaDuedate()
+ {
+ return $this->guaranteedSepaDuedate;
+ }
+
+ /**
+ * @param string $guaranteedSepaDuedate
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedSepaDuedate($guaranteedSepaDuedate)
+ {
+ $this->guaranteedSepaDuedate = $guaranteedSepaDuedate;
+
+ return $this;
+ }
+
+
+
+ /**
+ * @return integer
+ */
+ public function getGuaranteedSepaOneclick()
+ {
+ return $this->guaranteedSepaOneclick;
+ }
+
+ /**
+ * @param integer $guaranteedSepaOneclick
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedSepaOneclick($guaranteedSepaOneclick)
+ {
+ $this->guaranteedSepaOneclick = $guaranteedSepaOneclick;
+
+ return $this;
+ }
+
+
+
+
+ /**
+ * @return integer
+ */
+ public function getGuaranteedInvoiceTestMode()
+ {
+ return $this->guaranteedInvoiceTestMode;
+ }
+
+ /**
+ * @param int $guaranteedInvoiceTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedInvoiceTestMode($guaranteedInvoiceTestMode)
+ {
+ $this->guaranteedInvoiceTestMode = $guaranteedInvoiceTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getGuaranteedInvoiceBuyerNotification()
+ {
+ return $this->guaranteedInvoiceBuyerNotification;
+ }
+
+ /**
+ * @param string $guaranteedInvoiceBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedInvoiceBuyerNotification($guaranteedInvoiceBuyerNotification)
+ {
+ $this->guaranteedInvoiceBuyerNotification = $guaranteedInvoiceBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getGuaranteedInvoiceMinAmount()
+ {
+ return $this->guaranteedInvoiceMinAmount;
+ }
+
+ /**
+ * @param string $guaranteedInvoiceMinAmount
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedInvoiceMinAmount($guaranteedInvoiceMinAmount)
+ {
+ $this->guaranteedInvoiceMinAmount = $guaranteedInvoiceMinAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getGuaranteedInvoiceOnholdAmount()
+ {
+ return $this->guaranteedInvoiceOnholdAmount;
+ }
+
+ /**
+ * @param string $guaranteedInvoiceOnholdAmount
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedInvoiceOnholdAmount($guaranteedInvoiceOnholdAmount)
+ {
+ $this->guaranteedInvoiceOnholdAmount = $guaranteedInvoiceOnholdAmount;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getGuaranteedInvoicePaymentAction()
+ {
+ return $this->guaranteedInvoicePaymentAction;
+ }
+
+ /**
+ * @param string $guaranteedInvoicePaymentAction
+ *
+ * @return NovalnetSettings
+ */
+ public function setGuaranteedInvoicePaymentAction($guaranteedInvoicePaymentAction)
+ {
+ $this->guaranteedInvoicePaymentAction = $guaranteedInvoicePaymentAction;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getEpsTestMode()
+ {
+ return $this->epsTestMode;
+ }
+
+ /**
+ * @param integer $epsTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setEpsTestMode($epsTestMode)
+ {
+ $this->epsTestMode = $epsTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getEpsBuyerNotification()
+ {
+ return $this->epsBuyerNotification;
+ }
+
+ /**
+ * @param string $epsBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setEpsBuyerNotification($epsBuyerNotification)
+ {
+ $this->epsBuyerNotification = $epsBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getGiropayTestMode()
+ {
+ return $this->giropayTestMode;
+ }
+
+ /**
+ * @param integer $giropayTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setGiropayTestMode($giropayTestMode)
+ {
+ $this->giropayTestMode = $giropayTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getGiropayBuyerNotification()
+ {
+ return $this->giropayBuyerNotification;
+ }
+
+ /**
+ * @param string $giropayBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setGiropayBuyerNotification($giropayBuyerNotification)
+ {
+ $this->giropayBuyerNotification = $giropayBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getPrzelewyTestMode()
+ {
+ return $this->przelewyTestMode;
+ }
+
+ /**
+ * @param integer $przelewyTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setPrzelewyTestMode($przelewyTestMode)
+ {
+ $this->przelewyTestMode = $przelewyTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPrzelewyBuyerNotification()
+ {
+ return $this->przelewyBuyerNotification;
+ }
+
+ /**
+ * @param string $przelewyBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setPrzelewyBuyerNotification($przelewyBuyerNotification)
+ {
+ $this->przelewyBuyerNotification = $przelewyBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getPostfinanceTestMode()
+ {
+ return $this->postfinanceTestMode;
+ }
+
+ /**
+ * @param integer $postfinanceTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setPostfinanceTestMode($postfinanceTestMode)
+ {
+ $this->postfinanceTestMode = $postfinanceTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPostfinanceBuyerNotification()
+ {
+ return $this->postfinanceBuyerNotification;
+ }
+
+ /**
+ * @param string $postfinanceBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setPostfinanceBuyerNotification($postfinanceBuyerNotification)
+ {
+ $this->postfinanceBuyerNotification = $postfinanceBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getPostfinanceCardTestMode()
+ {
+ return $this->postfinanceCardTestMode;
+ }
+
+ /**
+ * @param integer $postfinanceCardTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setPostfinanceCardTestMode($postfinanceCardTestMode)
+ {
+ $this->postfinanceCardTestMode = $postfinanceCardTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPostfinanceCardBuyerNotification()
+ {
+ return $this->postfinanceCardBuyerNotification;
+ }
+
+ /**
+ * @param string $postfinanceCardBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setPostfinanceCardBuyerNotification($postfinanceCardBuyerNotification)
+ {
+ $this->postfinanceCardBuyerNotification = $postfinanceCardBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getMultibancoTestMode()
+ {
+ return $this->multibancoTestMode;
+ }
+
+ /**
+ * @param integer $multibancoTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setMultibancoTestMode($multibancoTestMode)
+ {
+ $this->multibancoTestMode = $multibancoTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getMultibancoBuyerNotification()
+ {
+ return $this->multibancoBuyerNotification;
+ }
+
+ /**
+ * @param string $multibancoBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setMultibancoBuyerNotification($multibancoBuyerNotification)
+ {
+ $this->multibancoBuyerNotification = $multibancoBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getBancontactTestMode()
+ {
+ return $this->bancontactTestMode;
+ }
+
+ /**
+ * @param integer $bancontactTestMode
+ *
+ * @return NovalnetSettings
+ */
+ public function setBancontactTestMode($bancontactTestMode)
+ {
+ $this->bancontactTestMode = $bancontactTestMode;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getBancontactBuyerNotification()
+ {
+ return $this->bancontactBuyerNotification;
+ }
+
+ /**
+ * @param string $bancontactBuyerNotification
+ *
+ * @return NovalnetSettings
+ */
+ public function setBancontactBuyerNotification($bancontactBuyerNotification)
+ {
+ $this->bancontactBuyerNotification = $bancontactBuyerNotification;
+
+ return $this;
+ }
+
+ /**
+ * @return ParameterBag
+ */
+ public function getSettingsBag()
+ {
+ if (null === $this->settings) {
+ $this->settings = new ParameterBag(
+ [
+ 'tariff' => $this->getTariff(),
+ 'payment_access_key' => $this->getPaymentAccessKey(),
+ 'product_activation_key' => $this->getProductActivationKey(),
+ 'callback_test_mode' => $this->getCallbackTestMode(),
+ 'callback_email_to' => $this->getCallbackEmailTo(),
+ 'client_key' => $this->getClientKey(),
+ 'creditcard_labels' => $this->getCreditCardLabel(),
+ 'creditcard_short_labels' => $this->getCreditCardShortLabel(),
+ 'creditcard_test_mode' => $this->getCreditCardTestMode(),
+ 'creditcard_enforce_3d' => $this->creditCardEnforce3d(),
+ 'creditcard_onhold_amount' => $this->getCreditCardOnholdAmount(),
+ 'creditcard_oneclick' => $this->getCreditCardOneclick(),
+ 'creditcard_logo' => $this->getCreditCardLogo(),
+ 'creditcard_payment_action' => $this->getCreditCardPaymentAction(),
+ 'creditcard_inline_form' => $this->getCreditCardInlineForm(),
+ 'creditcard_buyer_notification' => $this->getCreditCardBuyerNotification(),
+ 'creditcard_input_style' => $this->getCreditCardInputStyle(),
+ 'creditcard_label_style' => $this->getCreditCardLabelStyle(),
+ 'creditcard_container_style' => $this->getCreditCardContainerStyle(),
+ 'sepa_labels' => $this->getSepaLabel(),
+ 'sepa_short_labels' => $this->getSepaShortLabel(),
+ 'sepa_test_mode' => $this->getSepaTestMode(),
+ 'sepa_duedate' => $this->getSepaDuedate(),
+ 'sepa_payment_action' => $this->getSepaPaymentAction(),
+ 'sepa_onhold_amount' => $this->getSepaOnholdAmount(),
+ 'sepa_buyer_notification' => $this->getSepaBuyerNotification(),
+ 'guaranteed_sepa_labels' => $this->getGuaranteedSepaLabel(),
+ 'guaranteed_sepa_short_labels' => $this->getGuaranteedSepaShortLabel(),
+ 'guaranteed_sepa_test_mode' => $this->getGuaranteedSepaTestMode(),
+ 'guaranteed_sepa_buyer_notification' => $this->getGuaranteedSepaBuyerNotification(),
+ 'guaranteed_sepa_duedate' => $this->getGuaranteedSepaDuedate(),
+ 'guaranteed_sepa_payment_action' => $this->getGuaranteedSepaPaymentAction(),
+ 'guaranteed_sepa_onhold_amount' => $this->getGuaranteedSepaOnholdAmount(),
+ 'guaranteed_sepa_min_amount' => $this->getGuaranteedSepaMinAmount(),
+ 'guaranteed_sepa_oneclick' => $this->getGuaranteedSepaOneclick(),
+ 'guaranteed_invoice_labels' => $this->getGuaranteedInvoiceLabel(),
+ 'guaranteed_invoice_short_labels' => $this->getGuaranteedInvoiceShortLabel(),
+ 'guaranteed_invoice_test_mode' => $this->getGuaranteedInvoiceTestMode(),
+ 'guaranteed_invoice_buyer_notification' => $this->getGuaranteedInvoiceBuyerNotification(),
+ 'guaranteed_invoice_payment_action' => $this->getGuaranteedInvoicePaymentAction(),
+ 'guaranteed_invoice_onhold_amount' => $this->getGuaranteedInvoiceOnholdAmount(),
+ 'guaranteed_invoice_min_amount' => $this->getGuaranteedInvoiceMinAmount(),
+ 'invoice_labels' => $this->getInvoiceLabel(),
+ 'invoice_short_labels' => $this->getInvoiceShortLabel(),
+ 'invoice_test_mode' => $this->getInvoiceTestMode(),
+ 'invoice_duedate' => $this->getInvoiceDuedate(),
+ 'invoice_payment_action' => $this->getInvoicePaymentAction(),
+ 'invoice_onhold_amount' => $this->getInvoiceOnholdAmount(),
+ 'invoice_buyer_notification' => $this->getInvoiceBuyerNotification(),
+ 'instalment_invoice_labels' => $this->getInstalmentInvoiceLabel(),
+ 'instalment_invoice_short_labels' => $this->getInstalmentInvoiceShortLabel(),
+ 'instalment_invoice_test_mode' => $this->getInstalmentInvoiceTestMode(),
+ 'instalment_invoice_payment_action' => $this->getInstalmentInvoicePaymentAction(),
+ 'instalment_invoice_min_amount' => $this->getInstalmentInvoiceMinAmount(),
+ 'instalment_invoice_onhold_amount' => $this->getInstalmentInvoiceOnholdAmount(),
+ 'instalment_invoice_buyer_notification' => $this->getInstalmentInvoiceBuyerNotification(),
+ 'instalment_invoice_cycle' => $this->getInstalmentInvoiceCycle(),
+ 'instalment_sepa_labels' => $this->getInstalmentSepaLabel(),
+ 'instalment_sepa_short_labels' => $this->getInstalmentSepaShortLabel(),
+ 'instalment_sepa_test_mode' => $this->getInstalmentSepaTestMode(),
+ 'instalment_sepa_duedate' => $this->getInstalmentSepaDuedate(),
+ 'instalment_sepa_payment_action' => $this->getInstalmentSepaPaymentAction(),
+ 'instalment_sepa_min_amount' => $this->getInstalmentSepaMinAmount(),
+ 'instalment_sepa_onhold_amount' => $this->getInstalmentSepaOnholdAmount(),
+ 'instalment_sepa_buyer_notification' => $this->getInstalmentSepaBuyerNotification(),
+ 'instalment_sepa_cycle' => $this->getInstalmentSepaCycle(),
+ 'instalment_sepa_oneclick' => $this->getInstalmentSepaOneclick(),
+ 'prepayment_labels' => $this->getPrepaymentLabel(),
+ 'prepayment_short_labels' => $this->getPrepaymentShortLabel(),
+ 'prepayment_test_mode' => $this->getPrepaymentTestMode(),
+ 'prepayment_due_date' => $this->getPrepaymentDuedate(),
+ 'prepayment_buyer_notification' => $this->getPrepaymentBuyerNotification(),
+ 'cashpayment_labels' => $this->getCashpaymentLabel(),
+ 'cashpayment_short_labels' => $this->getCashpaymentShortLabel(),
+ 'cashpayment_test_mode' => $this->getCashpaymentTestMode(),
+ 'cashpayment_duedate' => $this->getCashpaymentDuedate(),
+ 'cashpayment_buyer_notification' => $this->getCashpaymentBuyerNotification(),
+ 'paypal_labels' => $this->getPaypalLabel(),
+ 'paypal_short_labels' => $this->getPaypalShortLabel(),
+ 'paypal_test_mode' => $this->getPaypalTestMode(),
+ 'paypal_payment_action' => $this->getPaypalPaymentAction(),
+ 'paypal_onhold_amount' => $this->getPaypalOnholdAmount(),
+ 'paypal_oneclick' => $this->getPaypalOneclick(),
+ 'paypal_buyer_notification' => $this->getPaypalBuyerNotification(),
+ 'banktransfer_labels' => $this->getBanktransferLabel(),
+ 'banktransfer_short_labels' => $this->getBanktransferShortLabel(),
+ 'banktransfer_test_mode' => $this->getBanktransferTestMode(),
+ 'banktransfer_buyer_notification' => $this->getBanktransferBuyerNotification(),
+ 'ideal_labels' => $this->getIdealLabel(),
+ 'ideal_short_labels' => $this->getIdealShortLabel(),
+ 'ideal_test_mode' => $this->getIdealTestMode(),
+ 'ideal_buyer_notification' => $this->getIdealBuyerNotification(),
+ 'giropay_labels' => $this->getGiropayLabel(),
+ 'giropay_short_labels' => $this->getGiropayShortLabel(),
+ 'giropay_test_mode' => $this->getGiropayTestMode(),
+ 'giropay_buyer_notification' => $this->getGiropayBuyerNotification(),
+ 'eps_labels' => $this->getEpsLabel(),
+ 'eps_short_labels' => $this->getEpsShortLabel(),
+ 'eps_test_mode' => $this->getEpsTestMode(),
+ 'eps_buyer_notification' => $this->getEpsBuyerNotification(),
+ 'przelewy_labels' => $this->getPrzelewyLabel(),
+ 'przelewy_short_labels' => $this->getPrzelewyShortLabel(),
+ 'przelewy_test_mode' => $this->getPrzelewyTestMode(),
+ 'przelewy_buyer_notification' => $this->getPrzelewyBuyerNotification(),
+ 'postfinance_labels' => $this->getPostfinanceLabel(),
+ 'postfinance_short_labels' => $this->getPostfinanceShortLabel(),
+ 'postfinance_test_mode' => $this->getPostfinanceTestMode(),
+ 'postfinance_buyer_notification' => $this->getPostfinanceBuyerNotification(),
+ 'postfinance_card_labels' => $this->getPostfinanceCardLabel(),
+ 'postfinance_card_short_labels' => $this->getPostfinanceCardShortLabel(),
+ 'postfinance_card_test_mode' => $this->getPostfinanceCardTestMode(),
+ 'postfinance_card_buyer_notification' => $this->getPostfinanceCardBuyerNotification(),
+ 'multibanco_labels' => $this->getMultibancoLabel(),
+ 'multibanco_short_labels' => $this->getMultibancoShortLabel(),
+ 'multibanco_test_mode' => $this->getMultibancoTestMode(),
+ 'multibanco_buyer_notification' => $this->getMultibancoBuyerNotification(),
+ 'bancontact_labels' => $this->getBancontactLabel(),
+ 'bancontact_short_labels' => $this->getBancontactShortLabel(),
+ 'bancontact_test_mode' => $this->getBancontactTestMode(),
+ 'bancontact_buyer_notification' => $this->getBancontactBuyerNotification(),
+ ]
+ );
+ }
+
+ return $this->settings;
+ }
+}
diff --git a/Entity/NovalnetTransactionDetails.php b/Entity/NovalnetTransactionDetails.php
new file mode 100755
index 0000000..8c2fbbd
--- /dev/null
+++ b/Entity/NovalnetTransactionDetails.php
@@ -0,0 +1,347 @@
+id;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTid()
+ {
+ return $this->tid;
+ }
+
+ /**
+ * @param string $tid
+ * @return NovalnetTransactionDetails
+ */
+ public function setTid($tid)
+ {
+ $this->tid = $tid;
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getAmount()
+ {
+ return $this->amount;
+ }
+
+ /**
+ * @param int $amount
+ * @return NovalnetTransactionDetails
+ */
+ public function setAmount($amount)
+ {
+ $this->amount = (int)$amount;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCurrency()
+ {
+ return $this->currency;
+ }
+
+ /**
+ * @param string $currency
+ * @return NovalnetTransactionDetails
+ */
+ public function setCurrency($currency)
+ {
+ $this->currency = $currency;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPaymentType()
+ {
+ return $this->paymentType;
+ }
+
+ /**
+ * @param string $paymentType
+ * @return NovalnetTransactionDetails
+ */
+ public function setPaymentType($paymentType)
+ {
+ $this->paymentType = $paymentType;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCustomerNo()
+ {
+ return $this->customerNo;
+ }
+
+ /**
+ * @param string $customerNo
+ * @return NovalnetTransactionDetails
+ */
+ public function setCustomerNo($customerNo)
+ {
+ $this->customerNo = $customerNo;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getOrderNo()
+ {
+ return $this->orderNo;
+ }
+
+ /**
+ * @param string $orderNo
+ * @return NovalnetTransactionDetails
+ */
+ public function setOrderNo($orderNo)
+ {
+ $this->orderNo = $orderNo;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTestMode()
+ {
+ return $this->testMode;
+ }
+
+ /**
+ * @param string $testMode
+ * @return NovalnetTransactionDetails
+ */
+ public function setTestMode($testMode)
+ {
+ $this->testMode = $testMode;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getStatus()
+ {
+ return $this->status;
+ }
+
+ /**
+ * @param string $status
+ * @return NovalnetTransactionDetails
+ */
+ public function setStatus($status)
+ {
+ $this->status = $status;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getToken()
+ {
+ return $this->token;
+ }
+
+ /**
+ * @param string $token
+ * @return NovalnetTransactionDetails
+ */
+ public function setToken($token)
+ {
+ $this->token = $token;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getPaymentData()
+ {
+ return $this->paymentData;
+ }
+
+ /**
+ * @param string $paymentData
+ * @return NovalnetTransactionDetails
+ */
+ public function setPaymentData($paymentData)
+ {
+ $this->paymentData = $paymentData;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getOneclick()
+ {
+ return $this->oneclick;
+ }
+
+ /**
+ * @param string $oneclick
+ * @return NovalnetTransactionDetails
+ */
+ public function setOneclick($oneclick)
+ {
+ $this->oneclick = $oneclick;
+ return $this;
+ }
+
+ /**
+ * @return integer
+ */
+ public function getRefundedAmount()
+ {
+ return $this->refundedAmount;
+ }
+
+ /**
+ * @param string $refundedAmount
+ * @return NovalnetTransactionDetails
+ */
+ public function setRefundedAmount($refundedAmount)
+ {
+ $this->refundedAmount = $refundedAmount;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getAdditionalInfo()
+ {
+ return $this->additionalInfo;
+ }
+
+ /**
+ * @param string $additionalInfo
+ * @return NovalnetTransactionDetails
+ */
+ public function setAdditionalInfo($additionalInfo)
+ {
+ $this->additionalInfo = $additionalInfo;
+ return $this;
+ }
+}
diff --git a/Entity/Repository/NovalnetSettingsRepository.php b/Entity/Repository/NovalnetSettingsRepository.php
new file mode 100755
index 0000000..4a6bc02
--- /dev/null
+++ b/Entity/Repository/NovalnetSettingsRepository.php
@@ -0,0 +1,25 @@
+createQueryBuilder('settings')
+ ->innerJoin('settings.channel', 'channel')
+ ->andWhere('channel.enabled = true')
+ ->getQuery()
+ ->getResult();
+ }
+}
diff --git a/EventListener/NovalnetResponseListener.php b/EventListener/NovalnetResponseListener.php
new file mode 100755
index 0000000..3b67516
--- /dev/null
+++ b/EventListener/NovalnetResponseListener.php
@@ -0,0 +1,239 @@
+paymentProvider = $paymentProvider;
+ $this->doctrineHelper = $doctrineHelper;
+ $this->translator = $translator;
+ $this->session = $session;
+ $this->novalnetHelper = $novalnetHelper;
+ $this->router = $routerInterface;
+ $this->novalnetCallback = $novalnetCallback;
+ $this->client = $client;
+ $this->userLocalizationManager = $userLocalizationManager;
+ }
+
+ /**
+ * @param AbstractCallbackEvent $event
+ * @return null
+ */
+ public function onError(AbstractCallbackEvent $event)
+ {
+ $paymentTransaction = $event->getPaymentTransaction();
+ $responseData = $paymentTransaction->getResponse();
+
+ if (!$paymentTransaction) {
+ return;
+ }
+ if (false === $this->paymentProvider->hasPaymentMethod($paymentTransaction->getPaymentMethod())) {
+ return;
+ }
+
+ # Handle direct payment failure transaction
+ if (!empty($responseData) && $responseData['result']['status_code'] != '100') {
+ $errorMsg = $responseData['result']['status_text'];
+ } else {
+ $eventData = $event->getData();
+ $paymentMethod = $this->paymentProvider->getPaymentMethod($paymentTransaction->getPaymentMethod());
+ $paymentAccessKey = $paymentMethod->config->getPaymentAccessKey();
+
+ $novalnetTxnSecret = $paymentTransaction->getReference();
+ $tokenString = $eventData['tid'] . $novalnetTxnSecret . $eventData['status'] . strrev($paymentAccessKey);
+ $generatedChecksum = hash('sha256', $tokenString);
+ $errorMsg = $generatedChecksum !== $eventData['checksum'] ?
+ $this->translator->trans('novalnet.hash_check_failed') : $eventData['status_text'];
+ }
+ $this->session->getFlashBag()->set('error', $errorMsg);
+ }
+
+ /**
+ * @param AbstractCallbackEvent $event
+ * @return null
+ */
+ public function onReturn(AbstractCallbackEvent $event)
+ {
+
+ $paymentTransaction = $event->getPaymentTransaction();
+ if (!$paymentTransaction) {
+ return;
+ }
+
+ $paymentMethodId = $paymentTransaction->getPaymentMethod();
+ if (false === $this->paymentProvider->hasPaymentMethod($paymentMethodId)) {
+ return;
+ }
+ $eventData = $event->getData();
+
+ $transactionOptions = $paymentTransaction->getTransactionOptions();
+
+
+
+ $paymentMethod = $this->paymentProvider->getPaymentMethod($paymentTransaction->getPaymentMethod());
+ $paymentAccessKey = $paymentMethod->config->getPaymentAccessKey();
+
+ //Validate the hash value from the Novalnet server for redirection payments
+ $novalnetTxnSecret = $paymentTransaction->getReference();
+
+ $tokenString = $eventData['tid'] . $novalnetTxnSecret . $eventData['status'] . strrev($paymentAccessKey);
+ $generatedChecksum = hash('sha256', $tokenString);
+ if ($generatedChecksum !== $eventData['checksum'] || $eventData['status_code'] != '100') {
+ $errorMsg = ($generatedChecksum !== $eventData['checksum'])
+ ? $this->translator->trans('novalnet.hash_check_failed') : $eventData['status_text'];
+ $this->session->getFlashBag()->set('error', $errorMsg);
+ $event->markFailed();
+ $urlParams = ['id' => $transactionOptions['checkoutId'], 'transition' => 'payment_error'];
+ $url = $this->router->generate('oro_checkout_frontend_checkout', $urlParams);
+ $event->setResponse(new RedirectResponse($url));
+ return;
+ }
+
+ $data = [];
+ $data['transaction'] = [
+ 'tid' => $eventData['tid']
+ ];
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+
+ $lang = $this->userLocalizationManager->getCurrentLocalizationByCustomerUser($order->getCustomerUser())
+ ->getLanguage()->getCode();
+
+ $data['custom'] = [
+ 'lang' => strtoupper($lang),
+ ];
+
+ $response = $this->client->send($paymentAccessKey, $data, 'https://payport.novalnet.de/v2/transaction/details');
+
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+
+
+ // set payment status
+ try {
+ if (in_array($response['transaction']['status'], ['PENDING', 'ON_HOLD'])) {
+ $paymentMethod->execute(NovalnetPaymentMethod::PENDING, $paymentTransaction);
+ } else {
+ $paymentMethod->execute(NovalnetPaymentMethod::COMPLETE, $paymentTransaction);
+ }
+ } catch (\InvalidArgumentException $e) {
+ if ($this->logger) {
+ $this->logger->error($e->getMessage(), []);
+ }
+ }
+ }
+
+ /**
+ * @param AbstractCallbackEvent $event
+ * @return null
+ */
+ public function onNotify(AbstractCallbackEvent $event)
+ {
+ $paymentTransaction = $event->getPaymentTransaction();
+
+
+ if (!$paymentTransaction) {
+ return;
+ }
+
+ $paymentMethodId = $paymentTransaction->getPaymentMethod();
+
+ if (false === $this->paymentProvider->hasPaymentMethod($paymentMethodId)) {
+ return;
+ }
+
+ $this->novalnetCallback->startProcess($event, $this->paymentProvider);
+
+ $event->markSuccessful();
+ }
+}
diff --git a/Form/Type/CreditCardFormType.php b/Form/Type/CreditCardFormType.php
new file mode 100755
index 0000000..0e155d2
--- /dev/null
+++ b/Form/Type/CreditCardFormType.php
@@ -0,0 +1,157 @@
+translator = $translator;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+
+ if (!empty($options['masked_data'])) {
+ $builder->add('creditCardSavedCardDetails', CreditCardSavedCardDetailsType::class, [
+ 'label' => false,
+ 'masked_data' => $options['masked_data']
+ ]);
+ }
+ $builder
+ ->add(
+ 'panhash',
+ HiddenType::class,
+ [
+ 'label' => 'false',
+ ]
+ )
+ ->add(
+ 'uniqueId',
+ HiddenType::class,
+ [
+ 'label' => 'false',
+ ]
+ )
+ ->add(
+ 'clientKey',
+ HiddenType::class,
+ [
+ 'label' => 'false',
+ 'data' => $options['client_key'],
+ ]
+ )
+ ->add(
+ 'doRedirect',
+ HiddenType::class,
+ [
+ 'label' => 'false',
+ ]
+ )
+ ->add(
+ 'customerDetails',
+ HiddenType::class,
+ [
+ 'label' => 'false',
+ 'data' => $options['customer_details'],
+ ]
+ )
+ ->add(
+ 'labelStyle',
+ HiddenType::class,
+ [
+ 'label' => 'false',
+ 'data' => $options['label_style'],
+ ]
+ )
+ ->add(
+ 'inputStyle',
+ HiddenType::class,
+ [
+ 'label' => 'false',
+ 'data' => $options['input_style'],
+ ]
+ )
+ ->add(
+ 'inlineForm',
+ HiddenType::class,
+ [
+ 'label' => 'false',
+ 'data' => $options['inline_form'],
+ ]
+ )
+ ->add(
+ 'enforce3d',
+ HiddenType::class,
+ [
+ 'label' => 'false',
+ 'data' => $options['enforce_3d'],
+ ]
+ )
+ ->add(
+ 'saveCardDetails',
+ CheckboxType::class,
+ [
+ 'label' => $this->translator->trans('novalnet.credit_card.save_card_details'),
+ 'attr' => ['checked' => true]
+ ]
+ )
+ ->add(
+ 'containerStyle',
+ HiddenType::class,
+ [
+ 'label' => 'false',
+ 'data' => $options['container_style'],
+ ]
+ );
+ }
+
+ /**
+ * @param OptionsResolver $resolver
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'csrf_protection' => false,
+ 'client_key' => '',
+ 'customer_details' => '',
+ 'label_style' => '',
+ 'input_style' => '',
+ 'container_style' => '',
+ 'inline_form' => '',
+ 'enforce_3d' => '',
+ 'masked_data' => [],
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getBlockPrefix()
+ {
+ return self::BLOCK_PREFIX;
+ }
+}
diff --git a/Form/Type/CreditCardSavedCardDetailsType.php b/Form/Type/CreditCardSavedCardDetailsType.php
new file mode 100755
index 0000000..d79f983
--- /dev/null
+++ b/Form/Type/CreditCardSavedCardDetailsType.php
@@ -0,0 +1,75 @@
+translator = $translator;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+ $choices = [];
+ if (!empty($options['masked_data'])) {
+ foreach ($options['masked_data'] as $key => $value) {
+ $cardNo = substr($value['card_number'], -4);
+ $label = sprintf($this->translator->trans('novalnet.credit_card_saved_details_label'), $value['card_brand'], $cardNo, $value['card_expiry_month'], $value['card_expiry_year']);
+ $choices[$key][$label] = $value['token'];
+ }
+
+ $label = $this->translator->trans('novalnet.add_new_card_details');
+
+ $choices[$label] = 'new_account_details';
+
+ $builder->add('paymentData', ChoiceType::class, [
+ 'choices' => $choices,
+ 'expanded' => true,
+ 'multiple' => false,
+ 'data' => 'new_account_details'
+ ]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'csrf_protection' => false,
+ 'masked_data' => '',
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getBlockPrefix()
+ {
+ return self::NAME;
+ }
+}
diff --git a/Form/Type/GuaranteedSepaFormType.php b/Form/Type/GuaranteedSepaFormType.php
new file mode 100755
index 0000000..174c78e
--- /dev/null
+++ b/Form/Type/GuaranteedSepaFormType.php
@@ -0,0 +1,95 @@
+translator = $translator;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+ $builder->add('guaranteedSepaSavedAccountDetails', GuaranteedSepaSavedAccountDetailsType::class, [
+ 'label' => false,
+ 'masked_data' => $options['masked_data']
+ ]);
+ $builder
+ ->add(
+ 'guaranteedSepaiban',
+ TextType::class,
+ [
+ 'label' => 'novalnet.sepa.iban.form.label',
+ 'required' => true,
+ 'attr' => [
+ 'autocomplete' => 'off',
+ ],
+ 'constraints' => [
+ new NotBlank(),
+ ],
+ ]
+ )
+ ->add(
+ 'guaranteedSepaSaveAccountDetails',
+ CheckboxType::class,
+ [
+ 'label' => $this->translator->trans('novalnet.save_account_details'),
+ 'attr' => ['checked' => true]
+ ]
+ )
+ ->add(
+ 'guaranteedSepaErrorMsg',
+ HiddenType::class,
+ [
+ 'data' => $options['guaranteed_sepa_error_msg'],
+ ]
+ );
+ }
+
+ /**
+ * @param OptionsResolver $resolver
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'csrf_protection' => false,
+ 'guaranteed_sepa_error_msg' => '',
+ 'masked_data' => []
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getBlockPrefix()
+ {
+ return self::BLOCK_PREFIX;
+ }
+}
diff --git a/Form/Type/GuaranteedSepaSavedAccountDetailsType.php b/Form/Type/GuaranteedSepaSavedAccountDetailsType.php
new file mode 100755
index 0000000..9fc8737
--- /dev/null
+++ b/Form/Type/GuaranteedSepaSavedAccountDetailsType.php
@@ -0,0 +1,73 @@
+translator = $translator;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+ $choices = [];
+ if (!empty($options['masked_data'])) {
+ foreach ($options['masked_data'] as $key => $value) {
+ $choices[$key]['IBAN ' . $value['iban']] = $value['token'];
+ }
+
+ $label = $this->translator->trans('novalnet.add_new_account_details');
+
+ $choices[$label] = 'new_account_details';
+
+ $builder->add('paymentData', ChoiceType::class, [
+ 'choices' => $choices,
+ 'expanded' => true,
+ 'multiple' => false,
+ 'data' => 'new_account_details'
+ ]);
+ }
+ }
+
+ /**
+ * @param OptionsResolver $resolver
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'csrf_protection' => false,
+ 'masked_data' => '',
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getBlockPrefix()
+ {
+ return self::BLOCK_PREFIX;
+ }
+}
diff --git a/Form/Type/InstalmentInvoiceCycleType.php b/Form/Type/InstalmentInvoiceCycleType.php
new file mode 100755
index 0000000..7dd71e1
--- /dev/null
+++ b/Form/Type/InstalmentInvoiceCycleType.php
@@ -0,0 +1,65 @@
+translator = $translator;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+ $builder
+ ->add(
+ 'instalmentInvoiceCycle',
+ ChoiceType::class,
+ [
+ 'label' => sprintf($this->translator->trans('novalnet.instalment_cycle.form.label'), $options['instalment_invoice_cycles']['netAmount']),
+ 'choices' => array_flip($options['instalment_invoice_cycles']['dropdownData']),
+ ]
+ );
+ }
+
+ /**
+ * @param OptionsResolver $resolver
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'csrf_protection' => false,
+ 'instalment_invoice_cycles' => [],
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getBlockPrefix()
+ {
+ return self::BLOCK_PREFIX;
+ }
+}
diff --git a/Form/Type/InstalmentSepaCycleType.php b/Form/Type/InstalmentSepaCycleType.php
new file mode 100755
index 0000000..836d9fc
--- /dev/null
+++ b/Form/Type/InstalmentSepaCycleType.php
@@ -0,0 +1,96 @@
+translator = $translator;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+ $builder->add('instalmentSepaSavedAccountDetails', InstalmentSepaSavedAccountDetailsType::class, [
+ 'label' => false,
+ 'masked_data' => $options['masked_data']
+ ]);
+
+ $builder
+ ->add(
+ 'instalmentSepaiban',
+ TextType::class,
+ [
+ 'label' => 'novalnet.sepa.iban.form.label',
+ 'required' => true,
+ 'attr' => [
+ 'autocomplete' => 'off',
+ ],
+ 'constraints' => [
+ new NotBlank(),
+ ],
+ ]
+ )
+ ->add(
+ 'instalmentSepaCycle',
+ ChoiceType::class,
+ [
+ 'label' => sprintf($this->translator->trans('novalnet.instalment_cycle.form.label'), $options['instalment_sepa_cycles']['netAmount']),
+ 'choices' => array_flip($options['instalment_sepa_cycles']['dropdownData']),
+ ]
+ )
+ ->add(
+ 'instlSepaSaveAccountDetails',
+ CheckboxType::class,
+ [
+ 'label' => $this->translator->trans('novalnet.save_account_details'),
+ 'attr' => ['checked' => true]
+ ]
+ );
+ }
+
+ /**
+ * @param OptionsResolver $resolver
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'csrf_protection' => false,
+ 'instalment_sepa_cycles' => [],
+ 'masked_data' => []
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getBlockPrefix()
+ {
+ return self::BLOCK_PREFIX;
+ }
+}
diff --git a/Form/Type/InstalmentSepaSavedAccountDetailsType.php b/Form/Type/InstalmentSepaSavedAccountDetailsType.php
new file mode 100755
index 0000000..6c8b8ae
--- /dev/null
+++ b/Form/Type/InstalmentSepaSavedAccountDetailsType.php
@@ -0,0 +1,74 @@
+translator = $translator;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+ $choices = [];
+ if (!empty($options['masked_data'])) {
+ foreach ($options['masked_data'] as $key => $value) {
+ $choices[$key]['IBAN ' . $value['iban']] = $value['token'];
+ }
+
+ $label = $this->translator->trans('novalnet.add_new_account_details');
+
+ $choices[$label] = 'new_account_details';
+
+
+ $builder->add('paymentData', ChoiceType::class, [
+ 'choices' => $choices,
+ 'expanded' => true,
+ 'multiple' => false,
+ 'data' => 'new_account_details'
+ ]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'csrf_protection' => false,
+ 'masked_data' => '',
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getBlockPrefix()
+ {
+ return self::NAME;
+ }
+}
diff --git a/Form/Type/NovalnetSettingsType.php b/Form/Type/NovalnetSettingsType.php
new file mode 100755
index 0000000..f092396
--- /dev/null
+++ b/Form/Type/NovalnetSettingsType.php
@@ -0,0 +1,790 @@
+translator = $translator;
+ $this->novalnetSettingsDataProvider = $novalnetSettingsDataProvider;
+ }
+
+ /**
+ * @param FormBuilderInterface $builder
+ * @param array $options
+ *
+ * @throws ConstraintDefinitionException
+ * @throws InvalidOptionsException
+ * @throws MissingOptionsException
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+ $builder
+ ->add('creditCardLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('creditCardShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('creditCardTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false
+ ])
+ ->add('creditCardEnforce3d', CheckboxType::class, [
+ 'label' => 'novalnet.settings.credit_card_enforce_3d.label',
+ 'required' => false
+ ])
+ ->add('creditCardPaymentAction', ChoiceType::class, [
+ 'choices' => $this->novalnetSettingsDataProvider->getPaymentActions(),
+ 'choice_label' => function ($action) {
+ return $this->translator->trans(
+ sprintf('novalnet.settings.%s', $action)
+ );
+ },
+ 'label' => 'novalnet.settings.payment_action.label',
+ 'required' => false
+ ])
+ ->add('creditCardOnholdAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.onhold_amount.label',
+ 'required' => false
+ ])
+ ->add('creditCardOneclick', CheckboxType::class, [
+ 'label' => 'novalnet.settings.oneclick.label',
+ 'required' => false
+ ])
+ ->add('creditCardInlineForm', CheckboxType::class, [
+ 'label' => 'novalnet.settings.credit_card_inline_form.label',
+ 'required' => false
+ ])
+ ->add('creditCardLogo', ChoiceType::class, [
+ 'choices' => $this->novalnetSettingsDataProvider->getCreditCardLogos(),
+ 'choice_label' => function ($logo) {
+ return $this->translator->trans(
+ sprintf('novalnet.settings.%s', $logo)
+ );
+ },
+ 'label' => 'novalnet.settings.credit_card_logo.label',
+ 'multiple' => true,
+ 'required' => false
+ ])
+ ->add('creditCardBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('creditCardInputStyle', TextType::class, [
+ 'label' => 'novalnet.settings.credit_card_input_style.label',
+ 'required' => false
+ ])
+ ->add('creditCardLabelStyle', TextType::class, [
+ 'label' => 'novalnet.settings.credit_card_label_style.label',
+ 'required' => false
+ ])
+ ->add('creditCardContainerStyle', TextType::class, [
+ 'label' => 'novalnet.settings.credit_card_container_style.label',
+ 'required' => false
+ ])
+ ->add('sepaLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('sepaShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('sepaTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('sepaOneclick', CheckboxType::class, [
+ 'label' => 'novalnet.settings.oneclick.label',
+ 'required' => false,
+ ])
+ ->add('sepaDuedate', IntegerType::class, [
+ 'label' => 'novalnet.settings.sepa_duedate.label',
+ 'required' => false,
+ 'constraints' => [new NumericRange(['min' => 2, 'max' => 14])]
+ ])
+ ->add('sepaPaymentAction', ChoiceType::class, [
+ 'choices' => $this->novalnetSettingsDataProvider->getPaymentActions(),
+ 'choice_label' => function ($action) {
+ return $this->translator->trans(
+ sprintf('novalnet.settings.%s', $action)
+ );
+ },
+ 'label' => 'novalnet.settings.payment_action.label',
+ 'required' => false
+ ])
+ ->add('sepaOnholdAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.onhold_amount.label',
+ 'required' => false
+ ])
+ ->add('sepaBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('guaranteedSepaLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('guaranteedSepaShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('guaranteedInvoiceLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('guaranteedInvoiceShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('guaranteedSepaTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('guaranteedSepaBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('guaranteedSepaMinAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.min_amount.label',
+ 'required' => false,
+ 'constraints' => [new NumericRange(['min' => 999])]
+ ])
+ ->add('guaranteedSepaPaymentAction', ChoiceType::class, [
+ 'choices' => $this->novalnetSettingsDataProvider->getPaymentActions(),
+ 'choice_label' => function ($action) {
+ return $this->translator->trans(
+ sprintf('novalnet.settings.%s', $action)
+ );
+ },
+ 'label' => 'novalnet.settings.payment_action.label',
+ 'required' => false
+ ])
+ ->add('guaranteedSepaOnholdAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.onhold_amount.label',
+ 'required' => false
+ ])
+ ->add('guaranteedSepaDuedate', IntegerType::class, [
+ 'label' => 'novalnet.settings.sepa_duedate.label',
+ 'required' => false,
+ 'constraints' => [new NumericRange(['min' => 2, 'max' => 14])]
+ ])
+ ->add('guaranteedSepaOneclick', CheckboxType::class, [
+ 'label' => 'novalnet.settings.oneclick.label',
+ 'required' => false,
+ ])
+ ->add('guaranteedInvoiceTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('guaranteedInvoiceBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('guaranteedInvoiceMinAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.min_amount.label',
+ 'required' => false,
+ 'constraints' => [new NumericRange(['min' => 999])]
+ ])
+ ->add('guaranteedInvoicePaymentAction', ChoiceType::class, [
+ 'choices' => $this->novalnetSettingsDataProvider->getPaymentActions(),
+ 'choice_label' => function ($action) {
+ return $this->translator->trans(
+ sprintf('novalnet.settings.%s', $action)
+ );
+ },
+ 'label' => 'novalnet.settings.payment_action.label',
+ 'required' => false
+ ])
+ ->add('guaranteedInvoiceOnholdAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.onhold_amount.label',
+ 'required' => false
+ ])
+ ->add('invoiceLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('invoiceShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('invoiceTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('invoiceDuedate', IntegerType::class, [
+ 'label' => 'novalnet.settings.invoice_duedate.label',
+ 'required' => false,
+ 'constraints' => [new NumericRange(['min' => 7])]
+ ])
+ ->add('invoicePaymentAction', ChoiceType::class, [
+ 'choices' => $this->novalnetSettingsDataProvider->getPaymentActions(),
+ 'choice_label' => function ($action) {
+ return $this->translator->trans(
+ sprintf('novalnet.settings.%s', $action)
+ );
+ },
+ 'label' => 'novalnet.settings.payment_action.label',
+ 'required' => false
+ ])
+ ->add('invoiceOnholdAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.onhold_amount.label',
+ 'required' => false
+ ])
+ ->add('invoiceBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('instalmentInvoiceLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('instalmentInvoiceShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('instalmentInvoiceTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('instalmentInvoicePaymentAction', ChoiceType::class, [
+ 'choices' => $this->novalnetSettingsDataProvider->getPaymentActions(),
+ 'choice_label' => function ($action) {
+ return $this->translator->trans(
+ sprintf('novalnet.settings.%s', $action)
+ );
+ },
+ 'label' => 'novalnet.settings.payment_action.label',
+ 'required' => false
+ ])
+ ->add('instalmentInvoiceOnholdAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.onhold_amount.label',
+ 'required' => false
+ ])
+ ->add('instalmentInvoiceMinAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.min_amount.label',
+ 'required' => false,
+ 'constraints' => [new NumericRange(['min' => 1998])]
+ ])
+ ->add('instalmentInvoiceCycle', HiddenType::class, [
+ 'label' => 'novalnet.settings.instalment_cycle.label',
+ 'required' => false
+ ])
+ ->add('instalmentInvoiceBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('instalmentSepaLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('instalmentSepaShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('instalmentSepaTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('instalmentSepaDuedate', IntegerType::class, [
+ 'label' => 'novalnet.settings.instalment_sepa_duedate.label',
+ 'required' => false,
+ 'constraints' => [new NumericRange(['min' => 2, 'max' => 14])]
+ ])
+ ->add('instalmentSepaPaymentAction', ChoiceType::class, [
+ 'choices' => $this->novalnetSettingsDataProvider->getPaymentActions(),
+ 'choice_label' => function ($action) {
+ return $this->translator->trans(
+ sprintf('novalnet.settings.%s', $action)
+ );
+ },
+ 'label' => 'novalnet.settings.payment_action.label',
+ 'required' => false
+ ])
+ ->add('instalmentSepaOnholdAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.onhold_amount.label',
+ 'required' => false
+ ])
+ ->add('instalmentSepaMinAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.min_amount.label',
+ 'required' => false,
+ 'constraints' => [new NumericRange(['min' => 1998])]
+ ])
+ ->add('instalmentSepaCycle', HiddenType::class, [
+ 'label' => 'novalnet.settings.instalment_cycle.label',
+ 'required' => false
+ ])
+ ->add('instalmentSepaBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('instalmentSepaOneclick', CheckboxType::class, [
+ 'label' => 'novalnet.settings.oneclick.label',
+ 'required' => false,
+ ])
+ ->add('prepaymentLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('prepaymentShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('prepaymentTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('prepaymentDuedate', IntegerType::class, [
+ 'label' => 'novalnet.settings.prepayment_duedate.label',
+ 'required' => false,
+ 'constraints' => [new NumericRange(['min' => 7])]
+ ])
+ ->add('prepaymentBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('cashpaymentLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('cashpaymentShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('cashpaymentTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('cashpaymentDuedate', IntegerType::class, [
+ 'label' => 'novalnet.settings.cashpayment_duedate.label',
+ 'required' => false,
+ 'constraints' => [new GreaterThanZero()]
+ ])
+ ->add('cashpaymentBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('paypalLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('paypalShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('paypalTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('paypalPaymentAction', ChoiceType::class, [
+ 'choices' => $this->novalnetSettingsDataProvider->getPaymentActions(),
+ 'choice_label' => function ($action) {
+ return $this->translator->trans(
+ sprintf('novalnet.settings.%s', $action)
+ );
+ },
+ 'label' => 'novalnet.settings.payment_action.label',
+ 'required' => false
+ ])
+ ->add('paypalOnholdAmount', IntegerType::class, [
+ 'label' => 'novalnet.settings.onhold_amount.label',
+ 'required' => false
+ ])
+ ->add('paypalBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('paypalOneclick', CheckboxType::class, [
+ 'label' => 'novalnet.settings.oneclick.label',
+ 'required' => false,
+ ])
+ ->add('banktransferLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('banktransferShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('banktransferTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('banktransferBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('idealLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('idealShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('idealTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('idealBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('alipayLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('alipayShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('alipayTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('alipayBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('wechatpayLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('wechatpayShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('wechatpayTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('wechatpayBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('onlinebanktransferLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('onlinebanktransferShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('onlinebanktransferTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('onlinebanktransferBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('trustlyLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('trustlyShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('trustlyTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('trustlyBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('giropayLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('giropayShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('giropayTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('giropayBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('epsLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('epsShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('epsTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('epsBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('przelewyLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('przelewyShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('przelewyTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('przelewyBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('postfinanceLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('postfinanceShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('postfinanceTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('postfinanceBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('postfinanceCardLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('postfinanceCardShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('postfinanceCardTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('postfinanceCardBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('multibancoLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('multibancoShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('multibancoTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false,
+ ])
+ ->add('multibancoBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('bancontactLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_label.label',
+ 'required' => true,
+ ])
+ ->add('bancontactShortLabel', TextType::class, [
+ 'label' => 'novalnet.settings.payment_short_label.label',
+ 'required' => true,
+ ])
+ ->add('bancontactTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.test_mode.label',
+ 'required' => false
+ ])
+ ->add('bancontactBuyerNotification', TextType::class, [
+ 'label' => 'novalnet.settings.buyer_notification.label',
+ 'required' => false
+ ])
+ ->add('clientKey', HiddenType::class, [
+ 'label' => false,
+ 'required' => false
+ ])
+ ->add('tariff', HiddenType::class, [
+ 'label' => 'novalnet.settings.tariff.label',
+ 'required' => true,
+ ])
+ ->add('paymentAccessKey', TextType::class, [
+ 'label' => 'novalnet.settings.payment_access_key.label',
+ 'required' => true,
+ ])
+ ->add('productActivationKey', TextType::class, [
+ 'label' => 'novalnet.settings.product_activation_key.label',
+ 'required' => true,
+ ])
+ ->add('displayPaymentLogo', CheckboxType::class, [
+ 'label' => 'novalnet.settings.display_payment_logo.label',
+ 'required' => false
+ ])
+ ->add('callbackEmailTo', TextType::class, [
+ 'label' => 'novalnet.settings.callback_email_to.label',
+ 'required' => false,
+ ])
+ ->add('callbackTestMode', CheckboxType::class, [
+ 'label' => 'novalnet.settings.callback_test_mode.label',
+ 'required' => false,
+ ]);
+ $builder->addEventListener(FormEvents::PRE_SET_DATA, [$this, 'preSetData']);
+ }
+
+ /**
+ * @param FormEvent $event
+ */
+ public function preSetData(FormEvent $event)
+ {
+ /** @var NovalnetSettings|null $data */
+ $data = $event->getData();
+
+ if ($data)
+ {
+ if(is_null($data->getDisplayPaymentLogo())) {
+ $data->setDisplayPaymentLogo(true);
+ }
+ $paymentTitle = [
+ 'CreditCard' => 'Credit/Debit Cards',
+ 'Sepa' => 'Direct Debit SEPA',
+ 'Prepayment' => 'Prepayment',
+ 'Invoice' => 'Invoice',
+ 'Banktransfer' => 'Sofort',
+ 'Paypal' => 'PayPal',
+ 'Ideal' => 'iDEAL',
+ 'Alipay' => 'Alipay',
+ 'Wechatpay' => 'Wechat Pay',
+ 'Trustly' => 'Trustly',
+ 'Onlinebanktransfer' => 'Online bank transfer',
+ 'Eps' => 'eps',
+ 'Cashpayment' => 'Barzahlen/viacash',
+ 'Giropay' => 'giropay',
+ 'Przelewy' => 'Przelewy24',
+ 'PostfinanceCard' => 'PostfinanceCard',
+ 'Postfinance' => 'Postfinance',
+ 'Multibanco' => 'Multibanco',
+ 'Bancontact' => 'Bancontact',
+ 'InstalmentInvoice' => 'Instalment by Invoice',
+ 'InstalmentSepa' => 'Instalment by Sepa',
+ 'GuaranteedSepa' => 'SEPA direct debit with payment guarantee',
+ 'GuaranteedInvoice' => 'Invoice with payment guarantee',
+ ];
+
+ foreach ($paymentTitle as $code => $title) {
+ $getLabel = 'get' . $code . 'Label';
+ $getOneclick = 'get' . $code . 'Oneclick';
+ if (in_array($code, ['Sepa', 'CreditCard', 'GuaranteedSepa', 'InstalmentSepa']) && is_null($data->$getOneclick())) {
+ $setOneclick = 'set' . $code . 'Oneclick';
+ $data->$setOneclick(true);
+ }
+ if (empty($data->$getLabel())) {
+ $addLabel = 'set' . $code . 'Label';
+ $data->$addLabel($title);
+ $addShortLabel = 'set' . $code . 'ShortLabel';
+ $data->$addShortLabel($title);
+ }
+ if(in_array($code, ['CreditCard', 'Sepa', 'GuaranteedSepa', 'InstalmentSepa', 'Invoice', 'GuaranteedInvoice', 'InstalmentInvoice', 'Paypal'])) {
+ $getAction = 'get' . $code . 'PaymentAction';
+ $setAction = 'set' . $code . 'PaymentAction';
+ if(is_null($data->$getAction())) {
+ $data->$setAction('capture');
+ }
+ }
+ if($code == 'CreditCard') {
+ if(is_null($data->getCreditCardLogo())) {
+ $data->setCreditCardLogo($this->novalnetSettingsDataProvider->getCreditCardLogos());
+ }
+ if(is_null($data->getCreditCardInlineForm())) {
+ $data->setCreditCardInlineForm(true);
+ }
+ }
+ else if(in_array($code, ['InstalmentInvoice', 'InstalmentSepa', 'GuaranteedSepa', 'GuaranteedInvoice'])) {
+ $getMinAmount = 'get' . $code . 'MinAmount';
+ $setMinAmount = 'set' . $code . 'MinAmount';
+ $minAmount = 999;
+ if(in_array($code, ['InstalmentInvoice', 'InstalmentSepa'])) {
+ $minAmount = 1998;
+ }
+
+ if(is_null($data->$getMinAmount())) {
+ $data->$setMinAmount($minAmount);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * @param OptionsResolver $resolver
+ *
+ * @throws AccessException
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults(
+ [
+ 'data_class' => NovalnetSettings::class,
+ ]
+ );
+ }
+
+ /**
+ * @return string
+ */
+ public function getBlockPrefix()
+ {
+ return self::BLOCK_PREFIX;
+ }
+}
diff --git a/Form/Type/PaypalFormType.php b/Form/Type/PaypalFormType.php
new file mode 100755
index 0000000..4beb956
--- /dev/null
+++ b/Form/Type/PaypalFormType.php
@@ -0,0 +1,81 @@
+translator = $translator;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+ $choices = [];
+ if (!empty($options['masked_data'])) {
+ foreach ($options['masked_data'] as $key => $value) {
+ $choices[$key][$value['paypal_account']] = $value['token'];
+ }
+
+ $label = $this->translator->trans('novalnet.add_new_account_details');
+ $choices[$label] = 'new_account_details';
+
+ $builder->add('paymentData', ChoiceType::class, [
+ 'choices' => $choices,
+ 'expanded' => true,
+ 'multiple' => false,
+ 'data' => 'new_account_details'
+ ]);
+ }
+ $builder->add(
+ 'paypalSaveAccountDetails',
+ CheckboxType::class,
+ [
+ 'label' => $this->translator->trans('novalnet.save_account_details'),
+ 'attr' => ['checked' => true]
+ ]
+ );
+ }
+
+ /**
+ * @param OptionsResolver $resolver
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'csrf_protection' => false,
+ 'masked_data' => [],
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getBlockPrefix()
+ {
+ return self::BLOCK_PREFIX;
+ }
+}
diff --git a/Form/Type/SepaFormType.php b/Form/Type/SepaFormType.php
new file mode 100755
index 0000000..4f3241f
--- /dev/null
+++ b/Form/Type/SepaFormType.php
@@ -0,0 +1,89 @@
+translator = $translator;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+ $builder->add('sepaSavedAccountDetails', SepaSavedAccountDetailsType::class, [
+ 'label' => false,
+ 'masked_data' => $options['masked_data']
+ ]);
+ $builder
+ ->add(
+ 'sepaiban',
+ TextType::class,
+ [
+ 'label' => 'novalnet.sepa.iban.form.label',
+ 'required' => true,
+ 'attr' => [
+ 'autocomplete' => 'off',
+ ],
+ 'constraints' => [
+ new NotBlank(),
+ ],
+ ]
+ )
+ ->add(
+ 'sepaSaveAccountDetails',
+ CheckboxType::class,
+ [
+ 'label' => $this->translator->trans('novalnet.save_account_details'),
+ 'attr' => ['checked' => true]
+ ]
+ );
+ }
+
+ /**
+ * @param OptionsResolver $resolver
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'csrf_protection' => false,
+ 'masked_data' => [],
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getBlockPrefix()
+ {
+ return self::BLOCK_PREFIX;
+ }
+}
diff --git a/Form/Type/SepaSavedAccountDetailsType.php b/Form/Type/SepaSavedAccountDetailsType.php
new file mode 100755
index 0000000..ad465c9
--- /dev/null
+++ b/Form/Type/SepaSavedAccountDetailsType.php
@@ -0,0 +1,74 @@
+translator = $translator;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function buildForm(FormBuilderInterface $builder, array $options)
+ {
+ $choices = [];
+ if (!empty($options['masked_data'])) {
+ foreach ($options['masked_data'] as $key => $value) {
+ $choices[$key]['IBAN ' . $value['iban']] = $value['token'];
+ }
+
+ $label = $this->translator->trans('novalnet.add_new_account_details');
+ $choices[$label] = 'new_account_details';
+
+
+ $builder->add('paymentData', ChoiceType::class, [
+ 'choices' => $choices,
+ 'expanded' => true,
+ 'multiple' => false,
+ 'data' => 'new_account_details'
+ ]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'csrf_protection' => false,
+ 'masked_data' => '',
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getBlockPrefix()
+ {
+ return self::NAME;
+ }
+}
diff --git a/Integration/NovalnetChannelType.php b/Integration/NovalnetChannelType.php
new file mode 100755
index 0000000..90335f9
--- /dev/null
+++ b/Integration/NovalnetChannelType.php
@@ -0,0 +1,30 @@
+doctrine = $doctrine;
+ }
+
+ /**
+ * @param Order $order
+ *
+ * @return string
+ */
+ public function getTransactionDetails(Order $order)
+ {
+ $repository = $this->doctrine->getRepository(NovalnetTransactionDetails::class);
+ $qryBuilder = $repository->createQueryBuilder('nn')
+ ->select('nn')
+ ->where('nn.orderNo = :orderNo')
+ ->setParameter('orderNo', (string) $order->getId());
+ $result = $qryBuilder->getQuery()->getArrayResult();
+ $novalnetTransactionDetails = !empty($result) ? $result[0] : $result;
+ if($novalnetTransactionDetails['additionalInfo']) {
+ $instalmentDetails = json_decode($novalnetTransactionDetails['additionalInfo'], true);
+ if($instalmentDetails['cycle_dates']) {
+ $novalnetTransactionDetails['instalmentDetails'] = $instalmentDetails;
+ }
+ }
+ $novalnetTransactionDetails['customerNotes'] = $order->getCustomerNotes();
+ return $novalnetTransactionDetails;
+ }
+
+}
diff --git a/Migrations/Data/ORM/LoadEmailTemplates.php b/Migrations/Data/ORM/LoadEmailTemplates.php
new file mode 100755
index 0000000..e87c71b
--- /dev/null
+++ b/Migrations/Data/ORM/LoadEmailTemplates.php
@@ -0,0 +1,18 @@
+container
+ ->get('kernel')
+ ->locateResource('@NovalnetBundle/Migrations/Data/ORM/emails');
+ }
+}
diff --git a/Migrations/Data/ORM/emails/payment_confirmation.html.twig b/Migrations/Data/ORM/emails/payment_confirmation.html.twig
new file mode 100755
index 0000000..364a839
--- /dev/null
+++ b/Migrations/Data/ORM/emails/payment_confirmation.html.twig
@@ -0,0 +1,4 @@
+@name = payment_confirmation
+@subject = Test
+
+
Hello
diff --git a/Migrations/Schema/NovalnetBundleInstaller.php b/Migrations/Schema/NovalnetBundleInstaller.php
new file mode 100755
index 0000000..bcab81c
--- /dev/null
+++ b/Migrations/Schema/NovalnetBundleInstaller.php
@@ -0,0 +1,31 @@
+up($schema, $queries);
+ }
+}
diff --git a/Migrations/Schema/v1_0/CreateNovalnetPaymentTables.php b/Migrations/Schema/v1_0/CreateNovalnetPaymentTables.php
new file mode 100755
index 0000000..5cb829a
--- /dev/null
+++ b/Migrations/Schema/v1_0/CreateNovalnetPaymentTables.php
@@ -0,0 +1,844 @@
+updateOroIntegrationTransportTable($schema);
+
+ /** Tables generation **/
+ $this->createNnBanktransferLblTable($schema);
+ $this->createNnBanktransferShLblTable($schema);
+ $this->createNnCashpaymentLblTable($schema);
+ $this->createNnCashpaymentShLblTable($schema);
+ $this->createNnCreditCardLblTable($schema);
+ $this->createNnCreditCardShLblTable($schema);
+ $this->createNnEpsLblTable($schema);
+ $this->createNnEpsShLblTable($schema);
+ $this->createNnGiropayLblTable($schema);
+ $this->createNnGiropayShLblTable($schema);
+ $this->createNnIdealLblTable($schema);
+ $this->createNnIdealShLblTable($schema);
+ $this->createNnInvoiceLblTable($schema);
+ $this->createNnInvoiceShLblTable($schema);
+ $this->createNnPaypalLblTable($schema);
+ $this->createNnPaypalShLblTable($schema);
+ $this->createNnPrepaymentLblTable($schema);
+ $this->createNnPrepaymentShLblTable($schema);
+ $this->createNnPrzelewyLblTable($schema);
+ $this->createNnPrzelewyShLblTable($schema);
+ $this->createNnSepaLblTable($schema);
+ $this->createNnSepaShLblTable($schema);
+ $this->createNnTransactionDetailsTable($schema);
+ $this->createNnCallbackHistoryTable($schema);
+ }
+
+ /**
+ * Update oro_integration_transport table
+ * @param Schema $schema
+ */
+ protected function updateOroIntegrationTransportTable(Schema $schema)
+ {
+ $table = $schema->getTable('oro_integration_transport');
+ $fieldConfiguration = self::getFieldConfiguration();
+ foreach ($fieldConfiguration as $key => $value) {
+ if (!$table->hasColumn($key)) {
+ $table->addColumn($key, $value['type'], $value['options']);
+ }
+ }
+ }
+
+ /**
+ * Create nn_banktransfer_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnBanktransferLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_banktransfer_lbl')) {
+ $table = $schema->createTable('nn_banktransfer_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_47AA7636EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_47AA76369909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_banktransfer_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnBanktransferShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_banktransfer_sh_lbl')) {
+ $table = $schema->createTable('nn_banktransfer_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_986D3D43EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_986D3D439909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_callback_history table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnCallbackHistoryTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_callback_history')) {
+ $table = $schema->createTable('nn_callback_history');
+ $table->addColumn('id', 'integer', ['autoincrement' => true]);
+ $table->addColumn('date', 'datetime', ['notnull' => false, 'comment' => '(DC2Type:datetime)']);
+ $table->addColumn('callback_amount', 'integer', ['notnull' => false, 'length' => 11]);
+ $table->addColumn('order_no', 'string', ['notnull' => false, 'length' => 30]);
+ $table->addColumn('org_tid', 'bigint', ['notnull' => false, 'length' => 20]);
+ $table->addColumn('callback_tid', 'bigint', ['notnull' => false, 'length' => 20]);
+ $table->setPrimaryKey(['id']);
+ }
+ }
+
+ /**
+ * Create nn_cashpayment_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnCashpaymentLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_cashpayment_lbl')) {
+ $table = $schema->createTable('nn_cashpayment_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_77D9E1F3EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_77D9E1F39909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_cashpayment_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnCashpaymentShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_cashpayment_sh_lbl')) {
+ $table = $schema->createTable('nn_cashpayment_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_F8055583EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_F80555839909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_credit_card_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnCreditCardLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_credit_card_lbl')) {
+ $table = $schema->createTable('nn_credit_card_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_6C04E44AEB576E89');
+ $table->addIndex(['transport_id'], 'IDX_6C04E44A9909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_credit_card_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnCreditCardShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_credit_card_sh_lbl')) {
+ $table = $schema->createTable('nn_credit_card_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_B79FCA2BEB576E89');
+ $table->addIndex(['transport_id'], 'IDX_B79FCA2B9909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_eps_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnEpsLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_eps_lbl')) {
+ $table = $schema->createTable('nn_eps_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_99B11A93EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_99B11A939909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_eps_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnEpsShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_eps_sh_lbl')) {
+ $table = $schema->createTable('nn_eps_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_4F34F51EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_4F34F519909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_giropay_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnGiropayLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_giropay_lbl')) {
+ $table = $schema->createTable('nn_giropay_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_B5EAC234EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_B5EAC2349909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_giropay_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnGiropayShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_giropay_sh_lbl')) {
+ $table = $schema->createTable('nn_giropay_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_6D9CC3F3EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_6D9CC3F39909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_ideal_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnIdealLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_ideal_lbl')) {
+ $table = $schema->createTable('nn_ideal_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_D3E2AC2BEB576E89');
+ $table->addIndex(['transport_id'], 'IDX_D3E2AC2B9909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_ideal_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnIdealShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_ideal_sh_lbl')) {
+ $table = $schema->createTable('nn_ideal_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_8F43E9C3EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_8F43E9C39909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_invoice_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnInvoiceLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_invoice_lbl')) {
+ $table = $schema->createTable('nn_invoice_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_4232A1D2EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_4232A1D29909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_invoice_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnInvoiceShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_invoice_sh_lbl')) {
+ $table = $schema->createTable('nn_invoice_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_62B0D94EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_62B0D949909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_paypal_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnPaypalLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_paypal_lbl')) {
+ $table = $schema->createTable('nn_paypal_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_6D640322EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_6D6403229909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_paypal_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnPaypalShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_paypal_sh_lbl')) {
+ $table = $schema->createTable('nn_paypal_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_ADD654C1EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_ADD654C19909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_prepayment_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnPrepaymentLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_prepayment_lbl')) {
+ $table = $schema->createTable('nn_prepayment_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_496DDCECEB576E89');
+ $table->addIndex(['transport_id'], 'IDX_496DDCEC9909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_prepayment_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnPrepaymentShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_prepayment_sh_lbl')) {
+ $table = $schema->createTable('nn_prepayment_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_499B8EDBEB576E89');
+ $table->addIndex(['transport_id'], 'IDX_499B8EDB9909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_przelewy_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnPrzelewyLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_przelewy_lbl')) {
+ $table = $schema->createTable('nn_przelewy_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_19FABD77EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_19FABD779909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_przelewy_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnPrzelewyShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_przelewy_sh_lbl')) {
+ $table = $schema->createTable('nn_przelewy_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_AA50859BEB576E89');
+ $table->addIndex(['transport_id'], 'IDX_AA50859B9909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_sepa_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnSepaLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_sepa_lbl')) {
+ $table = $schema->createTable('nn_sepa_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_9EAD195DEB576E89');
+ $table->addIndex(['transport_id'], 'IDX_9EAD195D9909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_sepa_sh_lbl table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnSepaShLblTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_sepa_sh_lbl')) {
+ $table = $schema->createTable('nn_sepa_sh_lbl');
+ $table->addColumn('transport_id', 'integer', []);
+ $table->addColumn('localized_value_id', 'integer', []);
+ $table->setPrimaryKey(['transport_id', 'localized_value_id']);
+ $table->addUniqueIndex(['localized_value_id'], 'UNIQ_A0EEFB90EB576E89');
+ $table->addIndex(['transport_id'], 'IDX_A0EEFB909909C13F', []);
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_integration_transport'),
+ ['transport_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ $table->addForeignKeyConstraint(
+ $schema->getTable('oro_fallback_localization_val'),
+ ['localized_value_id'],
+ ['id'],
+ ['onDelete' => 'CASCADE', 'onUpdate' => null]
+ );
+ }
+ }
+
+ /**
+ * Create nn_transaction_details table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnTransactionDetailsTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_transaction_details')) {
+ $table = $schema->createTable('nn_transaction_details');
+ $table->addColumn('id', 'integer', ['autoincrement' => true]);
+ $table->addColumn('tid', 'bigint', ['notnull' => false, 'length' => 20]);
+ $table->addColumn('status', 'string', ['notnull' => false, 'length' => 30]);
+ $table->addColumn('test_mode', 'boolean', ['default' => '0']);
+ $table->addColumn('amount', 'integer', ['notnull' => false, 'length' => 11]);
+ $table->addColumn('currency', 'string', ['notnull' => false, 'length' => 5]);
+ $table->addColumn('payment_type', 'string', ['notnull' => false, 'length' => 80]);
+ $table->addColumn('customer_no', 'string', ['notnull' => false, 'length' => 20]);
+ $table->addColumn('order_no', 'string', ['notnull' => false, 'length' => 30]);
+ $table->addColumn('token', 'string', ['notnull' => false]);
+ $table->addColumn('payment_data', 'text', []);
+ $table->addColumn('oneclick', 'boolean', ['default' => '0']);
+ $table->setPrimaryKey(['id']);
+ }
+ }
+
+ protected function getFieldConfiguration()
+ {
+ $fieldConfiguration = [
+ 'nn_vendor_id' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 5]
+ ],
+ 'nn_authcode' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 32]
+ ],
+ 'nn_product' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 5]
+ ],
+ 'nn_tariff' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 5]
+ ],
+ 'nn_access_key' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_referrer_id' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 10]
+ ],
+ 'nn_gateway_timeout' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 5]
+ ],
+ 'nn_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_invoice_duedate' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 2]
+ ],
+ 'nn_sepa_duedate' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 2]
+ ],
+ 'nn_barzahlen_duedate' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 2]
+ ],
+ 'nn_cc_3d' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_onhold_amount' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 11]
+ ],
+ 'nn_callback_testmode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_email_notification' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_email_to' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_email_bcc' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_invoice_guarantee' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false, 'default' => '0']
+ ],
+ 'nn_inv_guarantee_min_amount' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 11]
+ ],
+ 'nn_inv_force_non_guarantee' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false, 'default' => '0']
+ ],
+ 'nn_sepa_guarantee' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false, 'default' => '0']
+ ],
+ 'nn_sepa_guarantee_min_amount' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 11]
+ ],
+ 'nn_sepa_force_non_guarantee' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false, 'default' => '0']
+ ],
+ ];
+ return $fieldConfiguration;
+ }
+}
diff --git a/Migrations/Schema/v2_0/CreateNovalnetPaymentTables.php b/Migrations/Schema/v2_0/CreateNovalnetPaymentTables.php
new file mode 100755
index 0000000..89b7b85
--- /dev/null
+++ b/Migrations/Schema/v2_0/CreateNovalnetPaymentTables.php
@@ -0,0 +1,650 @@
+createNnCallbackHistoryTable($schema);
+ $this->createNnTransactionDetailsTable($schema);
+
+ /** Add column in OroIntegrationTransportTable table **/
+ $this->updateOroIntegrationTransportTable($schema);
+ }
+
+ /**
+ * Update oro_integration_transport table
+ * @param Schema $schema
+ */
+ protected function updateOroIntegrationTransportTable(Schema $schema)
+ {
+ $table = $schema->getTable('oro_integration_transport');
+ $fieldConfiguration = self::getFieldConfiguration();
+ foreach ($fieldConfiguration as $key => $value) {
+ if (!$table->hasColumn($key)) {
+ $table->addColumn($key, $value['type'], $value['options']);
+ }
+ }
+ }
+
+ protected function getFieldConfiguration()
+ {
+ $fieldConfiguration = [
+ 'nn_tariff' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 5]
+ ],
+ 'nn_invoice_duedate' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 2]
+ ],
+ 'nn_sepa_duedate' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 2]
+ ],
+ 'nn_invoice_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_invoice_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_invoice_action' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 15]
+ ],
+ 'nn_prepayment_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_prepayment_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_sepa_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_sepa_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_sepa_action' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 15]
+ ],
+ 'nn_paypal_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_paypal_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_paypal_action' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 15]
+ ],
+ 'nn_banktransfer_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_banktransfer_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_ideal_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_ideal_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_eps_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_eps_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_giropay_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_giropay_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_przelewy_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_przelewy_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_postfinance_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_postfinance_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_postfinancecard_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_postfinancecard_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_multibanco_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_multibanco_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_bancontact_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_bancontact_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_alipay_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_alipay_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_wechatpay_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_wechatpay_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_trustly_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_trustly_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_ob_transfer_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_ob_transfer_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_cashpayment_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_cashpayment_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_cashpayment_duedate' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 2]
+ ],
+ 'nn_invoice_onhold_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_instl_inv_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_instl_inv_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_instl_inv_onhold_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_instl_inv_min_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_instl_inv_action' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 15]
+ ],
+ 'nn_instl_inv_cycle' => [
+ 'type' => 'text',
+ 'options' => ['notnull' => false]
+ ],
+ 'nn_sepa_onhold_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_paypal_onhold_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_instl_sepa_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_instl_sepa_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_instl_sepa_onhold_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_instl_sepa_min_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_instl_sepa_action' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 15]
+ ],
+ 'nn_instl_sepa_duedate' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 2]
+ ],
+ 'nn_instl_sepa_cycle' => [
+ 'type' => 'text',
+ 'options' => ['notnull' => false]
+ ],
+ 'nn_g_sepa_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_g_sepa_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_g_invoice_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_g_invoice_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_g_sepa_action' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 15]
+ ],
+ 'nn_g_sepa_onhold_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_g_sepa_min_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_g_sepa_duedate' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 2]
+ ],
+ 'nn_g_invoice_action' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 15]
+ ],
+ 'nn_g_invoice_onhold_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_g_invoice_min_amnt' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_sepa_oneclick' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false]
+ ],
+ 'nn_instl_sepa_oneclick' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false]
+ ],
+ 'nn_paypal_oneclick' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false]
+ ],
+ 'nn_g_sepa_oneclick' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false]
+ ],
+ 'nn_public_key' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_private_key' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_client_key' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_cc_enforce_3d' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false]
+ ],
+ 'nn_cc_oneclick' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false]
+ ],
+ 'nn_cc_inline_form' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false]
+ ],
+ 'nn_cc_payment_action' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 15]
+ ],
+ 'nn_cc_onhold_amount' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 20]
+ ],
+ 'nn_cc_logo' => [
+ 'type' => 'array',
+ 'options' => ['notnull' => false, 'length' => 255, 'comment' => '(DC2Type:array)']
+ ],
+ 'nn_display_payment_logo' => [
+ 'type' => 'boolean',
+ 'options' => ['notnull' => false]
+ ],
+ 'nn_cc_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_cc_notify' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_cc_input_style' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_cc_label_style' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_cc_container_style' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_prepayment_duedate' => [
+ 'type' => 'integer',
+ 'options' => ['notnull' => false, 'length' => 2]
+ ],
+ 'nn_callback_test_mode' => [
+ 'type' => 'boolean',
+ 'options' => ['default' => '0', 'notnull' => false]
+ ],
+ 'nn_callback_email_to' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 255]
+ ],
+ 'nn_credit_card_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_credit_card_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_sepa_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_sepa_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_invoice_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_invoice_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_instl_invoice_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_instl_invoice_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_instl_sepa_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_instl_sepa_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_prepayment_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_prepayment_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_cashpayment_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_cashpayment_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_paypal_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_paypal_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_banktransfer_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_banktransfer_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_ideal_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_ideal_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_g_sepa_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_g_sepa_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_g_invoice_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_g_invoice_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_eps_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_eps_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_giropay_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_giropay_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_przelewy_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_przelewy_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_postfinance_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_postfinance_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_postfinance_card_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_postfinance_card_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_bancontact_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_bancontact_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_multibanco_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_multibanco_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_alipay_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_alipay_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_wechatpay_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_wechatpay_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_trustly_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_trustly_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_onlinebanktransfer_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ],
+ 'nn_onlinebanktransfer_sh_lbl' => [
+ 'type' => 'string',
+ 'options' => ['notnull' => false, 'length' => 50]
+ ]
+ ];
+ return $fieldConfiguration;
+ }
+
+ /**
+ * Create nn_callback_history table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnCallbackHistoryTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_callback_history')) {
+ $table = $schema->createTable('nn_callback_history');
+ $table->addColumn('id', 'integer', ['autoincrement' => true]);
+ $table->addColumn('date', 'datetime', ['notnull' => false, 'length' => 0, 'comment' => '(DC2Type:datetime)']);
+ $table->addColumn('callback_amount', 'integer', ['notnull' => false, 'length' => 20]);
+ $table->addColumn('order_no', 'string', ['notnull' => false, 'length' => 30]);
+ $table->addColumn('org_tid', 'bigint', ['notnull' => false, 'length' => 20]);
+ $table->addColumn('callback_tid', 'bigint', ['notnull' => false, 'length' => 20]);
+ $table->addColumn('payment_type', 'string', ['notnull' => false, 'length' => 64]);
+ $table->addColumn('event_type', 'string', ['notnull' => false, 'length' => 64]);
+ $table->setPrimaryKey(['id']);
+ }
+ }
+
+
+ /**
+ * Create nn_transaction_details table
+ *
+ * @param Schema $schema
+ */
+ protected function createNnTransactionDetailsTable(Schema $schema)
+ {
+ if (!$schema->hasTable('nn_transaction_details')) {
+ $table = $schema->createTable('nn_transaction_details');
+ $table->addColumn('id', 'integer', ['autoincrement' => true]);
+ $table->addColumn('tid', 'bigint', ['notnull' => false, 'length' => 20]);
+ $table->addColumn('status', 'string', ['notnull' => false, 'length' => 30]);
+ $table->addColumn('test_mode', 'boolean', ['default' => '0']);
+ $table->addColumn('amount', 'integer', ['notnull' => false, 'length' => 30]);
+ $table->addColumn('currency', 'string', ['notnull' => false, 'length' => 5]);
+ $table->addColumn('payment_type', 'string', ['notnull' => false, 'length' => 80]);
+ $table->addColumn('customer_no', 'string', ['notnull' => false, 'length' => 20]);
+ $table->addColumn('order_no', 'string', ['notnull' => false, 'length' => 30]);
+ $table->addColumn('token', 'string', ['notnull' => false, 'length' => 255]);
+ $table->addColumn('payment_data', 'text', ['notnull' => false, 'length' => 0]);
+ $table->addColumn('oneclick', 'boolean', ['default' => '0']);
+ $table->addColumn('additional_info', 'text', ['notnull' => false]);
+ $table->addColumn('refunded_amount', 'integer', ['default' => '0', 'length' => 30]);
+ $table->setPrimaryKey(['id']);
+ }
+ }
+
+}
diff --git a/NovalnetBundle.php b/NovalnetBundle.php
new file mode 100755
index 0000000..17db2d2
--- /dev/null
+++ b/NovalnetBundle.php
@@ -0,0 +1,24 @@
+extension) {
+ $this->extension = new NovalnetExtension();
+ }
+
+ return $this->extension;
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetAlipayConfigFactory.php b/PaymentMethod/Config/Factory/NovalnetAlipayConfigFactory.php
new file mode 100755
index 0000000..82d8dcc
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetAlipayConfigFactory.php
@@ -0,0 +1,38 @@
+getChannel();
+ $params = [
+ NovalnetAlipayConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetAlipayConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetAlipayConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetAlipayConfig::FIELD_LABEL => $settings->getAlipayLabel(),
+ NovalnetAlipayConfig::FIELD_SHORT_LABEL => $settings->getAlipayShortLabel(),
+ NovalnetAlipayConfig::TARIFF => $settings->getTariff(),
+ NovalnetAlipayConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetAlipayConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetAlipayConfig::ALIPAY_TESTMODE => $settings->getAlipayTestMode(),
+ NovalnetAlipayConfig::ALIPAY_NOTIFICATION => $settings->getAlipayBuyerNotification(),
+ NovalnetAlipayConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetAlipayConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetAlipayConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetAlipayConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetAlipayConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetAlipayConfigFactoryInterface.php
new file mode 100755
index 0000000..84d8156
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetAlipayConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetBancontactConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetBancontactConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetBancontactConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetBancontactConfig::FIELD_LABEL => $settings->getBancontactLabel(),
+ NovalnetBancontactConfig::FIELD_SHORT_LABEL => $settings->getBancontactShortLabel(),
+ NovalnetBancontactConfig::TARIFF => $settings->getTariff(),
+ NovalnetBancontactConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetBancontactConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetBancontactConfig::BANCONTACT_TESTMODE => $settings->getBancontactTestMode(),
+ NovalnetBancontactConfig::BANCONTACT_NOTIFICATION => $settings->getBancontactBuyerNotification(),
+ NovalnetBancontactConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetBancontactConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetBancontactConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+
+ ];
+
+ return new NovalnetBancontactConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetBancontactConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetBancontactConfigFactoryInterface.php
new file mode 100755
index 0000000..2955ed7
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetBancontactConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetBanktransferConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetBanktransferConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetBanktransferConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetBanktransferConfig::FIELD_LABEL => $settings->getBanktransferLabel(),
+ NovalnetBanktransferConfig::FIELD_SHORT_LABEL =>
+ $settings->getBanktransferShortLabel(),
+ NovalnetBanktransferConfig::TARIFF => $settings->getTariff(),
+ NovalnetBanktransferConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetBanktransferConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetBanktransferConfig::BANKTRANSFER_TESTMODE => $settings->getBanktransferTestMode(),
+ NovalnetBanktransferConfig::BANKTRANSFER_NOTIFICATION => $settings->getBanktransferBuyerNotification(),
+ NovalnetBanktransferConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetBanktransferConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetBanktransferConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetBanktransferConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetBanktransferConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetBanktransferConfigFactoryInterface.php
new file mode 100755
index 0000000..412807a
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetBanktransferConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+
+ $params = [
+ NovalnetCashpaymentConfig::FIELD_PAYMENT_METHOD_IDENTIFIER =>
+ $this->getPaymentMethodIdentifier($channel),
+ NovalnetCashpaymentConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetCashpaymentConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetCashpaymentConfig::FIELD_LABEL => $settings->getCashpaymentLabel(),
+ NovalnetCashpaymentConfig::FIELD_SHORT_LABEL =>
+ $settings->getCashpaymentShortLabel(),
+ NovalnetCashpaymentConfig::TARIFF => $settings->getTariff(),
+ NovalnetCashpaymentConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetCashpaymentConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetCashpaymentConfig::CASHPAYMENT_TESTMODE => $settings->getCashpaymentTestMode(),
+ NovalnetCashpaymentConfig::CASHPAYMENT_DUEDATE => $settings->getCashpaymentDuedate(),
+ NovalnetCashpaymentConfig::CASHPAYMENT_NOTIFICATION => $settings->getCashpaymentBuyerNotification(),
+ NovalnetCashpaymentConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetCashpaymentConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetCashpaymentConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetCashpaymentConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetCashpaymentConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetCashpaymentConfigFactoryInterface.php
new file mode 100755
index 0000000..1e12a6c
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetCashpaymentConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+identifierGenerator = $identifierGenerator;
+ }
+
+
+ public function getPaymentMethodIdentifier(Channel $channel)
+ {
+ return (string)$this->identifierGenerator->generateIdentifier($channel);
+ }
+
+ /**
+ * @param Channel $channel
+ * @param string $suffix
+ *
+ * @return string
+ */
+ protected function getAdminLabel(Channel $channel, $suffix)
+ {
+ return sprintf('%s - %s', $channel->getName(), $suffix);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetConfigFactoryInterface.php
new file mode 100755
index 0000000..5298736
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetConfigFactoryInterface.php
@@ -0,0 +1,19 @@
+getChannel();
+ $params = [
+ NovalnetCreditCardConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetCreditCardConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetCreditCardConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetCreditCardConfig::FIELD_LABEL => $settings->getCreditCardLabel(),
+ NovalnetCreditCardConfig::FIELD_SHORT_LABEL => $settings->getCreditCardShortLabel(),
+ NovalnetCreditCardConfig::TARIFF => $settings->getTariff(),
+ NovalnetCreditCardConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetCreditCardConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetCreditCardConfig::CREDITCARD_TESTMODE => $settings->getCreditCardTestMode(),
+ NovalnetCreditCardConfig::CREDITCARD_ONHOLD_AMOUNT => $settings->getCreditCardOnholdAmount(),
+ NovalnetCreditCardConfig::CREDITCARD_PAYMENT_ACTION => $settings->getCreditCardPaymentAction(),
+ NovalnetCreditCardConfig::CREDITCARD_NOTIFICATION => $settings->getCreditcardBuyerNotification(),
+ NovalnetCreditCardConfig::CREDITCARD_INLINE_FORM => $settings->getCreditCardInlineForm(),
+ NovalnetCreditCardConfig::CREDITCARD_INPUT_STYLE => $settings->getCreditCardInputStyle(),
+ NovalnetCreditCardConfig::CREDITCARD_LABEL_STYLE => $settings->getCreditCardLabelStyle(),
+ NovalnetCreditCardConfig::CREDITCARD_CONTAINER_STYLE => $settings->getCreditCardContainerStyle(),
+ NovalnetCreditCardConfig::CREDITCARD_ENFORCE_3D => $settings->getCreditCardEnforce3d(),
+ NovalnetCreditCardConfig::CREDITCARD_ONECLICK => $settings->getCreditCardOneclick(),
+ NovalnetCreditCardConfig::CREDITCARD_CLIENT_KEY => $settings->getClientKey(),
+ NovalnetCreditCardConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetCreditCardConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetCreditCardConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ NovalnetCreditCardConfig::CREDITCARD_LOGO => $settings->getCreditCardLogo(),
+ ];
+
+
+ return new NovalnetCreditCardConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetCreditCardConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetCreditCardConfigFactoryInterface.php
new file mode 100755
index 0000000..ee88bad
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetCreditCardConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetEpsConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetEpsConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetEpsConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetEpsConfig::FIELD_LABEL => $settings->getEpsLabel(),
+ NovalnetEpsConfig::FIELD_SHORT_LABEL => $settings->getEpsShortLabel(),
+ NovalnetEpsConfig::TARIFF => $settings->getTariff(),
+ NovalnetEpsConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetEpsConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetEpsConfig::EPS_TESTMODE => $settings->getEpsTestMode(),
+ NovalnetEpsConfig::EPS_NOTIFICATION => $settings->getEpsBuyerNotification(),
+ NovalnetEpsConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetEpsConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetEpsConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+
+ return new NovalnetEpsConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetEpsConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetEpsConfigFactoryInterface.php
new file mode 100755
index 0000000..30801b3
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetEpsConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetGiropayConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetGiropayConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetGiropayConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetGiropayConfig::FIELD_LABEL => $settings->getGiropayLabel(),
+ NovalnetGiropayConfig::FIELD_SHORT_LABEL => $settings->getGiropayShortLabel(),
+ NovalnetGiropayConfig::TARIFF => $settings->getTariff(),
+ NovalnetGiropayConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetGiropayConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetGiropayConfig::GIROPAY_TESTMODE => $settings->getGiropayTestMode(),
+ NovalnetGiropayConfig::GIROPAY_NOTIFICATION => $settings->getGiropayBuyerNotification(),
+ NovalnetGiropayConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetGiropayConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetGiropayConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetGiropayConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetGiropayConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetGiropayConfigFactoryInterface.php
new file mode 100755
index 0000000..e591f56
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetGiropayConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetGuaranteedInvoiceConfig::FIELD_PAYMENT_METHOD_IDENTIFIER =>
+ $this->getPaymentMethodIdentifier($channel),
+ NovalnetGuaranteedInvoiceConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetGuaranteedInvoiceConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetGuaranteedInvoiceConfig::FIELD_LABEL => $settings->getGuaranteedInvoiceLabel(),
+ NovalnetGuaranteedInvoiceConfig::FIELD_SHORT_LABEL => $settings->getGuaranteedInvoiceShortLabel(),
+ NovalnetGuaranteedInvoiceConfig::TARIFF => $settings->getTariff(),
+ NovalnetGuaranteedInvoiceConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetGuaranteedInvoiceConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetGuaranteedInvoiceConfig::GUARANTEED_INVOICE_TESTMODE => $settings->getGuaranteedInvoiceTestMode(),
+ NovalnetGuaranteedInvoiceConfig::GUARANTEED_INVOICE_NOTIFICATION =>
+ $settings->getGuaranteedInvoiceBuyerNotification(),
+ NovalnetGuaranteedInvoiceConfig::GUARANTEED_INVOICE_ONHOLD_AMOUNT =>
+ $settings->getGuaranteedInvoiceOnholdAmount(),
+ NovalnetGuaranteedInvoiceConfig::GUARANTEED_INVOICE_PAYMENT_ACTION =>
+ $settings->getGuaranteedInvoicePaymentAction(),
+ NovalnetGuaranteedInvoiceConfig::GUARANTEED_INVOICE_MIN_AMOUNT => $settings->getGuaranteedInvoiceMinAmount(),
+ NovalnetGuaranteedInvoiceConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetGuaranteedInvoiceConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetGuaranteedInvoiceConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetGuaranteedInvoiceConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetGuaranteedInvoiceConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetGuaranteedInvoiceConfigFactoryInterface.php
new file mode 100755
index 0000000..aef9e47
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetGuaranteedInvoiceConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetGuaranteedSepaConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetGuaranteedSepaConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetGuaranteedSepaConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetGuaranteedSepaConfig::FIELD_LABEL => $settings->getGuaranteedSepaLabel(),
+ NovalnetGuaranteedSepaConfig::FIELD_SHORT_LABEL => $settings->getGuaranteedSepaShortLabel(),
+ NovalnetGuaranteedSepaConfig::TARIFF => $settings->getTariff(),
+ NovalnetGuaranteedSepaConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetGuaranteedSepaConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetGuaranteedSepaConfig::GUARANTEED_SEPA_TESTMODE => $settings->getGuaranteedSepaTestMode(),
+ NovalnetGuaranteedSepaConfig::GUARANTEED_SEPA_NOTIFICATION
+ => $settings->getGuaranteedSepaBuyerNotification(),
+ NovalnetGuaranteedSepaConfig::GUARANTEED_SEPA_DUEDATE => $settings->getGuaranteedSepaDuedate(),
+ NovalnetGuaranteedSepaConfig::GUARANTEED_SEPA_PAYMENT_ACTION => $settings->getGuaranteedSepaPaymentAction(),
+ NovalnetGuaranteedSepaConfig::GUARANTEED_SEPA_ONHOLD_AMOUNT => $settings->getGuaranteedSepaOnholdAmount(),
+ NovalnetGuaranteedSepaConfig::GUARANTEED_SEPA_MIN_AMOUNT => $settings->getGuaranteedSepaMinAmount(),
+ NovalnetGuaranteedSepaConfig::GUARANTEED_SEPA_ONECLICK => $settings->getGuaranteedSepaOneclick(),
+ NovalnetGuaranteedSepaConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetGuaranteedSepaConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetGuaranteedSepaConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetGuaranteedSepaConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetGuaranteedSepaConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetGuaranteedSepaConfigFactoryInterface.php
new file mode 100755
index 0000000..66c7278
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetGuaranteedSepaConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetIdealConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetIdealConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetIdealConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetIdealConfig::FIELD_LABEL => $settings->getIdealLabel(),
+ NovalnetIdealConfig::FIELD_SHORT_LABEL => $settings->getIdealShortLabel(),
+ NovalnetIdealConfig::TARIFF => $settings->getTariff(),
+ NovalnetIdealConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetIdealConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetIdealConfig::IDEAL_TESTMODE => $settings->getIdealTestMode(),
+ NovalnetIdealConfig::IDEAL_NOTIFICATION => $settings->getIdealBuyerNotification(),
+ NovalnetIdealConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetIdealConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetIdealConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetIdealConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetIdealConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetIdealConfigFactoryInterface.php
new file mode 100755
index 0000000..ef752ec
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetIdealConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetInstalmentInvoiceConfig::FIELD_PAYMENT_METHOD_IDENTIFIER =>
+ $this->getPaymentMethodIdentifier($channel),
+ NovalnetInstalmentInvoiceConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetInstalmentInvoiceConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetInstalmentInvoiceConfig::FIELD_LABEL => $settings->getInstalmentInvoiceLabel(),
+ NovalnetInstalmentInvoiceConfig::FIELD_SHORT_LABEL => $settings->getInstalmentInvoiceShortLabel(),
+ NovalnetInstalmentInvoiceConfig::TARIFF => $settings->getTariff(),
+ NovalnetInstalmentInvoiceConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetInstalmentInvoiceConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetInstalmentInvoiceConfig::INSTALMENT_INVOICE_TESTMODE => $settings->getInstalmentInvoiceTestMode(),
+ NovalnetInstalmentInvoiceConfig::INSTALMENT_INVOICE_MIN_AMOUNT => $settings->getInstalmentInvoiceMinAmount(),
+ NovalnetInstalmentInvoiceConfig::INSTALMENT_INVOICE_PAYMENT_ACTION
+ => $settings->getInstalmentInvoicePaymentAction(),
+ NovalnetInstalmentInvoiceConfig::INSTALMENT_INVOICE_ONHOLD_AMOUNT
+ => $settings->getInstalmentInvoiceOnholdAmount(),
+ NovalnetInstalmentInvoiceConfig::INSTALMENT_INVOICE_CYCLE => $settings->getInstalmentInvoiceCycle(),
+ NovalnetInstalmentInvoiceConfig::INSTALMENT_INVOICE_NOTIFICATION
+ => $settings->getInstalmentInvoiceBuyerNotification(),
+ NovalnetInstalmentInvoiceConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetInstalmentInvoiceConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetInstalmentInvoiceConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetInstalmentInvoiceConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetInstalmentInvoiceConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetInstalmentInvoiceConfigFactoryInterface.php
new file mode 100755
index 0000000..3df5f7a
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetInstalmentInvoiceConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetInstalmentSepaConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetInstalmentSepaConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetInstalmentSepaConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetInstalmentSepaConfig::FIELD_LABEL => $settings->getInstalmentSepaLabel(),
+ NovalnetInstalmentSepaConfig::FIELD_SHORT_LABEL => $settings->getInstalmentSepaShortLabel(),
+ NovalnetInstalmentSepaConfig::TARIFF => $settings->getTariff(),
+ NovalnetInstalmentSepaConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetInstalmentSepaConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetInstalmentSepaConfig::INSTALMENT_SEPA_TESTMODE => $settings->getInstalmentSepaTestMode(),
+ NovalnetInstalmentSepaConfig::INSTALMENT_SEPA_DUEDATE => $settings->getInstalmentSepaDuedate(),
+ NovalnetInstalmentSepaConfig::INSTALMENT_SEPA_MIN_AMOUNT => $settings->getInstalmentSepaMinAmount(),
+ NovalnetInstalmentSepaConfig::INSTALMENT_SEPA_PAYMENT_ACTION => $settings->getInstalmentSepaPaymentAction(),
+ NovalnetInstalmentSepaConfig::INSTALMENT_SEPA_ONHOLD_AMOUNT => $settings->getInstalmentSepaOnholdAmount(),
+ NovalnetInstalmentSepaConfig::INSTALMENT_SEPA_CYCLE => $settings->getInstalmentSepaCycle(),
+ NovalnetInstalmentSepaConfig::INSTALMENT_SEPA_NOTIFICATION
+ => $settings->getInstalmentSepaBuyerNotification(),
+ NovalnetInstalmentSepaConfig::INSTALMENT_SEPA_ONECLICK => $settings->getInstalmentSepaOneclick(),
+ NovalnetInstalmentSepaConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetInstalmentSepaConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetInstalmentSepaConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetInstalmentSepaConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetInstalmentSepaConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetInstalmentSepaConfigFactoryInterface.php
new file mode 100755
index 0000000..0cd762e
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetInstalmentSepaConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetInvoiceConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetInvoiceConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetInvoiceConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetInvoiceConfig::FIELD_LABEL => $settings->getInvoiceLabel(),
+ NovalnetInvoiceConfig::FIELD_SHORT_LABEL => $settings->getInvoiceShortLabel(),
+ NovalnetInvoiceConfig::TARIFF => $settings->getTariff(),
+ NovalnetInvoiceConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetInvoiceConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetInvoiceConfig::INVOICE_TESTMODE => $settings->getInvoiceTestMode(),
+ NovalnetInvoiceConfig::INVOICE_DUEDATE => $settings->getInvoiceDuedate(),
+ NovalnetInvoiceConfig::INVOICE_PAYMENT_ACTION => $settings->getInvoicePaymentAction(),
+ NovalnetInvoiceConfig::INVOICE_ONHOLD_AMOUNT => $settings->getInvoiceOnholdAmount(),
+ NovalnetInvoiceConfig::INVOICE_NOTIFICATION => $settings->getInvoiceBuyerNotification(),
+ NovalnetInvoiceConfig::GUARANTEED_INVOICE_MIN_AMOUNT => $settings->getGuaranteedInvoiceMinAmount(),
+ NovalnetInvoiceConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetInvoiceConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetInvoiceConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetInvoiceConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetInvoiceConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetInvoiceConfigFactoryInterface.php
new file mode 100755
index 0000000..04e2d56
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetInvoiceConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetMultibancoConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetMultibancoConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetMultibancoConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetMultibancoConfig::FIELD_LABEL => $settings->getMultibancoLabel(),
+ NovalnetMultibancoConfig::FIELD_SHORT_LABEL => $settings->getMultibancoShortLabel(),
+ NovalnetMultibancoConfig::TARIFF => $settings->getTariff(),
+ NovalnetMultibancoConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetMultibancoConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetMultibancoConfig::MULTIBANCO_TESTMODE => $settings->getMultibancoTestMode(),
+ NovalnetMultibancoConfig::MULTIBANCO_NOTIFICATION => $settings->getMultibancoBuyerNotification(),
+ NovalnetMultibancoConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetMultibancoConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetMultibancoConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetMultibancoConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetMultibancoConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetMultibancoConfigFactoryInterface.php
new file mode 100755
index 0000000..0e9e8ee
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetMultibancoConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetOnlinebanktransferConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetOnlinebanktransferConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetOnlinebanktransferConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetOnlinebanktransferConfig::FIELD_LABEL => $settings->getOnlinebanktransferLabel(),
+ NovalnetOnlinebanktransferConfig::FIELD_SHORT_LABEL => $settings->getOnlinebanktransferShortLabel(),
+ NovalnetOnlinebanktransferConfig::TARIFF => $settings->getTariff(),
+ NovalnetOnlinebanktransferConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetOnlinebanktransferConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetOnlinebanktransferConfig::ONLINEBANKTRANSFER_TESTMODE => $settings->getOnlinebanktransferTestMode(),
+ NovalnetOnlinebanktransferConfig::ONLINEBANKTRANSFER_NOTIFICATION => $settings->getOnlinebanktransferBuyerNotification(),
+ NovalnetOnlinebanktransferConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetOnlinebanktransferConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetOnlinebanktransferConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetOnlinebanktransferConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetOnlinebanktransferConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetOnlinebanktransferConfigFactoryInterface.php
new file mode 100755
index 0000000..71386a8
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetOnlinebanktransferConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetPaypalConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetPaypalConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetPaypalConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetPaypalConfig::FIELD_LABEL => $settings->getPaypalLabel(),
+ NovalnetPaypalConfig::FIELD_SHORT_LABEL => $settings->getPaypalShortLabel(),
+ NovalnetPaypalConfig::TARIFF => $settings->getTariff(),
+ NovalnetPaypalConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetPaypalConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetPaypalConfig::PAYPAL_TESTMODE => $settings->getPaypalTestMode(),
+ NovalnetPaypalConfig::PAYPAL_ONHOLD_AMOUNT => $settings->getPaypalOnholdAmount(),
+ NovalnetPaypalConfig::PAYPAL_PAYMENT_ACTION => $settings->getPaypalPaymentAction(),
+ NovalnetPaypalConfig::PAYPAL_NOTIFICATION => $settings->getPaypalBuyerNotification(),
+ NovalnetPaypalConfig::PAYPAL_ONECLICK => $settings->getPaypalOneclick(),
+ NovalnetPaypalConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetPaypalConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetPaypalConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetPaypalConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetPaypalConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetPaypalConfigFactoryInterface.php
new file mode 100755
index 0000000..83ae3cd
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetPaypalConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetPostfinanceCardConfig::FIELD_PAYMENT_METHOD_IDENTIFIER =>
+ $this->getPaymentMethodIdentifier($channel),
+ NovalnetPostfinanceCardConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetPostfinanceCardConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetPostfinanceCardConfig::FIELD_LABEL => $settings->getPostfinanceCardLabel(),
+ NovalnetPostfinanceCardConfig::FIELD_SHORT_LABEL => $settings->getPostfinanceCardShortLabel(),
+ NovalnetPostfinanceCardConfig::TARIFF => $settings->getTariff(),
+ NovalnetPostfinanceCardConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetPostfinanceCardConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetPostfinanceCardConfig::POSTFINANCECARD_TESTMODE => $settings->getPostfinanceCardTestMode(),
+ NovalnetPostfinanceCardConfig::POSTFINANCECARD_NOTIFICATION
+ => $settings->getPostfinanceCardBuyerNotification(),
+ NovalnetPostfinanceCardConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetPostfinanceCardConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetPostfinanceCardConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetPostfinanceCardConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetPostfinanceCardConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetPostfinanceCardConfigFactoryInterface.php
new file mode 100755
index 0000000..342c895
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetPostfinanceCardConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetPostfinanceConfig::FIELD_PAYMENT_METHOD_IDENTIFIER =>
+ $this->getPaymentMethodIdentifier($channel),
+ NovalnetPostfinanceConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetPostfinanceConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetPostfinanceConfig::FIELD_LABEL => $settings->getPostfinanceLabel(),
+ NovalnetPostfinanceConfig::FIELD_SHORT_LABEL => $settings->getPostfinanceShortLabel(),
+ NovalnetPostfinanceConfig::TARIFF => $settings->getTariff(),
+ NovalnetPostfinanceConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetPostfinanceConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetPostfinanceConfig::POSTFINANCE_TESTMODE => $settings->getPostfinanceTestMode(),
+ NovalnetPostfinanceConfig::POSTFINANCE_NOTIFICATION =>
+ $settings->getPostfinanceBuyerNotification(),
+ NovalnetPostfinanceConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetPostfinanceConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetPostfinanceConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetPostfinanceConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetPostfinanceConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetPostfinanceConfigFactoryInterface.php
new file mode 100755
index 0000000..18de1aa
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetPostfinanceConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetPrepaymentConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetPrepaymentConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetPrepaymentConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetPrepaymentConfig::FIELD_LABEL => $settings->getPrepaymentLabel(),
+ NovalnetPrepaymentConfig::FIELD_SHORT_LABEL =>
+ $settings->getPrepaymentShortLabel(),
+ NovalnetPrepaymentConfig::TARIFF => $settings->getTariff(),
+ NovalnetPrepaymentConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetPrepaymentConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetPrepaymentConfig::PREPAYMENT_TESTMODE => $settings->getPrepaymentTestMode(),
+ NovalnetPrepaymentConfig::PREPAYMENT_NOTIFICATION => $settings->getPrepaymentBuyerNotification(),
+ NovalnetPrepaymentConfig::PREPAYMENT_DUEDATE => $settings->getPrepaymentDuedate(),
+ NovalnetPrepaymentConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetPrepaymentConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetPrepaymentConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetPrepaymentConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetPrepaymentConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetPrepaymentConfigFactoryInterface.php
new file mode 100755
index 0000000..fdc63c4
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetPrepaymentConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetPrzelewyConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetPrzelewyConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetPrzelewyConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetPrzelewyConfig::FIELD_LABEL => $settings->getPrzelewyLabel(),
+ NovalnetPrzelewyConfig::FIELD_SHORT_LABEL => $settings->getPrzelewyShortLabel(),
+ NovalnetPrzelewyConfig::TARIFF => $settings->getTariff(),
+ NovalnetPrzelewyConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetPrzelewyConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetPrzelewyConfig::PRZELEWY_TESTMODE => $settings->getPrzelewyTestMode(),
+ NovalnetPrzelewyConfig::PRZELEWY_NOTIFICATION => $settings->getPrzelewyBuyerNotification(),
+ NovalnetPrzelewyConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetPrzelewyConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetPrzelewyConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+
+ ];
+
+ return new NovalnetPrzelewyConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetPrzelewyConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetPrzelewyConfigFactoryInterface.php
new file mode 100755
index 0000000..1607d6e
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetPrzelewyConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetSepaConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetSepaConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetSepaConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetSepaConfig::FIELD_LABEL => $settings->getSepaLabel(),
+ NovalnetSepaConfig::FIELD_SHORT_LABEL => $settings->getSepaShortLabel(),
+ NovalnetSepaConfig::TARIFF => $settings->getTariff(),
+ NovalnetSepaConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetSepaConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetSepaConfig::SEPA_TESTMODE => $settings->getSepaTestMode(),
+ NovalnetSepaConfig::SEPA_DUEDATE => $settings->getSepaDuedate(),
+ NovalnetSepaConfig::SEPA_ONHOLD_AMOUNT => $settings->getSepaOnholdAmount(),
+ NovalnetSepaConfig::SEPA_PAYMENT_ACTION => $settings->getSepaPaymentAction(),
+ NovalnetSepaConfig::SEPA_NOTIFICATION => $settings->getSepaBuyerNotification(),
+ NovalnetSepaConfig::GUARANTEED_SEPA_MIN_AMOUNT => $settings->getGuaranteedSepaMinAmount(),
+ NovalnetSepaConfig::SEPA_ONECLICK => $settings->getSepaOneclick(),
+ NovalnetSepaConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetSepaConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetSepaConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetSepaConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetSepaConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetSepaConfigFactoryInterface.php
new file mode 100755
index 0000000..6997817
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetSepaConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetTrustlyConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetTrustlyConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetTrustlyConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetTrustlyConfig::FIELD_LABEL => $settings->getTrustlyLabel(),
+ NovalnetTrustlyConfig::FIELD_SHORT_LABEL => $settings->getTrustlyShortLabel(),
+ NovalnetTrustlyConfig::TARIFF => $settings->getTariff(),
+ NovalnetTrustlyConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetTrustlyConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetTrustlyConfig::TRUSTLY_TESTMODE => $settings->getTrustlyTestMode(),
+ NovalnetTrustlyConfig::TRUSTLY_NOTIFICATION => $settings->getTrustlyBuyerNotification(),
+ NovalnetTrustlyConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetTrustlyConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetTrustlyConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetTrustlyConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetTrustlyConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetTrustlyConfigFactoryInterface.php
new file mode 100755
index 0000000..3761269
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetTrustlyConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+getChannel();
+ $params = [
+ NovalnetWechatpayConfig::FIELD_PAYMENT_METHOD_IDENTIFIER => $this->getPaymentMethodIdentifier($channel),
+ NovalnetWechatpayConfig::FIELD_ADMIN_LABEL =>
+ $this->getAdminLabel($channel, NovalnetWechatpayConfig::ADMIN_LABEL_SUFFIX),
+ NovalnetWechatpayConfig::FIELD_LABEL => $settings->getWechatpayLabel(),
+ NovalnetWechatpayConfig::FIELD_SHORT_LABEL => $settings->getWechatpayShortLabel(),
+ NovalnetWechatpayConfig::TARIFF => $settings->getTariff(),
+ NovalnetWechatpayConfig::PRODUCT_ACTIVATION_KEY => $settings->getProductActivationKey(),
+ NovalnetWechatpayConfig::PAYMENT_ACCESS_KEY => $settings->getPaymentAccessKey(),
+ NovalnetWechatpayConfig::WECHATPAY_TESTMODE => $settings->getWechatpayTestMode(),
+ NovalnetWechatpayConfig::WECHATPAY_NOTIFICATION => $settings->getWechatpayBuyerNotification(),
+ NovalnetWechatpayConfig::CALLBACK_TESTMODE => $settings->getCallbackTestMode(),
+ NovalnetWechatpayConfig::CALLBACK_EMAILTO => $settings->getCallbackEmailTo(),
+ NovalnetWechatpayConfig::DISPLAY_PAYMENT_LOGO => $settings->getDisplayPaymentLogo(),
+ ];
+
+ return new NovalnetWechatpayConfig($params);
+ }
+}
diff --git a/PaymentMethod/Config/Factory/NovalnetWechatpayConfigFactoryInterface.php b/PaymentMethod/Config/Factory/NovalnetWechatpayConfigFactoryInterface.php
new file mode 100755
index 0000000..fc2d70d
--- /dev/null
+++ b/PaymentMethod/Config/Factory/NovalnetWechatpayConfigFactoryInterface.php
@@ -0,0 +1,12 @@
+get(self::ALIPAY_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::ALIPAY_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetAlipayConfigInterface.php b/PaymentMethod/Config/NovalnetAlipayConfigInterface.php
new file mode 100755
index 0000000..b56eeb0
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetAlipayConfigInterface.php
@@ -0,0 +1,19 @@
+get(self::BANCONTACT_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::BANCONTACT_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetBancontactConfigInterface.php b/PaymentMethod/Config/NovalnetBancontactConfigInterface.php
new file mode 100755
index 0000000..6925dc0
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetBancontactConfigInterface.php
@@ -0,0 +1,19 @@
+get(self::BANKTRANSFER_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::BANKTRANSFER_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetBanktransferConfigInterface.php b/PaymentMethod/Config/NovalnetBanktransferConfigInterface.php
new file mode 100755
index 0000000..c120817
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetBanktransferConfigInterface.php
@@ -0,0 +1,20 @@
+get(self::CASHPAYMENT_DUEDATE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getTestMode()
+ {
+ return (int)$this->get(self::CASHPAYMENT_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::CASHPAYMENT_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetCashpaymentConfigInterface.php b/PaymentMethod/Config/NovalnetCashpaymentConfigInterface.php
new file mode 100755
index 0000000..369c39c
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetCashpaymentConfigInterface.php
@@ -0,0 +1,25 @@
+get(self::TARIFF);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentAccessKey()
+ {
+ return (string)$this->get(self::PAYMENT_ACCESS_KEY);
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getProductActivationKey()
+ {
+ return (string)$this->get(self::PRODUCT_ACTIVATION_KEY);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getCallbackTestMode()
+ {
+ return (int)$this->get(self::CALLBACK_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getCallbackEmailTo()
+ {
+ return (string)$this->get(self::CALLBACK_EMAILTO);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getDisplayPaymentLogo()
+ {
+ return (int)$this->get(self::DISPLAY_PAYMENT_LOGO);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetConfigInterface.php b/PaymentMethod/Config/NovalnetConfigInterface.php
new file mode 100755
index 0000000..baf8f8e
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetConfigInterface.php
@@ -0,0 +1,36 @@
+get(self::CREDITCARD_ENFORCE_3D);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOnholdAmount()
+ {
+ return (int)$this->get(self::CREDITCARD_ONHOLD_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getTestMode()
+ {
+ return (int)$this->get(self::CREDITCARD_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentAction()
+ {
+ return (string)$this->get(self::CREDITCARD_PAYMENT_ACTION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::CREDITCARD_NOTIFICATION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getInlineForm()
+ {
+ return (int)$this->get(self::CREDITCARD_INLINE_FORM);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getInputStyle()
+ {
+ return (string)$this->get(self::CREDITCARD_INPUT_STYLE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getContainerStyle()
+ {
+ return (string)$this->get(self::CREDITCARD_CONTAINER_STYLE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getLabelStyle()
+ {
+ return (string)$this->get(self::CREDITCARD_LABEL_STYLE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOneclick()
+ {
+ return (int)$this->get(self::CREDITCARD_ONECLICK);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClientKey()
+ {
+ return (string)$this->get(self::CREDITCARD_CLIENT_KEY);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getCreditCardLogo()
+ {
+ return (array)$this->get(self::CREDITCARD_LOGO);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetCreditCardConfigInterface.php b/PaymentMethod/Config/NovalnetCreditCardConfigInterface.php
new file mode 100755
index 0000000..442d668
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetCreditCardConfigInterface.php
@@ -0,0 +1,70 @@
+get(self::EPS_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::EPS_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetEpsConfigInterface.php b/PaymentMethod/Config/NovalnetEpsConfigInterface.php
new file mode 100755
index 0000000..7177096
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetEpsConfigInterface.php
@@ -0,0 +1,19 @@
+get(self::GIROPAY_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::GIROPAY_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetGiropayConfigInterface.php b/PaymentMethod/Config/NovalnetGiropayConfigInterface.php
new file mode 100755
index 0000000..efb9af2
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetGiropayConfigInterface.php
@@ -0,0 +1,19 @@
+get(self::GUARANTEED_INVOICE_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::GUARANTEED_INVOICE_NOTIFICATION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOnholdAmount()
+ {
+ return (int)$this->get(self::GUARANTEED_INVOICE_ONHOLD_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentAction()
+ {
+ return (string)$this->get(self::GUARANTEED_INVOICE_PAYMENT_ACTION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMinAmount()
+ {
+ return (int)$this->get(self::GUARANTEED_INVOICE_MIN_AMOUNT);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetGuaranteedInvoiceConfigInterface.php b/PaymentMethod/Config/NovalnetGuaranteedInvoiceConfigInterface.php
new file mode 100755
index 0000000..de89565
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetGuaranteedInvoiceConfigInterface.php
@@ -0,0 +1,34 @@
+get(self::GUARANTEED_SEPA_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::GUARANTEED_SEPA_NOTIFICATION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getDuedate()
+ {
+ return (string)$this->get(self::GUARANTEED_SEPA_DUEDATE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOnholdAmount()
+ {
+ return (int)$this->get(self::GUARANTEED_SEPA_ONHOLD_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentAction()
+ {
+ return (string)$this->get(self::GUARANTEED_SEPA_PAYMENT_ACTION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMinAmount()
+ {
+ return (int)$this->get(self::GUARANTEED_SEPA_MIN_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOneclick()
+ {
+ return (string)$this->get(self::GUARANTEED_SEPA_ONECLICK);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetGuaranteedSepaConfigInterface.php b/PaymentMethod/Config/NovalnetGuaranteedSepaConfigInterface.php
new file mode 100755
index 0000000..5f6614f
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetGuaranteedSepaConfigInterface.php
@@ -0,0 +1,44 @@
+get(self::IDEAL_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::IDEAL_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetIdealConfigInterface.php b/PaymentMethod/Config/NovalnetIdealConfigInterface.php
new file mode 100755
index 0000000..df2f595
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetIdealConfigInterface.php
@@ -0,0 +1,19 @@
+get(self::INSTALMENT_INVOICE_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::INSTALMENT_INVOICE_NOTIFICATION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMinAmount()
+ {
+ return (int)$this->get(self::INSTALMENT_INVOICE_MIN_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentAction()
+ {
+ return (string)$this->get(self::INSTALMENT_INVOICE_PAYMENT_ACTION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOnholdAmount()
+ {
+ return (int)$this->get(self::INSTALMENT_INVOICE_ONHOLD_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getInstalmentCycle()
+ {
+ return (array)$this->get(self::INSTALMENT_INVOICE_CYCLE);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetInstalmentInvoiceConfigInterface.php b/PaymentMethod/Config/NovalnetInstalmentInvoiceConfigInterface.php
new file mode 100755
index 0000000..d88134b
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetInstalmentInvoiceConfigInterface.php
@@ -0,0 +1,39 @@
+get(self::INSTALMENT_SEPA_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::INSTALMENT_SEPA_NOTIFICATION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getDuedate()
+ {
+ return (string)$this->get(self::INSTALMENT_SEPA_DUEDATE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMinAmount()
+ {
+ return (int)$this->get(self::INSTALMENT_SEPA_MIN_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentAction()
+ {
+ return (string)$this->get(self::INSTALMENT_SEPA_PAYMENT_ACTION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOnholdAmount()
+ {
+ return (int)$this->get(self::INSTALMENT_SEPA_ONHOLD_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getInstalmentCycle()
+ {
+ return (array)$this->get(self::INSTALMENT_SEPA_CYCLE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOneclick()
+ {
+ return (int)$this->get(self::INSTALMENT_SEPA_ONECLICK);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetInstalmentSepaConfigInterface.php b/PaymentMethod/Config/NovalnetInstalmentSepaConfigInterface.php
new file mode 100755
index 0000000..bbf828e
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetInstalmentSepaConfigInterface.php
@@ -0,0 +1,49 @@
+get(self::INVOICE_DUEDATE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getTestMode()
+ {
+ return (int)$this->get(self::INVOICE_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOnholdAmount()
+ {
+ return (int)$this->get(self::INVOICE_ONHOLD_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentAction()
+ {
+ return (string)$this->get(self::INVOICE_PAYMENT_ACTION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::INVOICE_NOTIFICATION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMinAmount()
+ {
+ return (int)$this->get(self::GUARANTEED_INVOICE_MIN_AMOUNT);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetInvoiceConfigInterface.php b/PaymentMethod/Config/NovalnetInvoiceConfigInterface.php
new file mode 100755
index 0000000..baa41ce
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetInvoiceConfigInterface.php
@@ -0,0 +1,40 @@
+get(self::MULTIBANCO_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::MULTIBANCO_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetMultibancoConfigInterface.php b/PaymentMethod/Config/NovalnetMultibancoConfigInterface.php
new file mode 100755
index 0000000..31e7788
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetMultibancoConfigInterface.php
@@ -0,0 +1,20 @@
+get(self::ONLINEBANKTRANSFER_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::ONLINEBANKTRANSFER_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetOnlinebanktransferConfigInterface.php b/PaymentMethod/Config/NovalnetOnlinebanktransferConfigInterface.php
new file mode 100755
index 0000000..29da0da
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetOnlinebanktransferConfigInterface.php
@@ -0,0 +1,19 @@
+get(self::PAYPAL_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentAction()
+ {
+ return (string)$this->get(self::PAYPAL_PAYMENT_ACTION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOnholdAmount()
+ {
+ return (int)$this->get(self::PAYPAL_ONHOLD_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::PAYPAL_NOTIFICATION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOneclick()
+ {
+ return (int)$this->get(self::PAYPAL_ONECLICK);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetPaypalConfigInterface.php b/PaymentMethod/Config/NovalnetPaypalConfigInterface.php
new file mode 100755
index 0000000..3969926
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetPaypalConfigInterface.php
@@ -0,0 +1,34 @@
+get(self::POSTFINANCECARD_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::POSTFINANCECARD_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetPostfinanceCardConfigInterface.php b/PaymentMethod/Config/NovalnetPostfinanceCardConfigInterface.php
new file mode 100755
index 0000000..4242511
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetPostfinanceCardConfigInterface.php
@@ -0,0 +1,19 @@
+get(self::POSTFINANCE_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::POSTFINANCE_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetPostfinanceConfigInterface.php b/PaymentMethod/Config/NovalnetPostfinanceConfigInterface.php
new file mode 100755
index 0000000..318a17f
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetPostfinanceConfigInterface.php
@@ -0,0 +1,19 @@
+get(self::PREPAYMENT_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::PREPAYMENT_NOTIFICATION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getDuedate()
+ {
+ return (string)$this->get(self::PREPAYMENT_DUEDATE);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetPrepaymentConfigInterface.php b/PaymentMethod/Config/NovalnetPrepaymentConfigInterface.php
new file mode 100755
index 0000000..afdd767
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetPrepaymentConfigInterface.php
@@ -0,0 +1,24 @@
+get(self::PRZELEWY_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::PRZELEWY_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetPrzelewyConfigInterface.php b/PaymentMethod/Config/NovalnetPrzelewyConfigInterface.php
new file mode 100755
index 0000000..f9d965f
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetPrzelewyConfigInterface.php
@@ -0,0 +1,19 @@
+get(self::SEPA_DUEDATE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getTestMode()
+ {
+ return (int)$this->get(self::SEPA_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOnholdAmount()
+ {
+ return (int)$this->get(self::SEPA_ONHOLD_AMOUNT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentAction()
+ {
+ return (string)$this->get(self::SEPA_PAYMENT_ACTION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::SEPA_NOTIFICATION);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getOneclick()
+ {
+ return (int)$this->get(self::SEPA_ONECLICK);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMinAmount()
+ {
+ return (int)$this->get(self::GUARANTEED_SEPA_MIN_AMOUNT);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetSepaConfigInterface.php b/PaymentMethod/Config/NovalnetSepaConfigInterface.php
new file mode 100755
index 0000000..b581e50
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetSepaConfigInterface.php
@@ -0,0 +1,45 @@
+get(self::TRUSTLY_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::TRUSTLY_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetTrustlyConfigInterface.php b/PaymentMethod/Config/NovalnetTrustlyConfigInterface.php
new file mode 100755
index 0000000..c48d6fd
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetTrustlyConfigInterface.php
@@ -0,0 +1,19 @@
+get(self::WECHATPAY_TESTMODE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getBuyerNotification()
+ {
+ return (string)$this->get(self::WECHATPAY_NOTIFICATION);
+ }
+}
diff --git a/PaymentMethod/Config/NovalnetWechatpayConfigInterface.php b/PaymentMethod/Config/NovalnetWechatpayConfigInterface.php
new file mode 100755
index 0000000..e261f0c
--- /dev/null
+++ b/PaymentMethod/Config/NovalnetWechatpayConfigInterface.php
@@ -0,0 +1,19 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetAlipayConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetAlipayConfigProviderInterface.php
new file mode 100755
index 0000000..cbd86e4
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetAlipayConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetBancontactConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetBancontactConfigProviderInterface.php
new file mode 100755
index 0000000..cca9ace
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetBancontactConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetBanktransferConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetBanktransferConfigProviderInterface.php
new file mode 100755
index 0000000..15bc32f
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetBanktransferConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetCashpaymentConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetCashpaymentConfigProviderInterface.php
new file mode 100755
index 0000000..ecf7d05
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetCashpaymentConfigProviderInterface.php
@@ -0,0 +1,23 @@
+doctrine = $doctrine;
+ $this->logger = $logger;
+ $this->configFactory = $configFactory;
+ $this->type = $type;
+ }
+
+ /**
+ * @return string
+ */
+ protected function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentConfigs()
+ {
+ $configs = [];
+
+ $settings = $this->getEnabledIntegrationSettings();
+
+ foreach ($settings as $setting) {
+ $config = $this->configFactory->create($setting);
+
+ $configs[$config->getPaymentMethodIdentifier()] = $config;
+ }
+
+ return $configs;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ $paymentConfigs = $this->getPaymentConfigs();
+
+ if ([] === $paymentConfigs || false === array_key_exists($identifier, $paymentConfigs)) {
+ return null;
+ }
+
+ return $paymentConfigs[$identifier];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function hasPaymentConfig($identifier)
+ {
+ return null !== $this->getPaymentConfig($identifier);
+ }
+
+ /**
+ * @return NovalnetSettings[]
+ */
+ protected function getEnabledIntegrationSettings()
+ {
+ try {
+ /** @var NovalnetSettingsRepository $repository */
+ $repository = $this->doctrine
+ ->getManagerForClass(NovalnetSettings::class)
+ ->getRepository(NovalnetSettings::class);
+ return $repository->getEnabledSettings();
+ } catch (\UnexpectedValueException $e) {
+ $this->logger->critical($e->getMessage());
+
+ return [];
+ }
+ }
+
+ /**
+ * @return array
+ */
+ protected function collectConfigs()
+ {
+ $configs = [];
+ $settings = $this->getEnabledIntegrationSettings();
+
+ foreach ($settings as $setting) {
+ $config = $this->configFactory->createConfig($setting);
+
+ $configs[$config->getPaymentMethodIdentifier()] = $config;
+ }
+ return $configs;
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetConfigProviderInterface.php
new file mode 100755
index 0000000..cb9d61e
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetConfigProviderInterface.php
@@ -0,0 +1,28 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetCreditCardConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetCreditCardConfigProviderInterface.php
new file mode 100755
index 0000000..128b803
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetCreditCardConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetEpsConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetEpsConfigProviderInterface.php
new file mode 100755
index 0000000..8d689d1
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetEpsConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetGiropayConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetGiropayConfigProviderInterface.php
new file mode 100755
index 0000000..22bf452
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetGiropayConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetGuaranteedInvoiceConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetGuaranteedInvoiceConfigProviderInterface.php
new file mode 100755
index 0000000..05c77ed
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetGuaranteedInvoiceConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetGuaranteedSepaConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetGuaranteedSepaConfigProviderInterface.php
new file mode 100755
index 0000000..9df30e4
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetGuaranteedSepaConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetIdealConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetIdealConfigProviderInterface.php
new file mode 100755
index 0000000..97eebe2
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetIdealConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetInstalmentInvoiceConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetInstalmentInvoiceConfigProviderInterface.php
new file mode 100755
index 0000000..0751a01
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetInstalmentInvoiceConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetInstalmentSepaConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetInstalmentSepaConfigProviderInterface.php
new file mode 100755
index 0000000..9d9ccd8
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetInstalmentSepaConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetInvoiceConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetInvoiceConfigProviderInterface.php
new file mode 100755
index 0000000..0141588
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetInvoiceConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetMultibancoConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetMultibancoConfigProviderInterface.php
new file mode 100755
index 0000000..7e55ddb
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetMultibancoConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetOnlinebanktransferConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetOnlinebanktransferConfigProviderInterface.php
new file mode 100755
index 0000000..5b216ac
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetOnlinebanktransferConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetPaypalConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetPaypalConfigProviderInterface.php
new file mode 100755
index 0000000..03c4fb6
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetPaypalConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetPostfinanceCardConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetPostfinanceCardConfigProviderInterface.php
new file mode 100755
index 0000000..f7e39b6
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetPostfinanceCardConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetPostfinanceConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetPostfinanceConfigProviderInterface.php
new file mode 100755
index 0000000..a71d3ba
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetPostfinanceConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetPrepaymentConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetPrepaymentConfigProviderInterface.php
new file mode 100755
index 0000000..8caec5c
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetPrepaymentConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetPrzelewyConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetPrzelewyConfigProviderInterface.php
new file mode 100755
index 0000000..b28332e
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetPrzelewyConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetSepaConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetSepaConfigProviderInterface.php
new file mode 100755
index 0000000..84fb0be
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetSepaConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetTrustlyConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetTrustlyConfigProviderInterface.php
new file mode 100755
index 0000000..d83f0fe
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetTrustlyConfigProviderInterface.php
@@ -0,0 +1,23 @@
+configs)) {
+ return $this->configs = $this->collectConfigs();
+ }
+
+ return $this->configs;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentConfig($identifier)
+ {
+ if (!$this->hasPaymentConfig($identifier)) {
+ return null;
+ }
+
+ $configs = $this->getPaymentConfigs();
+
+ return $configs[$identifier];
+ }
+}
diff --git a/PaymentMethod/Config/Provider/NovalnetWechatpayConfigProviderInterface.php b/PaymentMethod/Config/Provider/NovalnetWechatpayConfigProviderInterface.php
new file mode 100755
index 0000000..15f0d58
--- /dev/null
+++ b/PaymentMethod/Config/Provider/NovalnetWechatpayConfigProviderInterface.php
@@ -0,0 +1,23 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetAlipayPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetAlipayPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..200bfbe
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetAlipayPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetBancontactPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetBancontactPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..c3ee980
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetBancontactPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetBanktransferPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetBanktransferPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..e93297e
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetBanktransferPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetCashpaymentPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetCashpaymentPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..b9293e8
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetCashpaymentPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetCreditCardPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetCreditCardPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..b6206f8
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetCreditCardPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetEpsPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetEpsPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..ff0e396
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetEpsPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetGiropayPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetGiropayPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..b33f6b4
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetGiropayPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetGuaranteedInvoicePaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetGuaranteedInvoicePaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..1c99ebd
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetGuaranteedInvoicePaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetGuaranteedSepaPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetGuaranteedSepaPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..c891d93
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetGuaranteedSepaPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetIdealPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetIdealPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..81edb52
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetIdealPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetInstalmentInvoicePaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetInstalmentInvoicePaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..661b67f
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetInstalmentInvoicePaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetInstalmentSepaPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetInstalmentSepaPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..047957a
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetInstalmentSepaPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetInvoicePaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetInvoicePaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..95f9028
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetInvoicePaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetMultibancoPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetMultibancoPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..0811ed0
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetMultibancoPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetOnlinebanktransferPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetOnlinebanktransferPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..82fc6fe
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetOnlinebanktransferPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface = $routerInterface;
+ $this->doctrineHelper = $doctrineHelper;
+ $this->novalnetHelper = $novalnetHelper;
+ $this->requestStack = $requestStack;
+ $this->translator = $translator;
+ $this->userLocalizationManager = $userLocalizationManager;
+ $this->client = $client;
+ $this->paymentMethodProvider = $paymentMethodProvider;
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetPaypalPaymentMethodFactory.php b/PaymentMethod/Factory/NovalnetPaypalPaymentMethodFactory.php
new file mode 100755
index 0000000..2270295
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetPaypalPaymentMethodFactory.php
@@ -0,0 +1,37 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetPaypalPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetPaypalPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..22442f7
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetPaypalPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetPostfinanceCardPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetPostfinanceCardPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..3098c75
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetPostfinanceCardPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetPostfinancePaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetPostfinancePaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..09023fa
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetPostfinancePaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetPrepaymentPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetPrepaymentPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..3ff9f5f
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetPrepaymentPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetPrzelewyPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetPrzelewyPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..75e4139
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetPrzelewyPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetSepaPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetSepaPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..bf66464
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetSepaPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetTrustlyPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetTrustlyPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..e6035d8
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetTrustlyPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+routerInterface,
+ $this->doctrineHelper,
+ $this->novalnetHelper,
+ $this->requestStack,
+ $this->translator,
+ $this->userLocalizationManager,
+ $this->client,
+ $this->paymentMethodProvider
+ );
+ }
+}
diff --git a/PaymentMethod/Factory/NovalnetWechatpayPaymentMethodFactoryInterface.php b/PaymentMethod/Factory/NovalnetWechatpayPaymentMethodFactoryInterface.php
new file mode 100755
index 0000000..dab5668
--- /dev/null
+++ b/PaymentMethod/Factory/NovalnetWechatpayPaymentMethodFactoryInterface.php
@@ -0,0 +1,19 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetBancontactPaymentMethod.php b/PaymentMethod/NovalnetBancontactPaymentMethod.php
new file mode 100755
index 0000000..f517550
--- /dev/null
+++ b/PaymentMethod/NovalnetBancontactPaymentMethod.php
@@ -0,0 +1,68 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetBanktransferPaymentMethod.php b/PaymentMethod/NovalnetBanktransferPaymentMethod.php
new file mode 100755
index 0000000..8d0f15d
--- /dev/null
+++ b/PaymentMethod/NovalnetBanktransferPaymentMethod.php
@@ -0,0 +1,66 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetCallback.php b/PaymentMethod/NovalnetCallback.php
new file mode 100755
index 0000000..3ade7cf
--- /dev/null
+++ b/PaymentMethod/NovalnetCallback.php
@@ -0,0 +1,785 @@
+ [
+ 'type',
+ 'checksum',
+ 'tid',
+ ],
+ 'merchant' => [
+ 'vendor',
+ 'project',
+ ],
+ 'result' => [
+ 'status',
+ ],
+ 'transaction' => [
+ 'tid',
+ 'payment_type',
+ 'status',
+ ],
+ ];
+
+
+
+
+ /**
+ * Constructor for initiate the callback process
+ *
+ * @param Registry doctrine
+ * @param DoctrineHelper doctrineHelper
+ * @param TranslatorInterface translator
+ * @param NovalnetHelper novalnetHelper
+ * @param ConfigManager oroGlobalConfig
+ * @param Processor emailModelSender
+ * @param RequestStack requestStack
+ * @param LoggerInterface logger
+ */
+ public function __construct(
+ Registry $doctrine,
+ DoctrineHelper $doctrineHelper,
+ TranslatorInterface $translator,
+ NovalnetHelper $novalnetHelper,
+ ConfigManager $oroGlobalConfig,
+ EmailModelSender $emailModelSender,
+ RequestStack $requestStack,
+ LoggerInterface $logger
+ ) {
+ $this->qb = $doctrine->getManager();
+ $this->doctrine = $doctrine;
+ $this->doctrineHelper = $doctrineHelper;
+ $this->translator = $translator;
+ $this->novalnetHelper = $novalnetHelper;
+ $this->oroGlobalConfig = $oroGlobalConfig;
+ $this->emailModelSender = $emailModelSender;
+ $this->requestStack = $requestStack->getCurrentRequest();
+ $this->logger = $logger;
+ }
+
+ /**
+ * Processes the callback script
+ *
+ * @param object $event
+ * @param object $paymentProvider
+ * @return null
+ */
+ public function startProcess($event, $paymentProvider)
+ {
+ $this->paymentTransaction = $event->getPaymentTransaction();
+
+ $paymentMethod = $paymentProvider->getPaymentMethod($this->paymentTransaction->getPaymentMethod());
+ $novalnetGlobalConfig = $paymentMethod->config;
+
+ // Authenticate request host.
+ $authenticateResult = $this->authenticateEventData($novalnetGlobalConfig);
+ if ($authenticateResult) {
+ return $this->debugMessage($authenticateResult);
+ }
+
+ $orderDetailsEntity = $this->doctrineHelper->getEntity(
+ $this->paymentTransaction->getEntityClass(),
+ $this->paymentTransaction->getEntityIdentifier()
+ );
+
+
+ if (!empty($this->eventData['transaction']['order_no']) &&
+ $orderDetailsEntity->getId() != $this->eventData['transaction']['order_no']) {
+ return $this->debugMessage('Order reference not matching.');
+ }
+
+ $orderNo = !empty($this->eventData ['transaction'] ['order_no']) ? $this->eventData ['transaction'] ['order_no'] : $orderDetailsEntity->getId();
+
+ // Get order reference.
+ $isCommunicationFailure = $this->getOrderReference($orderNo);
+
+ if ($isCommunicationFailure) {
+ return;
+ }
+
+ if (! empty($this->eventData ['transaction'] ['order_no']) && $this->orderReference ['orderNo'] != $this->eventData ['transaction'] ['order_no']) {
+ return $this->debugMessage('Order reference not matching.');
+ }
+
+ $repository = $this->doctrine->getRepository(NovalnetTransactionDetails::class);
+ $this->nnTransactionDetailEntity = $repository->findOneBy(['orderNo' => $orderDetailsEntity->getId()]);
+
+ $result = $this->handleTransactionEvents();
+ if($result)
+ {
+ return $this->debugMessage($result);
+ }
+
+ // Update novalnet transaction details
+ return $this->updateTransactionDetails($orderDetailsEntity, $novalnetGlobalConfig);
+
+ }
+
+ /**
+ * Update Transaction Details and order comments
+ * @return null
+ */
+ protected function updateTransactionDetails($orderDetailsEntity, $novalnetGlobalConfig)
+ {
+ $entityManager = $this->doctrineHelper->getEntityManager('NovalnetBundle:NovalnetTransactionDetails');
+ $entityManager->persist($this->nnTransactionDetailEntity);
+ $entityManager->flush();
+
+ if (!empty($this->customerNotes)) {
+ $comments = ($orderDetailsEntity->getCustomerNotes())
+ ? $orderDetailsEntity->getCustomerNotes() . ' | ' . $this->customerNotes
+ : $this->customerNotes;
+
+ $orderDetailsEntity->setCustomerNotes($comments);
+ $this->debugMessage($this->customerNotes);
+ $this->sendNotificationMail($novalnetGlobalConfig, $orderDetailsEntity);
+
+ $orderDetailsEm = $this->doctrineHelper->getEntityManager('OroOrderBundle:Order');
+ $orderDetailsEm->persist($orderDetailsEntity);
+ $orderDetailsEm->flush($orderDetailsEntity);
+ }
+ }
+
+ /**
+ * Handle Transaction Event
+ * @return string|null
+ */
+ protected function handleTransactionEvents()
+ {
+ switch ($this->eventType) {
+ case 'PAYMENT':
+ return 'The Payment has been received';
+ break;
+ case 'TRANSACTION_CAPTURE':
+ case 'TRANSACTION_CANCEL':
+ $this->handleTransactionCaptureCancel();
+ break;
+ case 'TRANSACTION_REFUND':
+ $this->handleTransactionRefund();
+ break;
+ case 'TRANSACTION_UPDATE':
+ $this->handleTransactionUpdate();
+ break;
+ case 'CREDIT':
+ $this->handleCredit();
+ break;
+ case 'CHARGEBACK':
+ $this->handleChargeback();
+ break;
+ case 'INSTALMENT':
+ $this->handleInstalment();
+ break;
+ case 'INSTALMENT_CANCEL':
+ $this->handleInstalmentCancel();
+ break;
+ case 'PAYMENT_REMINDER_1':
+ case 'PAYMENT_REMINDER_2':
+ $this->handlePaymentReminder();
+ break;
+ case 'SUBMISSION_TO_COLLECTION_AGENCY':
+ $this->handleCollection();
+ break;
+ default:
+ return "default The webhook notification has been received for the unhandled EVENT type($this->event_type)";
+ }
+ return false;
+ }
+
+ /**
+ * Handle Instalment payment
+ * @return null
+ */
+ public function handleInstalment()
+ {
+ if ($this->eventData['transaction']['status'] == 'CONFIRMED' && ! empty($this->eventData['instalment']['cycles_executed'])) {
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.callback_instalment_cycle_executed'), $this->parentTid, $this->novalnetHelper->amountFormat($this->eventData['transaction']['amount']), date('d-m-Y'), $this->eventTid);
+
+ $instalmentData = (array) json_decode($this->orderReference['additionalInfo']);
+ $instalmentData[$this->eventData['instalment']['cycles_executed']] = ['tid' => $this->eventTid];
+ $this->nnTransactionDetailEntity->setAdditionalInfo(json_encode($instalmentData));
+ if(empty($this->eventData['instalment']['prepaid']) && $this->eventData['transaction']['payment_type'] == 'INSTALMENT_INVOICE') {
+ $this->customerNotes .= $this->novalnetHelper->prepareComments($this->eventData, $this->translator);
+ }
+ $this->prepareMailContent('instalment');
+ }
+ }
+
+ /**
+ * Handle Instalment Cancel
+ * @return null
+ */
+ public function handleInstalmentCancel()
+ {
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.instalment_cancel_text'), $this->parentTid);
+ $this->nnTransactionDetailEntity->setAdditionalInfo(json_encode([]));
+ $this->setPaymentStatus('canceled');
+ $this->nnTransactionDetailEntity->setStatus('DEACTIVATED');
+ }
+
+ /**
+ * Handle PaymentReminder
+ * @return null
+ */
+ public function handlePaymentReminder()
+ {
+ $noOfRemainder = preg_replace('/[^0-9]/', '', $this->eventType);
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.payment_remainder_text'), $noOfRemainder);
+ }
+
+ /**
+ * Handle Collection
+ * @return null
+ */
+ public function handleCollection()
+ {
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.collection_submitted_text'), $this->eventData['collection']['reference']);
+ }
+
+ /**
+ * Handle Credit event
+ * @return null
+ */
+ public function handleCredit()
+ {
+ if ($this->eventData['transaction']['payment_type'] == 'ONLINE_TRANSFER_CREDIT') {
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.callback_online_transfer_credit_executed'), $this->novalnetHelper->amountFormat($this->eventData['transaction']['amount']), $this->eventData['transaction']['order_no']);
+ $this->logCallbackDetails();
+ } else {
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.callback_credit_executed'), $this->parentTid, $this->novalnetHelper->amountFormat($this->eventData['transaction']['amount']), date('d-m-Y'), $this->eventTid);
+
+ if (in_array($this->eventData['transaction']['payment_type'], [ 'INVOICE_CREDIT', 'CASHPAYMENT_CREDIT', 'MULTIBANCO_CREDIT' ])) {
+ $amountAlreadyPaid = $this->getOrderPaidAmount($this->parentTid);
+
+ if ($amountAlreadyPaid < $this->nnTransactionDetailEntity->getAmount()) {
+ $totalPaidAmount = $amountAlreadyPaid + $this->eventData['transaction']['amount'];
+ $refundedAmount = ($this->nnTransactionDetailEntity->getRefundedAmount()) ? $this->nnTransactionDetailEntity->getRefundedAmount() : 0;
+ $amountToBePaid = $this->nnTransactionDetailEntity->getAmount() - $refundedAmount;
+
+ if ($totalPaidAmount >= $amountToBePaid) {
+ $this->setPaymentStatus('full');
+ $this->nnTransactionDetailEntity->setStatus($this->eventData['transaction']['status']);
+ }
+ $this->logCallbackDetails();
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Get the order paid amount from database
+ *
+ * @param integer $parentTid
+ * @return integer
+ */
+ protected function getOrderPaidAmount($parentTid)
+ {
+ $repository = $this->doctrine->getRepository(NovalnetCallbackHistory::class);
+ $qryBuilder = $repository->createQueryBuilder('nn')
+ ->select('SUM(nn.callbackAmount) AS amount')
+ ->where('nn.orgTid = :parentTid')
+ ->andWhere('nn.paymentType IN (:paymentType)')
+ ->setParameter('parentTid', $parentTid)
+ ->setParameter('paymentType', ['INVOICE_CREDIT', 'CASHPAYMENT_CREDIT', 'MULTIBANCO_CREDIT']);
+ $result = $qryBuilder->getQuery()->getArrayResult();
+ return !empty($result[0]['amount']) ? $result[0]['amount'] : '0';
+ }
+
+
+ /**
+ * Save Callback Details
+ * @return null
+ */
+ protected function logCallbackDetails()
+ {
+ $entityManager = $this->doctrineHelper->getEntityManager('NovalnetBundle:NovalnetCallbackHistory');
+ $nnCallbackHistory = new NovalnetCallbackHistory();
+ $nnCallbackHistory->setCallbackTid($this->eventTid);
+ $nnCallbackHistory->setOrgTid($this->parentTid);
+ $nnCallbackHistory->setCallbackAmount($this->eventData['transaction']['amount']);
+ $nnCallbackHistory->setOrderNo($this->orderReference['eventOrderNo']);
+ $nnCallbackHistory->setPaymentType($this->eventData['transaction']['payment_type']);
+ $nnCallbackHistory->setEventType($this->eventType);
+ $nnCallbackHistory->setDate(new \DateTime(date('Y-m-d H:i:s')));
+ $entityManager->persist($nnCallbackHistory);
+ $entityManager->flush();
+ }
+
+ /**
+ * Send notify email after callback process
+ *
+ * @param object $novalnetGlobalConfig
+ * @return null
+ */
+ protected function sendNotificationMail($novalnetGlobalConfig, $orderDetailsEntity)
+ {
+ if (!empty($novalnetGlobalConfig->getCallbackEmailTo())) {
+ $email = new Email();
+ $sender = $this->oroGlobalConfig->get('oro_notification.email_notification_sender_email');
+ $email->setFrom($sender);
+ $email->setTo(explode(',', $novalnetGlobalConfig->getCallbackEmailTo()));
+ $mailSubject = 'Novalnet Callback script notification - Order No : ' . $this->orderReference['eventOrderNo'];
+
+ $email->setSubject($mailSubject);
+ $email->setBody($this->customerNotes);
+ $email->setOrganization($orderDetailsEntity->getCustomerUser()->getOrganization());
+ try {
+ $this->emailModelSender->send($email, $email->getOrigin());
+ } catch (\Swift_SwiftException $exception) {
+ self::debugMessage('unable to send email');
+ }
+ }
+ }
+
+ /**
+ * Handle transaction update event
+ * @return null
+ */
+ public function handleTransactionUpdate()
+ {
+ if (in_array($this->eventData['transaction']['status'], [ 'PENDING', 'ON_HOLD', 'CONFIRMED', 'DEACTIVATED' ])) {
+ if ($this->eventData['transaction']['status'] == 'DEACTIVATED') {
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.transaction_cancelled'), date('d-m-Y'), date('H:i:s'));
+ $this->nnTransactionDetailEntity->setStatus($this->eventData['transaction']['status']);
+ $this->setPaymentStatus('canceled');
+ } else {
+ $this->nnTransactionDetailEntity->setStatus($this->eventData['transaction']['status']);
+
+ if ($this->orderReference['status'] == 'PENDING' && $this->eventData['transaction']['status'] == 'ON_HOLD') {
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.callback_pending_to_onhold'), $this->eventTid, date('d-m-Y'), date('H:i:s'));
+ } elseif (in_array($this->orderReference['status'], ['PENDING', 'ON_HOLD'])) {
+
+ if($this->eventData['transaction']['status'] == 'CONFIRMED') {
+ $this->setPaymentStatus('full');
+ $this->prepareMailContent('payment_confirmation');
+ }
+
+ if (in_array($this->orderReference['paymentType'], ['INSTALMENT_INVOICE', 'INSTALMENT_DIRECT_DEBIT_SEPA']) && isset($this->eventData['instalment'])) {
+ $instalmentData = $this->eventData['instalment'];
+ $instalmentData[$instalmentData['cycles_executed']] = ['tid' => $this->eventTid];
+ $instalmentData['formatted_cycle_amount'] = sprintf('%0.2f', $instalmentData['cycle_amount']/100);
+ $this->nnTransactionDetailEntity->setAdditionalInfo(json_encode($instalmentData));
+ }
+
+ if($this->eventData['transaction']['due_date']) {
+ $duedateUpdateComment = ($this->orderReference['paymentType'] === 'CASHPAYMENT') ? 'novalnet.transaction_update_amount_expiry_date' : 'novalnet.transaction_update_amount_due_date';
+ $this->customerNotes .= sprintf($this->translator->trans($duedateUpdateComment), $this->novalnetHelper->amountFormat($this->eventData['transaction']['amount']) . $this->eventData['transaction']['currency'], $this->eventData['transaction']['due_date']);
+ } else {
+ $this->customerNotes .= sprintf($this->translator->trans('novalnet.transaction_update'), $this->parentTid, $this->novalnetHelper->amountFormat($this->eventData['transaction']['amount']) . $this->eventData['transaction']['currency']);
+ }
+ }
+
+ if (in_array($this->eventData['transaction']['payment_type'], ['INSTALMENT_INVOICE', 'GUARANTEED_INVOICE', 'INVOICE', 'PREPAYMENT'])) {
+ $this->customerNotes = $this->novalnetHelper->prepareComments($this->eventData, $this->translator);
+ }
+
+ $this->nnTransactionDetailEntity->setAmount($this->eventData['transaction']['amount']);
+ }
+ $this->logCallbackDetails();
+ }
+ }
+
+ /**
+ * Handle transaction chargeback event
+ * @return null
+ */
+ public function handleChargeback()
+ {
+ if ($this->orderReference['status'] == 'CONFIRMED' && !empty($this->eventData['transaction']['amount'])) {
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.transaction_chargeback'), $this->parentTid, $this->novalnetHelper->amountFormat($this->eventData ['transaction'] ['amount']), date('d-m-Y H:i:s'), $this->eventTid);
+ $this->logCallbackDetails();
+ }
+ }
+
+ /**
+ * Handle Transaction Refund Event
+ * @return null
+ */
+ public function handleTransactionRefund()
+ {
+ if ($this->orderReference['status'] == 'CONFIRMED' && !empty($this->eventData['transaction']['refund']['amount'])) {
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.refund_with_parent_tid'), $this->eventData['transaction']['tid'], $this->novalnetHelper->amountFormat($this->eventData['transaction']['refund']['amount']), $this->eventData['transaction']['refund']['currency']);
+
+ if (!empty($this->eventData['transaction']['refund']['tid'])) {
+ $this->customerNotes = sprintf($this->translator->trans('novalnet.refund_with_child_tid'), $this->parentTid, $this->novalnetHelper->amountFormat($this->eventData['transaction']['refund']['amount']), $this->eventData['transaction']['refund']['currency'], $this->eventData['transaction']['refund']['tid']);
+ }
+
+ $this->nnTransactionDetailEntity->setRefundedAmount($this->orderReference['refundedAmount'] + $this->eventData ['transaction'] ['refund'] ['amount']);
+ $this->nnTransactionDetailEntity->setStatus($this->eventData ['transaction']['status']);
+ $this->logCallbackDetails();
+ }
+ }
+
+
+ /**
+ * Handle transaction capture/cancel
+ * @return null
+ */
+ public function handleTransactionCaptureCancel()
+ {
+ if (in_array($this->orderReference['status'], ['ON_HOLD', 'PENDING'])) {
+ $this->nnTransactionDetailEntity->setStatus($this->eventData['transaction']['status']);
+ if ($this->eventType == 'TRANSACTION_CAPTURE') {
+ $this->customerNotes = sprintf(
+ $this->translator->trans('novalnet.transaction_confirmed'),
+ date('d-m-Y'),
+ date('H:i:s')
+ );
+ if ($this->orderReference['paymentType'] == 'PAYPAL' && !empty($this->orderReference['oneclick'])) {
+ // save account_details
+ $paymentData = ['paypal_account' =>
+ $this->eventData['transaction']['payment_data']['paypal_account']];
+
+ $this->nnTransactionDetailEntity->setPaymentData(json_encode($paymentData));
+ } elseif (in_array(
+ $this->orderReference['paymentType'],
+ ['INSTALMENT_INVOICE', 'INSTALMENT_DIRECT_DEBIT_SEPA']
+ ) && $this->eventData['instalment']) {
+ $instalmentData = $this->eventData['instalment'];
+ $instalmentData[$instalmentData['cycles_executed']] = ['tid' => $this->eventTid];
+ $instalmentData['formatted_cycle_amount'] = sprintf('%0.2f', $instalmentData['cycle_amount']/100);
+ $this->nnTransactionDetailEntity->setAdditionalInfo(json_encode($instalmentData));
+ }
+ if (in_array(
+ $this->orderReference['paymentType'],
+ ['INVOICE', 'GUARANTEED_INVOICE', 'INSTALMENT_INVOICE']
+ )) {
+ $this->customerNotes .= $this->novalnetHelper->prepareComments($this->eventData, $this->translator);
+ }
+ if ($this->orderReference['paymentType'] != 'INVOICE') {
+ $this->setPaymentStatus('full');
+ }
+
+ $this->prepareMailContent('payment_confirmation');
+ } else {
+ $this->customerNotes = sprintf(
+ $this->translator->trans('novalnet.transaction_cancelled'),
+ date('d-m-Y'),
+ date('H:i:s')
+ );
+ $this->setPaymentStatus('canceled');
+ }
+ $this->logCallbackDetails();
+ }
+ }
+
+ /**
+ * Authenticate event data
+ *
+ * @param boolean $novalnetGlobalConfig
+ * @return string|void
+ */
+ protected function authenticateEventData($novalnetGlobalConfig)
+ {
+ $callbackTestMode = $novalnetGlobalConfig->getCallbackTestMode();
+ $novalnetHostName = 'pay-nn.de';
+
+ $novalnetHostIp = gethostbyname($novalnetHostName);
+
+ // Authenticating the server request based on IP.
+ $requestReceivedIp = $this->novalnetHelper->getIp($this->requestStack);
+
+ if (! empty($novalnetHostIp) && ! empty($requestReceivedIp)) {
+ if ($novalnetHostIp !== $requestReceivedIp && empty($callbackTestMode)) {
+ return "Unauthorised access from the IP $requestReceivedIp";
+ }
+ } else {
+ return 'Unauthorised access from the IP. Host/recieved IP is empty';
+ }
+
+ $validateEventData = $this->validateEventData();
+
+ if ($validateEventData) {
+ return $validateEventData;
+ }
+
+ return $this->validateChecksum($novalnetGlobalConfig->getPaymentAccessKey());
+ }
+
+ /**
+ * Validate event data
+ * @return string
+ */
+ protected function validateEventData()
+ {
+
+ try {
+ $this->eventData = json_decode(file_get_contents('php://input'), true);
+ } catch (Exception $e) {
+ return "Received data is not in the JSON format $e";
+ }
+
+ if (! empty($this->eventData ['custom'] ['shop_invoked'])) {
+ return 'Process already handled in the shop.';
+ }
+
+ // Validate request parameters.
+ foreach ($this->mandatory as $category => $parameters) {
+ if (empty($this->eventData [ $category ])) {
+ // Could be a possible manipulation in the notification data.
+ return "Required parameter category($category) not received";
+ }
+ foreach ($parameters as $parameter) {
+ if (empty($this->eventData [ $category ] [ $parameter ])) {
+ // Could be a possible manipulation in the notification data.
+ return "Required parameter($parameter) in the category($category) not received";
+ } elseif (in_array($parameter, ['tid', 'parent_tid'])
+ && !preg_match('/^\d{17}$/', $this->eventData[$category][$parameter])) {
+ return "Invalid TID received in the category($category) not received $parameter";
+ }
+ }
+ }
+ }
+
+ /**
+ * Get order reference
+ * @return bool
+ */
+ protected function getOrderReference($orderNo)
+ {
+ if (! empty($orderNo)) {
+ $repository = $this->doctrine->getRepository(NovalnetTransactionDetails::class);
+ $qryBuilder = $repository->createQueryBuilder('nn')
+ ->select('nn')
+ ->where('nn.tid = :tid')
+ ->setParameter('tid', $this->parentTid);
+ $result = $qryBuilder->getQuery()->getArrayResult();
+ $this->orderReference = !empty($result) ? $result[0] : $result;
+ if (empty($this->orderReference)) {
+ $this->orderReference['eventOrderNo'] = $orderNo;
+ $this->handleCommunicationFailure();
+ return true;
+ }
+ $this->orderReference['eventOrderNo'] = $orderNo;
+ }
+ return false;
+ }
+
+ /**
+ * Handle Communication Failure
+ * @return null
+ */
+ public function handleCommunicationFailure()
+ {
+ #handle success transaction
+ if (! empty($this->eventData['result']['status']) && $this->eventData['result']['status'] == 'SUCCESS') {
+ $this->novalnetHelper->completeNovalnetOrder(
+ $this->eventData,
+ $this->paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ $this->novalnetHelper->setOrderStatus($this->eventData['transaction']['status'], $this->paymentTransaction);
+ }
+ }
+
+ /**
+ * Validate Checksum
+ *
+ * @param string $paymentAccessKey
+ * @return null
+ */
+ protected function validateChecksum($paymentAccessKey)
+ {
+ $token = $this->eventData['event']['tid'] . $this->eventData['event']['type'] .
+ $this->eventData['result']['status'];
+
+ if (isset($this->eventData ['transaction'] ['amount'])) {
+ $token .= $this->eventData ['transaction'] ['amount'];
+ }
+ if (isset($this->eventData ['transaction'] ['currency'])) {
+ $token .= $this->eventData ['transaction'] ['currency'];
+ }
+ if (! empty($paymentAccessKey)) {
+ $token .= strrev($paymentAccessKey);
+ }
+
+ $generatedChecksum = hash('sha256', $token);
+
+ if ( $generatedChecksum !== $this->eventData ['event'] ['checksum'] ) {
+ return 'While notifying some data has been changed. The hash check failed';
+ }
+
+ // Set Event data.
+ $this->eventType = $this->eventData ['event'] ['type'];
+ $this->eventTid = $this->eventData ['event'] ['tid'];
+ $this->parentTid = $this->eventTid;
+ if (! empty($this->eventData ['event'] ['parent_tid'])) {
+ $this->parentTid = $this->eventData ['event'] ['parent_tid'];
+ }
+ }
+
+
+ /**
+ * Log the error message
+ *
+ * @param string $errorMsg
+ * @return null
+ */
+ protected function debugMessage($errorMsg)
+ {
+ $errorMsg = 'message=' . $errorMsg;
+ $this->logger->info($errorMsg);
+ return;
+ }
+
+
+ /**
+ * Set the Payment Status
+ *
+ * @param string $status
+ * @return null
+ */
+ protected function setPaymentStatus($status)
+ {
+ if ($status == 'full') {
+ $this->paymentTransaction
+ ->setSuccessful(true)
+ ->setActive(false);
+ } elseif ($status == 'canceled') {
+ $this->paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(false);
+ } elseif ($status == 'pending') {
+ $this->paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+ }
+ }
+
+ protected function prepareMailContent($type) {
+ $orderDetailsEntity = $this->doctrineHelper->getEntity(
+ $this->paymentTransaction->getEntityClass(),
+ $this->paymentTransaction->getEntityIdentifier()
+ );
+ $customerName = $orderDetailsEntity->getBillingAddress()->getFirstName() . ' ' .$orderDetailsEntity->getBillingAddress()->getLastName();
+ $customerMail = $orderDetailsEntity->getCustomerUser()->getEmail();
+
+ $orderNo = $this->event_data['transaction']['order_no'];
+ $store = $orderDetailsEntity->getWebsite();
+
+ $content = '';
+ if($type == 'instalment') {
+ $subject = "Instalment confirmation at $store order no: $orderNo";
+ $header = "Hello, $customerName!
";
+ $content = "The next instalment cycle have arrived for the instalment order $orderNo placed at the " . $store .", kindly refer further details below
";
+ }
+ else {
+ $header = "
Hello, $customerName!
";
+ $subject = "Order confirmation at $store order no: $orderNo";
+ }
+ $content .= str_replace('|', '
', $this->customerNotes);
+
+ $mailBody = "";
+
+ $email = new Email();
+ $sender = $this->oroGlobalConfig->get('oro_notification.email_notification_sender_email');
+ $email->setFrom($sender);
+ $email->setTo([$customerMail]);
+ $email->setSubject($subject);
+ $email->setType('html');
+ $email->setBody($mailBody);
+ $email->setOrganization($orderDetailsEntity->getCustomerUser()->getOrganization());
+ try {
+ $this->emailModelSender->send($email);
+ } catch (\Swift_SwiftException $exception) {
+ self::debugMessage('unable to send email');
+ }
+ }
+}
diff --git a/PaymentMethod/NovalnetCashpaymentPaymentMethod.php b/PaymentMethod/NovalnetCashpaymentPaymentMethod.php
new file mode 100755
index 0000000..7e15568
--- /dev/null
+++ b/PaymentMethod/NovalnetCashpaymentPaymentMethod.php
@@ -0,0 +1,72 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100') {
+ $novalnetResponse['nnSuccess'] = true;
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetCreditCardPaymentMethod.php b/PaymentMethod/NovalnetCreditCardPaymentMethod.php
new file mode 100755
index 0000000..c8ca373
--- /dev/null
+++ b/PaymentMethod/NovalnetCreditCardPaymentMethod.php
@@ -0,0 +1,99 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $additionalData = $this->novalnetHelper->getAdditionalPaymentData($paymentTransaction);
+
+ if ($additionalData['ccToken']) {
+ $params['transaction']['payment_data'] = ['token' => $additionalData['ccToken']];
+ } else {
+ $params['transaction']['payment_data'] = [
+ 'pan_hash' => $additionalData['panHash'],
+ 'unique_id' => $additionalData['uniqueId']
+ ];
+
+ if ($additionalData['doRedirect'] == 1) {
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ if ($this->config->getCcEnforce3d() == true) {
+ $params['transaction']['payment_data']['enforce_3d'] = 1;
+ }
+ }
+ if ($additionalData['saveCardDetails'] == true) {
+ $params['transaction']['create_token'] = 1;
+ }
+ }
+
+
+ $paymentUrl = $this->novalnetHelper->getPaymentUrl($this->config, $params['transaction']['amount']);
+
+ $paymentTransaction->setRequest($params);
+
+ $response = $this->client->send($this->config->getPaymentAccessKey(), $params, $paymentUrl);
+
+ if ($response['result']['status_code'] == '100') {
+ $novalnetResponse['nnSuccess'] = true;
+ if ($response['result']['redirect_url']) {
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ }
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetEpsPaymentMethod.php b/PaymentMethod/NovalnetEpsPaymentMethod.php
new file mode 100755
index 0000000..ce4e972
--- /dev/null
+++ b/PaymentMethod/NovalnetEpsPaymentMethod.php
@@ -0,0 +1,67 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetGiropayPaymentMethod.php b/PaymentMethod/NovalnetGiropayPaymentMethod.php
new file mode 100755
index 0000000..ae0ff14
--- /dev/null
+++ b/PaymentMethod/NovalnetGiropayPaymentMethod.php
@@ -0,0 +1,67 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetGuaranteedInvoicePaymentMethod.php b/PaymentMethod/NovalnetGuaranteedInvoicePaymentMethod.php
new file mode 100755
index 0000000..5f87f99
--- /dev/null
+++ b/PaymentMethod/NovalnetGuaranteedInvoicePaymentMethod.php
@@ -0,0 +1,84 @@
+novalnetHelper->checkMerchantData($this->config);
+
+ if (!$isValid) {
+ return false;
+ }
+
+ $enabledPayments = $this->novalnetHelper->getEnabledPayments($this->paymentMethodProvider, $context);
+
+ $paymentCode = $this->getPaymentCode();
+
+ if (in_array($paymentCode, $enabledPayments)
+ && in_array('novalnet_invoice', $enabledPayments)) {
+ $minAmount = $this->config->getMinAmount() ? $this->config->getMinAmount() : 999;
+ return $this->novalnetHelper->checkGuaranteePayment($context, $minAmount);
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $params['customer']['billing']['company'] = $this->novalnetHelper->getCompany($order);
+
+ $paymentUrl = $this->novalnetHelper->getPaymentUrl($this->config, $params['transaction']['amount']);
+ $response = $this->client->send($this->config->getPaymentAccessKey(), $params, $paymentUrl);
+
+ if ($response['result']['status_code'] == '100') {
+ $novalnetResponse['nnSuccess'] = true;
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetGuaranteedSepaPaymentMethod.php b/PaymentMethod/NovalnetGuaranteedSepaPaymentMethod.php
new file mode 100755
index 0000000..7ab3cbc
--- /dev/null
+++ b/PaymentMethod/NovalnetGuaranteedSepaPaymentMethod.php
@@ -0,0 +1,100 @@
+novalnetHelper->checkMerchantData($this->config);
+
+ if (!$isValid) {
+ return false;
+ }
+
+ $enabledPayments = $this->novalnetHelper->getEnabledPayments($this->paymentMethodProvider, $context);
+
+ $paymentCode = $this->getPaymentCode();
+
+ if (in_array('novalnet_guaranteed_sepa', $enabledPayments) && in_array($paymentCode, $enabledPayments)) {
+ $minAmount = $this->config->getMinAmount() ? $this->config->getMinAmount() : 999;
+ return $this->novalnetHelper->checkGuaranteePayment($context, $minAmount);
+ }
+
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $params['customer']['billing']['company'] = $this->novalnetHelper->getCompany($order);
+
+
+ $additionalData = $this->novalnetHelper->getAdditionalPaymentData($paymentTransaction);
+
+ if ($additionalData['sepaToken']) {
+ $params['transaction']['payment_data'] = ['token' => $additionalData['sepaToken']];
+ } else {
+ $params['transaction']['payment_data'] = [
+ 'iban' => $additionalData['sepaIban']
+ ];
+ if ($additionalData['sepaSaveAccountDetails'] == true) {
+ $params['transaction']['create_token'] = 1;
+ }
+ }
+
+ $paymentTransaction->setRequest($params);
+
+ $paymentUrl = $this->novalnetHelper->getPaymentUrl($this->config, $params['transaction']['amount']);
+ $response = $this->client->send($this->config->getPaymentAccessKey(), $params, $paymentUrl);
+
+ if ($response['result']['status_code'] == '100') {
+ $novalnetResponse['nnSuccess'] = true;
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetHelper.php b/PaymentMethod/NovalnetHelper.php
new file mode 100755
index 0000000..88d9735
--- /dev/null
+++ b/PaymentMethod/NovalnetHelper.php
@@ -0,0 +1,844 @@
+ $config->getProductActivationKey(),
+ 'tariff' => $config->getTariff()
+ ];
+
+ $lang = $userLocalizationManager->getCurrentLocalizationByCustomerUser($order->getCustomerUser())
+ ->getLanguage()->getCode();
+
+ $this->getCustomerParams($order, $data, $request);
+ $this->getTransactionParams($order, $data, $paymentTransaction, $config, $router, $request);
+
+ $data['custom'] = [
+ 'lang' => strtoupper($lang),
+ ];
+ return $data;
+ }
+
+ public function getCartParams($order, &$data) {
+
+ $data['cart_info']['items_shipping_price'] = sprintf('%0.0f', $order->getShippingCost()->getValue() * 100);
+ $data['cart_info']['items_tax_price'] = $data['transaction']['amount'];
+
+ foreach ($order->getLineItems() as $lineItem) {
+ $productDetails = [
+ 'name' => $lineItem->getProductName(),
+ 'quantity' => $lineItem->getQuantity(),
+ 'price' => sprintf('%0.0f', ($lineItem->getPrice()->getValue() * 100) * $lineItem->getQuantity()),
+ ];
+ $data['cart_info']['line_items'][] = $productDetails;
+ }
+
+ $totalDiscountAmount = 0.0;
+ $totalDiscountCount = 0;
+ foreach ($order->getAppliedPromotions() as $appliedPromotion) {
+ $discountAmount = 0.0;
+ foreach ($appliedPromotion->getAppliedDiscounts() as $appliedDiscount) {
+ $discountAmount += $appliedDiscount->getAmount();
+ $totalDiscountCount++;
+ }
+ $totalDiscountAmount += $discountAmount;
+ }
+
+ if($totalDiscountAmount) {
+ $data['cart_info']['line_items'][] = [
+ 'name' => 'Discount',
+ 'quantity' => $totalDiscountCount,
+ 'price' => sprintf('%0.0f', -1*($totalDiscountAmount * 100)),
+ ];
+ }
+ }
+
+ /**
+ * Get Transaction information
+ *
+ * @param $order
+ * @param $data
+ * @param $paymentTransaction
+ * @param $config
+ * @param $router
+ * @return null
+ */
+ public function getTransactionParams($order, &$data, $paymentTransaction, $config, $router, $request)
+ {
+ $paymentCode = preg_replace('/_[0-9]{1,}$/', '', $paymentTransaction->getPaymentMethod());
+ $amount = sprintf('%0.2f', $order->getTotal()) * 100;
+ $data['transaction'] = [
+ 'payment_type' => $this->getPaymentType($paymentCode),
+ 'amount' => $amount,
+ 'currency' => $order->getCurrency(),
+ 'test_mode' => (int) $config->getTestMode(),
+ 'order_no' => $order->getId(),
+ 'hook_url' => $this->createUrl(
+ $router,
+ 'oro_payment_callback_notify',
+ ['accessIdentifier' => $paymentTransaction->getAccessIdentifier(),
+ 'accessToken' => $paymentTransaction->getAccessToken()]
+ ),
+ 'system_name' => 'orocommerce',
+ 'system_version' => 'NN12.0.1',
+ 'system_ip' => self::getIp($request, 'SERVER_ADDR'),
+ ];
+ $dueDatePayments = ['novalnet_sepa', 'novalnet_invoice',
+ 'novalnet_instalment_sepa', 'novalnet_guaranteed_sepa', 'novalnet_prepayment', 'novalnet_cashpayment'];
+
+ if (in_array($paymentCode, $dueDatePayments) && $config->getDuedate()) {
+ $data['transaction']['due_date'] = date('Y-m-d', strtotime('+' . $config->getDuedate() . 'days'));
+ }
+ }
+
+ /**
+ * Get end-customer informations
+ *
+ * @param object $order
+ * @param array $data
+ * @param object $request
+ * @return null
+ */
+ public function getCustomerParams($order, &$data, $request)
+ {
+ $data['customer'] = [
+ 'first_name' => $order->getBillingAddress()->getFirstName(),
+ 'last_name' => $order->getBillingAddress()->getLastName(),
+ 'email' => $order->getCustomerUser()->getEmail(),
+ 'customer_no' => $order->getCustomerUser()->getId(),
+ 'customer_ip' => self::getIp($request)
+ ];
+
+ if(!empty($order->getCustomerUser()->getBirthday())) {
+ $data['customer']['birth_date'] = $order->getCustomerUser()->getBirthday()->format('Y-m-d');
+ }
+
+ if(!empty($order->getBillingAddress()->getPhone())) {
+ $data['customer']['tel'] = $order->getBillingAddress()->getPhone();
+ }
+
+ $data['customer']['billing'] = [
+ 'street' => $order->getBillingAddress()->getstreet() . $order->getBillingAddress()->getstreet2(),
+ 'city' => $order->getBillingAddress()->getCity(),
+ 'state' => $order->getBillingAddress()->getRegion()->getName(),
+ 'zip' => $order->getBillingAddress()->getPostalCode(),
+ 'country_code' => $order->getBillingAddress()->getCountryIso2()
+ ];
+
+ $data['customer']['shipping'] = [
+ 'street' => $order->getShippingAddress()->getstreet() . $order->getShippingAddress()->getstreet2(),
+ 'city' => $order->getShippingAddress()->getCity(),
+ 'state' => $order->getShippingAddress()->getRegion()->getName(),
+ 'zip' => $order->getShippingAddress()->getPostalCode(),
+ 'country_code' => $order->getShippingAddress()->getCountryIso2()
+ ];
+
+ if ($order->getShippingAddress()->getOrganization()) {
+ $data['customer']['shipping']['company'] = $order->getShippingAddress()->getOrganization();
+ }
+ if ($order->getBillingAddress()->getOrganization()) {
+ $data['customer']['billing']['company'] = $order->getBillingAddress()->getOrganization();
+ }
+ if ($data['customer']['billing'] == $data['customer']['shipping']) {
+ $data['customer']['shipping'] = [
+ 'same_as_billing' => 1
+ ];
+ } else {
+ $data['customer']['shipping']['first_name'] = $order->getShippingAddress()->getFirstName();
+ $data['customer']['shipping']['last_name'] = $order->getShippingAddress()->getLastName();
+ $data['customer']['shipping']['email'] = $order->getCustomerUser()->getEmail();
+ $data['customer']['shipping']['tel'] = $order->getShippingAddress()->getPhone();
+ }
+ }
+
+
+ /**
+ * Get Redirect Payment Params
+ *
+ * @param $data
+ * @param $router
+ * @param $paymentTransaction
+ */
+ public function getRedirectParams(&$data, $router, $paymentTransaction)
+ {
+ $data['transaction']['return_url'] = $this->createUrl(
+ $router,
+ 'oro_payment_callback_return',
+ ['accessIdentifier' => $paymentTransaction->getAccessIdentifier()]
+ );
+ $data['transaction']['error_return_url'] = $this->createUrl(
+ $router,
+ 'oro_payment_callback_error',
+ ['accessIdentifier' => $paymentTransaction->getAccessIdentifier()]
+ );
+ }
+
+ /**
+ * Create url
+ *
+ * @param object $router
+ * @param string $name
+ * @param array $parameterAry
+ * @return string
+ */
+ public function createUrl($router, $name, $parameterAry)
+ {
+ $redirectUrl = $router->generate(
+ $name,
+ $parameterAry,
+ UrlGeneratorInterface::ABSOLUTE_URL
+ );
+ return $redirectUrl;
+ }
+
+ /**
+ * Get the customer remote address
+ *
+ * @param object $request
+ * @return string
+ */
+ public function getIp($request, $type = 'REMOTE_ADDR')
+ {
+ $ipAddress = $request->server->get($type);
+
+ // Check for valid IP.
+ if ('REMOTE_ADDR' === $type && filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
+ $ipAddress = '127.0.0.1';
+ }
+
+ return $ipAddress;
+ }
+
+
+ /**
+ * Save transaction details in novalnet transaction detail table
+ *
+ * @param object $doctrineHelper
+ * @param array $data
+ * @return null
+ */
+ public function insertNovalnetTransactionDetails($data, $doctrineHelper)
+ {
+ $em = $doctrineHelper->getEntityManager('NovalnetBundle:NovalnetTransactionDetails');
+ $nnTransactionDetails = new NovalnetTransactionDetails();
+ $nnTransactionDetails->setTid($data['tid']);
+ $nnTransactionDetails->setTestMode($data['test_mode']);
+ $nnTransactionDetails->setStatus($data['status']);
+ $nnTransactionDetails->setPaymentType($data['payment_type']);
+ $nnTransactionDetails->setAmount($data['amount']);
+ $nnTransactionDetails->setOrderNo($data['order_no']);
+ $nnTransactionDetails->setCurrency($data['currency']);
+ $nnTransactionDetails->setCustomerNo($data['customer_id']);
+ $nnTransactionDetails->setToken($data['token']);
+ $nnTransactionDetails->setPaymentData($data['payment_data']);
+ $nnTransactionDetails->setOneclick($data['oneclick']);
+ $nnTransactionDetails->setAdditionalInfo($data['additional_info']);
+ $nnTransactionDetails->setRefundedAmount(0);
+ $em->persist($nnTransactionDetails);
+ $em->flush();
+ }
+
+ /**
+ * Complete order
+ *
+ * @param array $response
+ * @return array
+ */
+ protected function getPaymentData($response)
+ {
+ $paymentData = [];
+ if (in_array(
+ $response['transaction']['payment_type'],
+ ['DIRECT_DEBIT_SEPA', 'GUARANTEED_DIRECT_DEBIT_SEPA', 'INSTALMENT_DIRECT_DEBIT_SEPA']
+ )) {
+ $paymentData = ['iban' => $response['transaction']['payment_data']['iban']];
+ } elseif ($response['transaction']['payment_type'] == 'PAYPAL'
+ && $response['transaction']['status'] != 'ON_HOLD') {
+ $paymentData = ['paypal_account' => $response['transaction']['payment_data']['paypal_account']];
+ } elseif ($response['transaction']['payment_type'] == 'CREDITCARD') {
+ $paymentData = $response['transaction']['payment_data'];
+ unset($paymentData['token']);
+ }
+
+ return $paymentData;
+ }
+
+ /**
+ * Complete order
+ *
+ * @param $response
+ * @param $paymentTransaction
+ * @param $translator
+ * @param $doctrineHelper
+ * @return null
+ */
+ public function completeNovalnetOrder($response, $paymentTransaction, $translator, $doctrineHelper)
+ {
+ $request = $paymentTransaction->getRequest();
+ $paymentData = [];
+ $oneclick = 0;
+
+ if ($request['transaction']['create_token']) {
+ $paymentData = $this->getPaymentData($response);
+ $oneclick = 1;
+ }
+
+ if(isset($response['instalment']) && $response['transaction']['status'] == 'CONFIRMED') {
+ $response['instalment'][$response['instalment']['cycles_executed']] = ['tid' => $response['transaction']['tid']];
+ $response['instalment']['formatted_cycle_amount'] = sprintf('%0.2f', $response['instalment']['cycle_amount']/100);
+ }
+
+ $transactionTableValues = [
+ 'tid' => $response['transaction']['tid'],
+ 'status' => $response['transaction']['status'],
+ 'test_mode' => $response['transaction']['test_mode'],
+ 'payment_type' => $response['transaction']['payment_type'],
+ 'amount' => $response['transaction']['amount'],
+ 'currency' => $response['transaction']['currency'],
+ 'customer_id' => $response['customer']['customer_no'],
+ 'order_no' => $response['transaction']['order_no'],
+ 'due_date' => $response['transaction']['due_date']
+ ? $response['transaction']['due_date'] : null,
+ 'token' => $response['transaction']['payment_data']['token']
+ ? $response['transaction']['payment_data']['token'] : null,
+ 'payment_data' => ($paymentData) ? json_encode($paymentData) : null,
+ 'oneclick' => $oneclick,
+ 'additional_info' => isset($response['instalment']) ? json_encode($response['instalment']) : null,
+ ];
+
+ $this->insertNovalnetTransactionDetails($transactionTableValues, $doctrineHelper);
+
+ $this->setPaymentComments(
+ $response,
+ $paymentTransaction,
+ $doctrineHelper,
+ $translator
+ );
+ }
+
+
+ /**
+ * Set Payment comments based on payment type
+ *
+ * @param $response
+ * @param $paymentTransaction
+ * @param $doctrineHelper
+ * @param $translator
+ * @return null
+ */
+ public function setPaymentComments($response, $paymentTransaction, $doctrineHelper, $translator)
+ {
+ $newLine = ' | ';
+ $comments = $translator->trans('novalnet.payment_comment') . $newLine;
+
+ $comments = $translator->trans('novalnet.payment_name_' .
+ strtolower($response['transaction']['payment_type'])). $newLine;
+
+ $comments .= $translator->trans('novalnet.transaction_id') . $response['transaction']['tid'] . $newLine;
+
+ if ($response['transaction']['test_mode'] == 1) { // If test transaction
+ $comments .= $translator->trans('novalnet.test_order') . $newLine;
+ }
+
+ // get payment comments
+ $comments .= self::prepareComments($response, $translator);
+
+ $order = $doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+
+ $this->updateOrderComments($order, $doctrineHelper, $comments);
+ }
+
+
+ /**
+ * Update Order Comments
+ *
+ * @param $order
+ * @param $doctrineHelper
+ * @param $comments
+ * @return null
+ */
+ public function updateOrderComments($order, $doctrineHelper, $comments)
+ {
+ $customerNotes = ($order->getCustomerNotes())
+ ? $order->getCustomerNotes() . " | " . $comments : $comments;
+
+ $order->setCustomerNotes($customerNotes);
+ $entityManager = $doctrineHelper->getEntityManager('OroOrderBundle:Order');
+ $entityManager->persist($order);
+ $entityManager->flush($order);
+ }
+
+ /**
+ * Prepare payment status
+ *
+ * @param array $data
+ * @param object $translator
+ * @return string
+ */
+ public function prepareComments($data, $translator)
+ {
+ $newLine = ' | ';
+ $callbackComments = '';
+ if (in_array($data['transaction']['payment_type'], ['GUARANTEED_DIRECT_DEBIT_SEPA', 'GUARANTEED_INVOICE', 'INSTALMENT_INVOICE', 'INSTALMENT_DIRECT_DEBIT_SEPA']) && $data['transaction']['status'] == 'PENDING') {
+ $callbackComments .= in_array($data['transaction']['payment_type'], ['GUARANTEED_INVOICE', 'INSTALMENT_INVOICE'])
+ ? $translator->trans('novalnet.invoice_guarantee_comment')
+ : $translator->trans('novalnet.sepa_guarantee_comment');
+ }
+
+ if ((in_array($data['transaction']['payment_type'], ['INVOICE', 'PREPAYMENT'])
+ || (in_array($data['transaction']['payment_type'], ['GUARANTEED_INVOICE', 'INSTALMENT_INVOICE'])
+ && $data['transaction']['status'] != 'PENDING')) && isset($data['transaction']['bank_details'])) {
+ self::prepareInvoiceComments($translator, $callbackComments, $data);
+ } elseif ($data['transaction']['payment_type'] == 'CASHPAYMENT') {
+ self::prepareCashpaymentComments($translator, $callbackComments, $data);
+ } elseif ($data['transaction']['payment_type'] == 'MULTIBANCO') {
+ self::prepareMultibancoComments($translator, $callbackComments, $data);
+ }
+ return $callbackComments;
+ }
+
+
+
+ /**
+ * Prepare Invoice Payment comments
+ *
+ * @param object $translator
+ * @param string $callbackComments
+ * @param array $data
+ * @return string
+ */
+ protected function prepareInvoiceComments($translator, &$callbackComments, $response)
+ {
+ $newLine = ' | ';
+ $formattedAmount = $this->amountFormat($response['transaction']['amount']) . ' ' . $response['transaction']['currency'];
+ $comment = sprintf($translator->trans('novalnet.amount_transfer'), $formattedAmount) . $newLine;
+
+ if (!empty($response['transaction']['due_date']) && $response['transaction']['status'] != 'ON_HOLD') {
+ $comment = sprintf($translator->trans('novalnet.amount_transfer_duedate'), $formattedAmount, date('d.m.Y', strtotime($response['transaction']['due_date']))) . $newLine;
+ }
+ $callbackComments .= $comment;
+ $callbackComments .= sprintf(
+ $translator->trans('novalnet.invoice_account_holder'),
+ (isset($response['transaction']['bank_details']['account_holder'])
+ ? $response['transaction']['bank_details']['account_holder'] : '')
+ ) . $newLine;
+ $callbackComments .= 'IBAN:' . (isset($response['transaction']['bank_details']['iban'])
+ ? $response['transaction']['bank_details']['iban'] : '') . $newLine;
+ $callbackComments .= 'BIC:' . (isset($response['transaction']['bank_details']['bic'])
+ ? $response['transaction']['bank_details']['bic'] : '') . $newLine;
+ $callbackComments .= 'Bank:' . (isset($response['transaction']['bank_details']['bank_name'])
+ ? $response['transaction']['bank_details']['bank_name'] : '') . $newLine;
+ $callbackComments .= $translator->trans('novalnet.invoice_ref_comment') . $newLine;
+ $callbackComments .= sprintf($translator->trans('novalnet.payment_ref'), '1') . ' ' .
+ $response['transaction']['tid'] . $newLine;
+ $callbackComments .= sprintf($translator->trans('novalnet.payment_ref'), '2') . ' ' .
+ (isset($response['transaction']['invoice_ref']) ? $response['transaction']['invoice_ref'] : '');
+ }
+
+ /**
+ * Prepare Cashpayment comments
+ *
+ * @param object $translator
+ * @param string $callbackComments
+ * @param array $data
+ * @return string
+ */
+ protected function prepareCashpaymentComments($translator, &$callbackComments, $response)
+ {
+ $newLine = ' | ';
+ if (!empty($response['transaction']['due_date'])) {
+ $callbackComments .= sprintf(
+ $translator->trans('novalnet.slip_expiry_date'),
+ date('d.m.Y', strtotime($response['transaction']['due_date']))
+ ) . $newLine;
+ }
+ $callbackComments .= $translator->trans('novalnet.cashpayment_store') . $newLine;
+
+ $data = json_decode(json_encode($response['transaction']['nearest_stores']), true);
+
+ $nearestStoreCounts = count($data);
+
+ for ($i = 1; $i <= $nearestStoreCounts; $i++) {
+ $callbackComments .= $data[$i]['store_name'] . ', ';
+ $callbackComments .= $data[$i]['street'] . ', ';
+ $callbackComments .= $data[$i]['city'] . ', ';
+ $callbackComments .= $data[$i]['zip'] . ', ';
+ $callbackComments .= $data[$i]['country_code'];
+ $callbackComments .= ' | ';
+ }
+ return $callbackComments;
+ }
+
+ /**
+ * Prepare Multibanco payment comments
+ *
+ * @param $translator
+ * @param $callbackComments
+ * @param $response
+ * @return null
+ */
+ protected function prepareMultibancoComments($translator, &$callbackComments, $response)
+ {
+ $newLine = ' | ';
+ $callbackComments .= $translator->trans('novalnet.multibanco_comment') . $newLine;
+ $callbackComments .= sprintf(
+ $translator->trans('novalnet.multibanco_reference'),
+ $response['transaction']['partner_payment_reference']
+ ) . $newLine;
+ $callbackComments .= sprintf(
+ $translator->trans('novalnet.multibanco_reference_entity'),
+ $response['transaction']['service_supplier_id']
+ ) . $newLine;
+ }
+
+ /**
+ * Check guarantee payment requirements
+ * @param object $order
+ * @param object $config
+ * @return boolean
+ */
+ public function checkGuaranteePayment($order, $minAmount)
+ {
+ $amount = sprintf('%0.2f', $order->getTotal()) * 100;
+
+ if ($this->isEuropeanUnionCountry($order->getBillingAddress()->getCountryIso2())
+ && (self::checkShippingBillingAddress($order))
+ && $amount >= $minAmount && $order->getCurrency() == 'EUR') {
+ return true;
+ }
+ return false;
+ }
+
+
+ /**
+ * Check european country
+ *
+ * @param $countryCode
+ * @return bool
+ */
+ public function isEuropeanUnionCountry($countryCode)
+ {
+ $europeanUnionCountryCodes = [
+ 'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK',
+ 'EE', 'FI', 'FR', 'DE', 'EL', 'HU', 'IE',
+ 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL',
+ 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'UK', 'CH'
+ ];
+
+ return in_array($countryCode, $europeanUnionCountryCodes);
+ }
+
+
+ /**
+ * check billing shipping address
+ *
+ * @param $order
+ * @return bool
+ */
+ public function checkShippingBillingAddress($order)
+ {
+ $billingAddress = [
+ $order->getBillingAddress()->getstreet(),
+ $order->getBillingAddress()->getCity(),
+ $order->getBillingAddress()->getPostalCode(),
+ $order->getBillingAddress()->getCountryIso2()
+ ];
+ $shippingAddress = [
+ $order->getShippingAddress()->getstreet(),
+ $order->getShippingAddress()->getCity(),
+ $order->getShippingAddress()->getPostalCode(),
+ $order->getShippingAddress()->getCountryIso2()
+ ];
+
+ return ($billingAddress === $shippingAddress);
+ }
+
+
+ /**
+ * Get Guarantee Payment Error Message
+ *
+ * @param $order
+ * @param $minAmount
+ * @param $translator
+ * @return string
+ */
+ public function getGuaranteeErrorMsg($order, $minAmount, $translator)
+ {
+ $guaranteeError = $translator->trans('novalnet.guarantee_error_msg') . "
";
+ $errorMsg = '';
+ $amount = sprintf('%0.2f', $order->getTotal()) * 100;
+
+ $minAmount = ($minAmount) ? $minAmount : 999;
+
+ if (!($amount >= $minAmount)) {
+ $errorMsg .= sprintf($translator->trans('novalnet.guarantee_error_msg_amount'), $minAmount);
+ }
+ if (!$this->isEuropeanUnionCountry($order->getBillingAddress()->getCountryIso2())) {
+ $errorMsg .= $translator->trans('novalnet.guarantee_error_msg_country');
+ }
+ if (!self::checkShippingBillingAddress($order)) {
+ $errorMsg .= $translator->trans('novalnet.guarantee_error_msg_address');
+ }
+ if ($order->getCurrency() != 'EUR') {
+ $errorMsg .= $translator->trans('novalnet.guarantee_error_msg_currency');
+ }
+
+ $errorMsg = $errorMsg ? $guaranteeError . $errorMsg : $errorMsg;
+ return $errorMsg;
+ }
+
+ /**
+ * Get Company name
+ * @param object $order
+ * @return string
+ */
+ public function getCompany($order)
+ {
+ $company = (trim($order->getBillingAddress()->getOrganization()))
+ ? trim($order->getBillingAddress()->getOrganization())
+ : ($order->getCustomerUser()->getCustomer()->getName()
+ ? $order->getCustomerUser()->getCustomer()->getName() : '');
+ return $company;
+ }
+
+ /**
+ * Get Payment Type
+ * @param $paymentCode
+ * @return string
+ */
+ public function getPaymentType($paymentCode)
+ {
+ $paymentDetails = [
+ 'novalnet_credit_card' => 'CREDITCARD',
+ 'novalnet_sepa' => 'DIRECT_DEBIT_SEPA',
+ 'novalnet_prepayment' => 'PREPAYMENT',
+ 'novalnet_invoice' => 'INVOICE',
+ 'novalnet_banktransfer' => 'ONLINE_TRANSFER',
+ 'novalnet_paypal'=> 'PAYPAL',
+ 'novalnet_ideal' => 'IDEAL',
+ 'novalnet_alipay' => 'ALIPAY',
+ 'novalnet_wechatpay' => 'WECHATPAY',
+ 'novalnet_onlinebanktransfer' => 'ONLINE_BANK_TRANSFER',
+ 'novalnet_trustly' => 'TRUSTLY',
+ 'novalnet_eps' => 'EPS',
+ 'novalnet_cashpayment' => 'CASHPAYMENT',
+ 'novalnet_giropay' => 'GIROPAY',
+ 'novalnet_przelewy' => 'PRZELEWY24',
+ 'novalnet_postfinance' => 'POSTFINANCE',
+ 'novalnet_postfinance_card' => 'POSTFINANCE_CARD',
+ 'novalnet_bancontact' => 'BANCONTACT',
+ 'novalnet_multibanco' => 'MULTIBANCO',
+ 'novalnet_instalment_invoice' => 'INSTALMENT_INVOICE',
+ 'novalnet_instalment_sepa' => 'INSTALMENT_DIRECT_DEBIT_SEPA',
+ 'novalnet_guaranteed_sepa' => 'GUARANTEED_DIRECT_DEBIT_SEPA',
+ 'novalnet_guaranteed_invoice' => 'GUARANTEED_INVOICE',
+ ];
+
+ return $paymentDetails[$paymentCode];
+ }
+
+ /**
+ * Check instalment payment conditions
+ *
+ * @param $cycles
+ * @param $orderAmount
+ * @return bool
+ */
+ public function checkInstalment($cycles, $orderAmount)
+ {
+ if(!empty($cycles)) {
+ $cycles = json_decode($cycles[0]);
+ $min = min(array_values($cycles));
+ $instalmentAmount = $orderAmount / $min;
+ if (($instalmentAmount) >= 999) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Get Addition Payment Data(payment form data)
+ *
+ * @param $paymentTransaction
+ * @return mixed
+ * @throws \ErrorException
+ * @throws \LogicException
+ */
+ public function getAdditionalPaymentData($paymentTransaction)
+ {
+ $transactionOptions = $paymentTransaction->getTransactionOptions();
+
+ if (!array_key_exists('additionalData', $transactionOptions)) {
+ throw new \ErrorException('Additional data was not found in transaction options');
+ }
+
+ $additionalData = json_decode($transactionOptions['additionalData'], true);
+ if (!is_array($additionalData)) {
+ throw new \LogicException('Additional data could not be decoded');
+ }
+
+ return $additionalData;
+ }
+
+ /**
+ * Get Enabled payments
+ *
+ * @param $paymentMethodProvider
+ * @param $context
+ * @return array
+ */
+ public function getEnabledPayments($paymentMethodProvider, $context)
+ {
+ $paymentMethodsConfigsRules = $paymentMethodProvider
+ ->getPaymentMethodsConfigsRules($context);
+
+ $paymentMethods = [[]];
+ foreach ($paymentMethodsConfigsRules as $paymentMethodsConfigsRule) {
+ $paymentCodes = [];
+
+ foreach ($paymentMethodsConfigsRule->getMethodConfigs() as $methodConfig) {
+ $paymentCode = preg_replace('/_[0-9]{1,}$/', '', $methodConfig->getType());
+ $paymentCodes[] = $paymentCode;
+ }
+ $paymentMethods[] = $paymentCodes;
+ }
+ return array_merge(...$paymentMethods);
+ }
+
+ /**
+ * Get Novalnet Payport Url
+ *
+ * @param $config
+ * @param $orderAmount
+ * @return string
+ */
+ public function getPaymentUrl($config, $orderAmount)
+ {
+ $minAmount = $config->getOnholdAmount();
+ if ($config->getPaymentAction() == 'authorize' && ($orderAmount >= $minAmount || empty($minAmount))) {
+ return "https://payport.novalnet.de/v2/authorize";
+ }
+ return "https://payport.novalnet.de/v2/payment";
+ }
+
+ /**
+ * Get saved payment details
+ *
+ * @param $doctrine
+ * @param $paymentType
+ * @param $customerId
+ * @return array
+ */
+ public function getSavedAccountDetails($doctrine, $paymentType, $customerId)
+ {
+ $repository = $doctrine->getRepository(NovalnetTransactionDetails::class);
+ $status = ['ON_HOLD', 'PENDING', 'DEACTIVATED', 'CONFIRMED'];
+
+ if ($paymentType == 'PAYPAL') {
+ unset($status[0]);
+ }
+
+ $qryBuilder = $repository->createQueryBuilder('nn')
+ ->select('nn.id, nn.token, nn.paymentData')
+ ->where('nn.customerNo = :customer_no')
+ ->andWhere('nn.paymentType = :payment_type')
+ ->andWhere('nn.token IS NOT NULL')
+ ->andWhere('nn.status IN (:status)')
+ ->andWhere('nn.paymentData IS NOT NULL')
+ ->andWhere('nn.oneclick = :oneclick')
+ ->setParameter('customer_no', (string) $customerId)
+ ->setParameter('payment_type', $paymentType)
+ ->setParameter('status', $status)
+ ->setParameter('oneclick', true)
+ ->orderBy('nn.id', 'DESC');
+
+ $accountDetails = $qryBuilder->getQuery()->getArrayResult();
+
+ $maskedData = [];
+ $paymentData = [];
+ foreach ($accountDetails as $key => $value) {
+
+ if(in_array($accountDetails[$key]['paymentData'], $paymentData)) {
+ continue;
+ }
+
+ $maskedData[] = array_merge(['id' => $accountDetails[$key]['id'],
+ 'token' => $accountDetails[$key]['token']], (array) json_decode($accountDetails[$key]['paymentData']));
+ array_push($paymentData, $accountDetails[$key]['paymentData']);
+
+ }
+ return $maskedData;
+ }
+
+ /**
+ * Set order status
+ *
+ * @param $status
+ * @param $paymentTransaction
+ * @return null
+ */
+ public function setOrderStatus($status, $paymentTransaction)
+ {
+ if ($status == 'CONFIRMED') {
+ $paymentTransaction
+ ->setSuccessful(true)
+ ->setActive(false);
+ } elseif (in_array($status, ['DEACTIVATED', 'FAILURE'])) {
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(false);
+ }
+ }
+
+ /**
+ * Convert amount format
+ *
+ * @param $amount
+ * @return int
+ */
+ public function amountFormat($amount)
+ {
+ return sprintf('%0.2f', ( $amount / 100 ));
+ }
+
+ /**
+ * Check merchant details
+ *
+ * @param $config
+ * @return bool
+ */
+ public function checkMerchantData($config)
+ {
+ return (!empty($config->getProductActivationKey()) && !empty($config->getPaymentAccessKey()));
+ }
+}
diff --git a/PaymentMethod/NovalnetIdealPaymentMethod.php b/PaymentMethod/NovalnetIdealPaymentMethod.php
new file mode 100755
index 0000000..dfdea39
--- /dev/null
+++ b/PaymentMethod/NovalnetIdealPaymentMethod.php
@@ -0,0 +1,68 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetInstalmentInvoicePaymentMethod.php b/PaymentMethod/NovalnetInstalmentInvoicePaymentMethod.php
new file mode 100755
index 0000000..29a4582
--- /dev/null
+++ b/PaymentMethod/NovalnetInstalmentInvoicePaymentMethod.php
@@ -0,0 +1,94 @@
+novalnetHelper->checkMerchantData($this->config);
+
+ if (!$isValid) {
+ return false;
+ }
+
+
+ $minAmount = $this->config->getMinAmount() ? $this->config->getMinAmount() : 1998;
+ $isGuaranteedPayment = $this->novalnetHelper->checkGuaranteePayment($context, $minAmount);
+
+ if (!$isGuaranteedPayment) {
+ return false;
+ }
+
+ $orderAmount = $context->getTotal() * 100;
+ return $this->novalnetHelper->checkInstalment($this->config->getInstalmentCycle(), $orderAmount);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $additionalData = $this->novalnetHelper->getAdditionalPaymentData($paymentTransaction);
+
+ $params['instalment'] = [
+ 'interval' => '1m',
+ 'cycles' => $additionalData['invoiceInstalmentCycles']
+ ];
+
+ $params['customer']['billing']['company'] = $this->novalnetHelper->getCompany($order);
+
+ $paymentUrl = $this->novalnetHelper->getPaymentUrl($this->config, $params['transaction']['amount']);
+
+ $response = $this->client->send($this->config->getPaymentAccessKey(), $params, $paymentUrl);
+
+ if ($response['result']['status_code'] == '100') {
+ $novalnetResponse['nnSuccess'] = true;
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetInstalmentSepaPaymentMethod.php b/PaymentMethod/NovalnetInstalmentSepaPaymentMethod.php
new file mode 100755
index 0000000..f849a6b
--- /dev/null
+++ b/PaymentMethod/NovalnetInstalmentSepaPaymentMethod.php
@@ -0,0 +1,107 @@
+novalnetHelper->checkMerchantData($this->config);
+
+ if (!$isValid) {
+ return false;
+ }
+
+
+ $minAmount = $this->config->getMinAmount() ? $this->config->getMinAmount() : 1998;
+ $isGuaranteedPayment = $this->novalnetHelper->checkGuaranteePayment($context, $minAmount);
+
+ if (!$isGuaranteedPayment) {
+ return false;
+ }
+
+ $orderAmount = $context->getTotal() * 100;
+
+ return $this->novalnetHelper->checkInstalment($this->config->getInstalmentCycle(), $orderAmount);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+
+ $additionalData = $this->novalnetHelper->getAdditionalPaymentData($paymentTransaction);
+
+ $params['instalment'] = [
+ 'interval' => '1m',
+ 'cycles' => $additionalData['sepaInstalmentCycles']
+ ];
+
+ $params['customer']['billing']['company'] = $this->novalnetHelper->getCompany($order);
+
+ if ($additionalData['instlSepaToken']) {
+ $params['transaction']['payment_data'] = ['token' => $additionalData['instlSepaToken']];
+ } else {
+ $params['transaction']['payment_data'] = [
+ 'iban' => $additionalData['instlSepaIban']
+ ];
+ if ($additionalData['instlSepaSaveAccountDetails'] == true) {
+ $params['transaction']['create_token'] = 1;
+ }
+ }
+
+ $paymentTransaction->setRequest($params);
+ $paymentUrl = $this->novalnetHelper->getPaymentUrl($this->config, $params['transaction']['amount']);
+
+ $response = $this->client->send($this->config->getPaymentAccessKey(), $params, $paymentUrl);
+
+ if ($response['result']['status_code'] == '100') {
+ $novalnetResponse['nnSuccess'] = true;
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetInvoicePaymentMethod.php b/PaymentMethod/NovalnetInvoicePaymentMethod.php
new file mode 100755
index 0000000..724f84c
--- /dev/null
+++ b/PaymentMethod/NovalnetInvoicePaymentMethod.php
@@ -0,0 +1,82 @@
+novalnetHelper->checkMerchantData($this->config);
+
+ if (!$isValid) {
+ return false;
+ }
+
+ $enabledPayments = $this->novalnetHelper->getEnabledPayments($this->paymentMethodProvider, $context);
+
+ $paymentCode = $this->getPaymentCode();
+
+ if (in_array('novalnet_guaranteed_invoice', $enabledPayments) && in_array($paymentCode, $enabledPayments)) {
+ $minAmount = $this->config->getMinAmount() ? $this->config->getMinAmount() : 999;
+ $displayGuaranteePayment = $this->novalnetHelper->checkGuaranteePayment($context, $minAmount);
+ return ($displayGuaranteePayment == true) ? false : true;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+
+ $novalnetResponse = [];
+
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $this->requestStack->getCurrentRequest(),
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $paymentUrl = $this->novalnetHelper->getPaymentUrl($this->config, $params['transaction']['amount']);
+ $response = $this->client->send($this->config->getPaymentAccessKey(), $params, $paymentUrl);
+
+ if ($response['result']['status_code'] == '100') {
+ $novalnetResponse['nnSuccess'] = true;
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetMultibancoPaymentMethod.php b/PaymentMethod/NovalnetMultibancoPaymentMethod.php
new file mode 100755
index 0000000..10e8511
--- /dev/null
+++ b/PaymentMethod/NovalnetMultibancoPaymentMethod.php
@@ -0,0 +1,72 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100') {
+ $novalnetResponse['nnSuccess'] = true;
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetOnlinebanktransferPaymentMethod.php b/PaymentMethod/NovalnetOnlinebanktransferPaymentMethod.php
new file mode 100755
index 0000000..ba43b28
--- /dev/null
+++ b/PaymentMethod/NovalnetOnlinebanktransferPaymentMethod.php
@@ -0,0 +1,68 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetPaymentMethod.php b/PaymentMethod/NovalnetPaymentMethod.php
new file mode 100755
index 0000000..d0e7582
--- /dev/null
+++ b/PaymentMethod/NovalnetPaymentMethod.php
@@ -0,0 +1,167 @@
+config = $config;
+ $this->router = $routerInterface;
+ $this->doctrineHelper = $doctrineHelper;
+ $this->novalnetHelper = $novalnetHelper;
+ $this->requestStack = $requestStack;
+ $this->translator = $translator;
+ $this->userLocalizationManager = $userLocalizationManager;
+ $this->client = $client;
+ $this->paymentMethodProvider = $paymentMethodProvider;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function execute($action, PaymentTransaction $paymentTransaction)
+ {
+ if (!method_exists($this, $action)) {
+ throw new \InvalidArgumentException(
+ sprintf('"%s" payment method "%s" action is not supported', $this->getIdentifier(), $action)
+ );
+ }
+ return $this->$action($paymentTransaction);
+ }
+
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getIdentifier()
+ {
+ return $this->config->getPaymentMethodIdentifier();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function supports($actionName)
+ {
+ return in_array($actionName, [self::COMPLETE, self::PENDING, self::PURCHASE], true);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function complete(PaymentTransaction $paymentTransaction)
+ {
+ $paymentTransaction
+ ->setSuccessful(true)
+ ->setActive(false);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function pending(PaymentTransaction $paymentTransaction)
+ {
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentCode()
+ {
+ return preg_replace('/_[0-9]{1,}$/', '', $this->config->getPaymentMethodIdentifier());
+ }
+}
diff --git a/PaymentMethod/NovalnetPaypalPaymentMethod.php b/PaymentMethod/NovalnetPaypalPaymentMethod.php
new file mode 100755
index 0000000..14f29ac
--- /dev/null
+++ b/PaymentMethod/NovalnetPaypalPaymentMethod.php
@@ -0,0 +1,90 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $this->novalnetHelper->getCartParams($order, $params);
+
+ $additionalData = $this->novalnetHelper->getAdditionalPaymentData($paymentTransaction);
+
+ if ($additionalData['paypalToken']) {
+ $params['transaction']['payment_data'] = ['token' => $additionalData['paypalToken']];
+ } else {
+ if ($additionalData['savePaypalAccountDetails'] == true) {
+ $params['transaction']['create_token'] = 1;
+ }
+ }
+
+ $paymentTransaction->setRequest($params);
+ $paymentUrl = $this->novalnetHelper->getPaymentUrl($this->config, $params['transaction']['amount']);
+
+ $response = $this->client->send($this->config->getPaymentAccessKey(), $params, $paymentUrl);
+
+ if ($response['result']['status_code'] == '100') {
+ $novalnetResponse['nnSuccess'] = true;
+ if ($response['result']['redirect_url']) {
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ }
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetPostfinanceCardPaymentMethod.php b/PaymentMethod/NovalnetPostfinanceCardPaymentMethod.php
new file mode 100755
index 0000000..d76fd8d
--- /dev/null
+++ b/PaymentMethod/NovalnetPostfinanceCardPaymentMethod.php
@@ -0,0 +1,67 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetPostfinancePaymentMethod.php b/PaymentMethod/NovalnetPostfinancePaymentMethod.php
new file mode 100755
index 0000000..7d5fe24
--- /dev/null
+++ b/PaymentMethod/NovalnetPostfinancePaymentMethod.php
@@ -0,0 +1,68 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetPrepaymentPaymentMethod.php b/PaymentMethod/NovalnetPrepaymentPaymentMethod.php
new file mode 100755
index 0000000..756d80f
--- /dev/null
+++ b/PaymentMethod/NovalnetPrepaymentPaymentMethod.php
@@ -0,0 +1,71 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100') {
+ $novalnetResponse['nnSuccess'] = true;
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetPrzelewyPaymentMethod.php b/PaymentMethod/NovalnetPrzelewyPaymentMethod.php
new file mode 100755
index 0000000..d8f8cdb
--- /dev/null
+++ b/PaymentMethod/NovalnetPrzelewyPaymentMethod.php
@@ -0,0 +1,68 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetSepaPaymentMethod.php b/PaymentMethod/NovalnetSepaPaymentMethod.php
new file mode 100755
index 0000000..e01a74d
--- /dev/null
+++ b/PaymentMethod/NovalnetSepaPaymentMethod.php
@@ -0,0 +1,101 @@
+novalnetHelper->checkMerchantData($this->config);
+
+ if (!$isValid) {
+ return false;
+ }
+
+ $enabledPayments = $this->novalnetHelper->getEnabledPayments($this->paymentMethodProvider, $context);
+
+ $paymentCode = $this->getPaymentCode();
+
+ if (in_array('novalnet_guaranteed_sepa', $enabledPayments) && in_array($paymentCode, $enabledPayments)) {
+ $minAmount = $this->config->getMinAmount() ? $this->config->getMinAmount() : 999;
+ $displayGuaranteePayment = $this->novalnetHelper->checkGuaranteePayment($context, $minAmount);
+ return ($displayGuaranteePayment == true) ? false : true;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+
+ $additionalData = $this->novalnetHelper->getAdditionalPaymentData($paymentTransaction);
+ if ($additionalData['sepaToken']) {
+ $params['transaction']['payment_data'] = ['token' => $additionalData['sepaToken']];
+ } else {
+ $params['transaction']['payment_data'] = [
+ 'iban' => $additionalData['sepaIban']
+ ];
+
+ if ($additionalData['sepaSaveAccountDetails'] == true) {
+ $params['transaction']['create_token'] = 1;
+ }
+ }
+
+
+ $paymentUrl = $this->novalnetHelper->getPaymentUrl($this->config, $params['transaction']['amount']);
+
+ $paymentTransaction->setRequest($params);
+
+ $response = $this->client->send($this->config->getPaymentAccessKey(), $params, $paymentUrl);
+
+ if ($response['result']['status_code'] == '100') {
+ $this->novalnetHelper->setOrderStatus($response['transaction']['status'], $paymentTransaction);
+ $novalnetResponse['nnSuccess'] = true;
+ $this->novalnetHelper->completeNovalnetOrder(
+ $response,
+ $paymentTransaction,
+ $this->translator,
+ $this->doctrineHelper
+ );
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetTrustlyPaymentMethod.php b/PaymentMethod/NovalnetTrustlyPaymentMethod.php
new file mode 100755
index 0000000..3fdcef5
--- /dev/null
+++ b/PaymentMethod/NovalnetTrustlyPaymentMethod.php
@@ -0,0 +1,67 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/NovalnetWechatpayPaymentMethod.php b/PaymentMethod/NovalnetWechatpayPaymentMethod.php
new file mode 100755
index 0000000..6c6bc55
--- /dev/null
+++ b/PaymentMethod/NovalnetWechatpayPaymentMethod.php
@@ -0,0 +1,68 @@
+novalnetHelper->checkMerchantData($this->config);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function purchase(PaymentTransaction $paymentTransaction)
+ {
+
+ $paymentTransaction
+ ->setSuccessful(false)
+ ->setActive(true);
+
+ $order = $this->doctrineHelper->getEntity(
+ $paymentTransaction->getEntityClass(),
+ $paymentTransaction->getEntityIdentifier()
+ );
+ $novalnetResponse = [];
+
+ $request = $this->requestStack->getCurrentRequest();
+ $params = $this->novalnetHelper->getBasicParams(
+ $order,
+ $this->config,
+ $paymentTransaction,
+ $request,
+ $this->userLocalizationManager,
+ $this->router
+ );
+
+ $this->novalnetHelper->getRedirectParams($params, $this->router, $paymentTransaction);
+
+ $response = $this->client->send(
+ $this->config->getPaymentAccessKey(),
+ $params,
+ 'https://payport.novalnet.de/v2/payment'
+ );
+
+ if ($response['result']['status_code'] == '100' && $response['result']['redirect_url']) {
+ $novalnetResponse['nnSuccess'] = true;
+ $novalnetResponse['nnRedirectUrl'] = $response['result']['redirect_url'];
+ $paymentTransaction->setReference($response['transaction']['txn_secret']);
+ } else {
+ $novalnetResponse['nnSuccess'] = false;
+ $novalnetResponse['nnErrorMsg'] = $response['result']['status_text'];
+ $paymentTransaction->setResponse($response);
+ }
+ return $novalnetResponse;
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetAlipayMethodProvider.php b/PaymentMethod/Provider/NovalnetAlipayMethodProvider.php
new file mode 100755
index 0000000..d6dbf80
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetAlipayMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetAlipayPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetAlipayConfigInterface $config
+ */
+ protected function addNovalnetAlipayPaymentMethod(NovalnetAlipayConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetBancontactMethodProvider.php b/PaymentMethod/Provider/NovalnetBancontactMethodProvider.php
new file mode 100755
index 0000000..3d49d8f
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetBancontactMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetBancontactPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetBancontactConfigInterface $config
+ */
+ protected function addNovalnetBancontactPaymentMethod(NovalnetBancontactConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetBanktransferMethodProvider.php b/PaymentMethod/Provider/NovalnetBanktransferMethodProvider.php
new file mode 100755
index 0000000..3e5f127
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetBanktransferMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetBanktransferPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetBanktransferConfigInterface $config
+ */
+ protected function addNovalnetBanktransferPaymentMethod(NovalnetBanktransferConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetCashpaymentMethodProvider.php b/PaymentMethod/Provider/NovalnetCashpaymentMethodProvider.php
new file mode 100755
index 0000000..e928724
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetCashpaymentMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetCashpaymentPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetCashpaymentConfigInterface $config
+ */
+ protected function addNovalnetCashpaymentPaymentMethod(NovalnetCashpaymentConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetCreditCardMethodProvider.php b/PaymentMethod/Provider/NovalnetCreditCardMethodProvider.php
new file mode 100755
index 0000000..7025857
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetCreditCardMethodProvider.php
@@ -0,0 +1,60 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetCreditCardPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetCreditCardConfigInterface $config
+ */
+ protected function addNovalnetCreditCardPaymentMethod(NovalnetCreditCardConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetEpsMethodProvider.php b/PaymentMethod/Provider/NovalnetEpsMethodProvider.php
new file mode 100755
index 0000000..b5831c4
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetEpsMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetEpsPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetEpsConfigInterface $config
+ */
+ protected function addNovalnetEpsPaymentMethod(NovalnetEpsConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetGiropayMethodProvider.php b/PaymentMethod/Provider/NovalnetGiropayMethodProvider.php
new file mode 100755
index 0000000..6f87c29
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetGiropayMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetGiropayPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetGiropayConfigInterface $config
+ */
+ protected function addNovalnetGiropayPaymentMethod(NovalnetGiropayConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetGuaranteedInvoiceMethodProvider.php b/PaymentMethod/Provider/NovalnetGuaranteedInvoiceMethodProvider.php
new file mode 100755
index 0000000..81253f3
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetGuaranteedInvoiceMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetGuaranteedInvoicePaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetGuaranteedInvoiceConfigInterface $config
+ */
+ protected function addNovalnetGuaranteedInvoicePaymentMethod(NovalnetGuaranteedInvoiceConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetGuaranteedSepaMethodProvider.php b/PaymentMethod/Provider/NovalnetGuaranteedSepaMethodProvider.php
new file mode 100755
index 0000000..da04727
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetGuaranteedSepaMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetGuaranteedSepaPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetGuaranteedSepaConfigInterface $config
+ */
+ protected function addNovalnetGuaranteedSepaPaymentMethod(NovalnetGuaranteedSepaConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetIdealMethodProvider.php b/PaymentMethod/Provider/NovalnetIdealMethodProvider.php
new file mode 100755
index 0000000..8042259
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetIdealMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetIdealPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetIdealConfigInterface $config
+ */
+ protected function addNovalnetIdealPaymentMethod(NovalnetIdealConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetInstalmentInvoiceMethodProvider.php b/PaymentMethod/Provider/NovalnetInstalmentInvoiceMethodProvider.php
new file mode 100755
index 0000000..02e621e
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetInstalmentInvoiceMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetInstalmentInvoicePaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetInstalmentInvoiceConfigInterface $config
+ */
+ protected function addNovalnetInstalmentInvoicePaymentMethod(NovalnetInstalmentInvoiceConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetInstalmentSepaMethodProvider.php b/PaymentMethod/Provider/NovalnetInstalmentSepaMethodProvider.php
new file mode 100755
index 0000000..008ee7a
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetInstalmentSepaMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetInstalmentSepaPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetInstalmentSepaConfigInterface $config
+ */
+ protected function addNovalnetInstalmentSepaPaymentMethod(NovalnetInstalmentSepaConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetInvoiceMethodProvider.php b/PaymentMethod/Provider/NovalnetInvoiceMethodProvider.php
new file mode 100755
index 0000000..45cc131
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetInvoiceMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetInvoicePaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetInvoiceConfigInterface $config
+ */
+ protected function addNovalnetInvoicePaymentMethod(NovalnetInvoiceConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetMultibancoMethodProvider.php b/PaymentMethod/Provider/NovalnetMultibancoMethodProvider.php
new file mode 100755
index 0000000..8d1eb53
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetMultibancoMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetMultibancoPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetMultibancoConfigInterface $config
+ */
+ protected function addNovalnetMultibancoPaymentMethod(NovalnetMultibancoConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetOnlinebanktransferMethodProvider.php b/PaymentMethod/Provider/NovalnetOnlinebanktransferMethodProvider.php
new file mode 100755
index 0000000..43ffa06
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetOnlinebanktransferMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetOnlinebanktransferPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetOnlinebanktransferConfigInterface $config
+ */
+ protected function addNovalnetOnlinebanktransferPaymentMethod(NovalnetOnlinebanktransferConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetPaypalMethodProvider.php b/PaymentMethod/Provider/NovalnetPaypalMethodProvider.php
new file mode 100755
index 0000000..de71e8b
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetPaypalMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetPaypalPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetPaypalConfigInterface $config
+ */
+ protected function addNovalnetPaypalPaymentMethod(NovalnetPaypalConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetPostfinanceCardMethodProvider.php b/PaymentMethod/Provider/NovalnetPostfinanceCardMethodProvider.php
new file mode 100755
index 0000000..ac4472c
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetPostfinanceCardMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetPostfinanceCardPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetPostfinanceCardConfigInterface $config
+ */
+ protected function addNovalnetPostfinanceCardPaymentMethod(NovalnetPostfinanceCardConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetPostfinanceMethodProvider.php b/PaymentMethod/Provider/NovalnetPostfinanceMethodProvider.php
new file mode 100755
index 0000000..a8a129c
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetPostfinanceMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetPostfinancePaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetPostfinanceConfigInterface $config
+ */
+ protected function addNovalnetPostfinancePaymentMethod(NovalnetPostfinanceConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetPrepaymentMethodProvider.php b/PaymentMethod/Provider/NovalnetPrepaymentMethodProvider.php
new file mode 100755
index 0000000..5cd6f96
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetPrepaymentMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetPrepaymentPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetPrepaymentConfigInterface $config
+ */
+ protected function addNovalnetPrepaymentPaymentMethod(NovalnetPrepaymentConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetPrzelewyMethodProvider.php b/PaymentMethod/Provider/NovalnetPrzelewyMethodProvider.php
new file mode 100755
index 0000000..ef8a809
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetPrzelewyMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetPrzelewyPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetPrzelewyConfigInterface $config
+ */
+ protected function addNovalnetPrzelewyPaymentMethod(NovalnetPrzelewyConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetSepaMethodProvider.php b/PaymentMethod/Provider/NovalnetSepaMethodProvider.php
new file mode 100755
index 0000000..931d770
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetSepaMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetSepaPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetSepaConfigInterface $config
+ */
+ protected function addNovalnetSepaPaymentMethod(NovalnetSepaConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetTrustlyMethodProvider.php b/PaymentMethod/Provider/NovalnetTrustlyMethodProvider.php
new file mode 100755
index 0000000..3043321
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetTrustlyMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetTrustlyPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetTrustlyConfigInterface $config
+ */
+ protected function addNovalnetTrustlyPaymentMethod(NovalnetTrustlyConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/Provider/NovalnetWechatpayMethodProvider.php b/PaymentMethod/Provider/NovalnetWechatpayMethodProvider.php
new file mode 100755
index 0000000..b210150
--- /dev/null
+++ b/PaymentMethod/Provider/NovalnetWechatpayMethodProvider.php
@@ -0,0 +1,61 @@
+configProvider = $configProvider;
+ $this->factory = $factory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function collectMethods()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+
+ foreach ($configs as $config) {
+ $this->addNovalnetWechatpayPaymentMethod($config);
+ }
+ }
+
+ /**
+ * @param NovalnetWechatpayConfigInterface $config
+ */
+ protected function addNovalnetWechatpayPaymentMethod(NovalnetWechatpayConfigInterface $config)
+ {
+ $this->addMethod(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetAlipayViewFactory.php b/PaymentMethod/View/Factory/NovalnetAlipayViewFactory.php
new file mode 100755
index 0000000..78e4372
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetAlipayViewFactory.php
@@ -0,0 +1,27 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetAlipayViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetAlipayViewFactoryInterface.php
new file mode 100755
index 0000000..99e7b2c
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetAlipayViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetBancontactViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetBancontactViewFactoryInterface.php
new file mode 100755
index 0000000..4d9ef53
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetBancontactViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetBanktransferViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetBanktransferViewFactoryInterface.php
new file mode 100755
index 0000000..5e89d33
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetBanktransferViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetCashpaymentViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetCashpaymentViewFactoryInterface.php
new file mode 100755
index 0000000..6782cdd
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetCashpaymentViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetCreditCardViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetCreditCardViewFactoryInterface.php
new file mode 100755
index 0000000..c5a1395
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetCreditCardViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetEpsViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetEpsViewFactoryInterface.php
new file mode 100755
index 0000000..50654ca
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetEpsViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetGiropayViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetGiropayViewFactoryInterface.php
new file mode 100755
index 0000000..132cd6c
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetGiropayViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetGuaranteedInvoiceViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetGuaranteedInvoiceViewFactoryInterface.php
new file mode 100755
index 0000000..c6b61f2
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetGuaranteedInvoiceViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetGuaranteedSepaViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetGuaranteedSepaViewFactoryInterface.php
new file mode 100755
index 0000000..12220cc
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetGuaranteedSepaViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetIdealViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetIdealViewFactoryInterface.php
new file mode 100755
index 0000000..31ae11d
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetIdealViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetInstalmentInvoiceViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetInstalmentInvoiceViewFactoryInterface.php
new file mode 100755
index 0000000..c6f0793
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetInstalmentInvoiceViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetInstalmentSepaViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetInstalmentSepaViewFactoryInterface.php
new file mode 100755
index 0000000..404297c
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetInstalmentSepaViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetInvoiceViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetInvoiceViewFactoryInterface.php
new file mode 100755
index 0000000..281837e
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetInvoiceViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetMultibancoViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetMultibancoViewFactoryInterface.php
new file mode 100755
index 0000000..95e22c5
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetMultibancoViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetOnlinebanktransferViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetOnlinebanktransferViewFactoryInterface.php
new file mode 100755
index 0000000..fc732d3
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetOnlinebanktransferViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetPaypalViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetPaypalViewFactoryInterface.php
new file mode 100755
index 0000000..bde405a
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetPaypalViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetPostfinanceCardViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetPostfinanceCardViewFactoryInterface.php
new file mode 100755
index 0000000..213b7ff
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetPostfinanceCardViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetPostfinanceViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetPostfinanceViewFactoryInterface.php
new file mode 100755
index 0000000..09e0b94
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetPostfinanceViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetPrepaymentViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetPrepaymentViewFactoryInterface.php
new file mode 100755
index 0000000..64b6a58
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetPrepaymentViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetPrzelewyViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetPrzelewyViewFactoryInterface.php
new file mode 100755
index 0000000..d76fe37
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetPrzelewyViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetSepaViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetSepaViewFactoryInterface.php
new file mode 100755
index 0000000..411ef19
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetSepaViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetTrustlyViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetTrustlyViewFactoryInterface.php
new file mode 100755
index 0000000..52dd054
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetTrustlyViewFactoryInterface.php
@@ -0,0 +1,18 @@
+formFactory = $formFactory;
+ $this->novalnetHelper = $novalnetHelper;
+ $this->translator = $translator;
+ $this->doctrine = $doctrine;
+ $this->userLocalizationManager = $userLocalizationManager;
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetWechatpayViewFactory.php b/PaymentMethod/View/Factory/NovalnetWechatpayViewFactory.php
new file mode 100755
index 0000000..404f8ab
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetWechatpayViewFactory.php
@@ -0,0 +1,27 @@
+formFactory,
+ $this->novalnetHelper,
+ $this->translator,
+ $this->doctrine,
+ $this->userLocalizationManager,
+ $config
+ );
+ }
+}
diff --git a/PaymentMethod/View/Factory/NovalnetWechatpayViewFactoryInterface.php b/PaymentMethod/View/Factory/NovalnetWechatpayViewFactoryInterface.php
new file mode 100755
index 0000000..eb8d838
--- /dev/null
+++ b/PaymentMethod/View/Factory/NovalnetWechatpayViewFactoryInterface.php
@@ -0,0 +1,18 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetBancontactView.php b/PaymentMethod/View/NovalnetBancontactView.php
new file mode 100755
index 0000000..20d42d1
--- /dev/null
+++ b/PaymentMethod/View/NovalnetBancontactView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetBanktransferView.php b/PaymentMethod/View/NovalnetBanktransferView.php
new file mode 100755
index 0000000..a187a29
--- /dev/null
+++ b/PaymentMethod/View/NovalnetBanktransferView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetCashpaymentView.php b/PaymentMethod/View/NovalnetCashpaymentView.php
new file mode 100755
index 0000000..e4d81e9
--- /dev/null
+++ b/PaymentMethod/View/NovalnetCashpaymentView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetCreditCardView.php b/PaymentMethod/View/NovalnetCreditCardView.php
new file mode 100755
index 0000000..0b8c06c
--- /dev/null
+++ b/PaymentMethod/View/NovalnetCreditCardView.php
@@ -0,0 +1,87 @@
+config->getOneclick()) {
+ $maskedData = $this->novalnetHelper->getSavedAccountDetails(
+ $this->doctrine,
+ 'CREDITCARD',
+ $context->getCustomerUser()->getId()
+ );
+ $saveCardDetails = true;
+ }
+
+ $formOptions = [
+ 'masked_data' => $maskedData,
+ 'enforce_3d' => $this->config->getCcEnforce3d(),
+ 'client_key' => $this->config->getClientKey(),
+ 'customer_details' => $this->getCustomerDetails($context),
+ 'label_style' => $this->config->getLabelStyle(),
+ 'input_style' => $this->config->getInputStyle(),
+ 'container_style' => $this->config->getContainerStyle(),
+ 'inline_form' => (int) $this->config->getInlineForm(),
+ ];
+
+ $form = $this->formFactory->create(CreditCardFormType::class, null, $formOptions);
+
+ return [
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'formView' => $form->createView(),
+ 'testMode' => $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'novalnetCheckoutJs' => 'https://cdn.novalnet.de/js/v2/NovalnetUtility.js',
+ 'maskedData' => $maskedData,
+ 'saveCardDetails' => $saveCardDetails,
+ 'displayLogo' => $this->config->getDisplayPaymentLogo(),
+ 'enabledLogos' => $this->config->getCreditCardLogo(),
+ ];
+ }
+
+
+ public function getCustomerDetails(PaymentContextInterface $context)
+ {
+ $sameAsBilling = $this->novalnetHelper->checkShippingBillingAddress($context);
+
+ $customerDetails = [
+ 'first_name' => $context->getBillingAddress()->getFirstName(),
+ 'last_name' => $context->getBillingAddress()->getLastName(),
+ 'email' => $context->getCustomerUser()->getEmail(),
+ 'street' => $context->getBillingAddress()->getstreet(),
+ 'city' => $context->getBillingAddress()->getCity(),
+ 'zip' => $context->getBillingAddress()->getPostalCode(),
+ 'country_code' => $context->getBillingAddress()->getCountryIso2(),
+ 'same_as_billing' => (int) $sameAsBilling,
+ 'amount' => sprintf('%0.2f', $context->getTotal()) * 100,
+ 'currency' => $context->getCurrency(),
+ 'test_mode' => $this->config->getTestMode(),
+ 'lang' => strtoupper($this->userLocalizationManager
+ ->getCurrentLocalizationByCustomerUser($context->getCustomerUser())
+ ->getLanguage()->getCode()),
+ ];
+
+ return json_encode($customerDetails);
+ }
+}
diff --git a/PaymentMethod/View/NovalnetEpsView.php b/PaymentMethod/View/NovalnetEpsView.php
new file mode 100755
index 0000000..d69b4d7
--- /dev/null
+++ b/PaymentMethod/View/NovalnetEpsView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetGiropayView.php b/PaymentMethod/View/NovalnetGiropayView.php
new file mode 100755
index 0000000..443f522
--- /dev/null
+++ b/PaymentMethod/View/NovalnetGiropayView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetGuaranteedInvoiceView.php b/PaymentMethod/View/NovalnetGuaranteedInvoiceView.php
new file mode 100755
index 0000000..d611ca5
--- /dev/null
+++ b/PaymentMethod/View/NovalnetGuaranteedInvoiceView.php
@@ -0,0 +1,40 @@
+novalnetHelper->getGuaranteeErrorMsg(
+ $context,
+ $this->config->getMinAmount(),
+ $this->translator
+ );
+
+ return [
+ 'testMode' => $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'errorMsg' => $errorMsg,
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetGuaranteedSepaView.php b/PaymentMethod/View/NovalnetGuaranteedSepaView.php
new file mode 100755
index 0000000..0841e65
--- /dev/null
+++ b/PaymentMethod/View/NovalnetGuaranteedSepaView.php
@@ -0,0 +1,62 @@
+config->getOneclick()) {
+ $saveAccountDetails = true;
+ $maskedData = $this->novalnetHelper->getSavedAccountDetails(
+ $this->doctrine,
+ 'GUARANTEED_DIRECT_DEBIT_SEPA',
+ $context->getCustomerUser()->getId()
+ );
+ }
+
+ $errorMsg = $this->novalnetHelper->getGuaranteeErrorMsg(
+ $context,
+ $this->config->getMinAmount(),
+ $this->translator
+ );
+
+ $formOptions = [
+ 'guaranteed_sepa_error_msg' => $errorMsg,
+ 'masked_data' => $maskedData,
+ ];
+
+ $form = $this->formFactory->create(GuaranteedSepaFormType::class, null, $formOptions);
+
+ return [
+ 'testMode' => $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'formView' => $form->createView(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'maskedData' => $maskedData,
+ 'saveAccountDetails' => $saveAccountDetails,
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetIdealView.php b/PaymentMethod/View/NovalnetIdealView.php
new file mode 100755
index 0000000..2ae7db8
--- /dev/null
+++ b/PaymentMethod/View/NovalnetIdealView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetInstalmentInvoiceView.php b/PaymentMethod/View/NovalnetInstalmentInvoiceView.php
new file mode 100755
index 0000000..f356916
--- /dev/null
+++ b/PaymentMethod/View/NovalnetInstalmentInvoiceView.php
@@ -0,0 +1,44 @@
+getTotal() * 100;
+
+ $instalmentDetails = $this->getInstalmentDetails($orderAmount);
+
+ $formOptions = [
+ 'instalment_invoice_cycles' => $instalmentDetails
+ ];
+
+ $form = $this->formFactory->create(InstalmentInvoiceCycleType::class, null, $formOptions);
+
+ return [
+ 'testMode' => $this->config->getTestMode(),
+ 'cycleDetails' => $instalmentDetails['tableData'],
+ 'formView' => $form->createView(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetInstalmentSepaView.php b/PaymentMethod/View/NovalnetInstalmentSepaView.php
new file mode 100755
index 0000000..2b9928e
--- /dev/null
+++ b/PaymentMethod/View/NovalnetInstalmentSepaView.php
@@ -0,0 +1,59 @@
+config->getOneclick()) {
+ $saveAccountDetails = true;
+ $maskedData = $this->novalnetHelper->getSavedAccountDetails(
+ $this->doctrine,
+ 'INSTALMENT_DIRECT_DEBIT_SEPA',
+ $context->getCustomerUser()->getId()
+ );
+ }
+
+ $orderAmount = $context->getTotal() * 100;
+
+ $instalmentDetails = $this->getInstalmentDetails($orderAmount);
+
+ $formOptions = [
+ 'instalment_sepa_cycles' => $instalmentDetails,
+ 'masked_data' => $maskedData
+ ];
+ $form = $this->formFactory->create(InstalmentSepaCycleType::class, null, $formOptions);
+
+ return [
+ 'testMode' => $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'cycleDetails' => $instalmentDetails['tableData'],
+ 'formView' => $form->createView(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'saveAccountDetails' => $saveAccountDetails,
+ 'maskedData' => $maskedData,
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetInvoiceView.php b/PaymentMethod/View/NovalnetInvoiceView.php
new file mode 100755
index 0000000..d91b21a
--- /dev/null
+++ b/PaymentMethod/View/NovalnetInvoiceView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetMultibancoView.php b/PaymentMethod/View/NovalnetMultibancoView.php
new file mode 100755
index 0000000..8061c95
--- /dev/null
+++ b/PaymentMethod/View/NovalnetMultibancoView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetOnlinebanktransferView.php b/PaymentMethod/View/NovalnetOnlinebanktransferView.php
new file mode 100755
index 0000000..f995578
--- /dev/null
+++ b/PaymentMethod/View/NovalnetOnlinebanktransferView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetPaypalView.php b/PaymentMethod/View/NovalnetPaypalView.php
new file mode 100755
index 0000000..3e782d1
--- /dev/null
+++ b/PaymentMethod/View/NovalnetPaypalView.php
@@ -0,0 +1,55 @@
+config->getOneclick()) {
+ $saveAccountDetails = true;
+ $maskedData = $this->novalnetHelper->getSavedAccountDetails(
+ $this->doctrine,
+ 'PAYPAL',
+ $context->getCustomerUser()->getId()
+ );
+ }
+
+
+ $formOptions = [
+ 'masked_data' => $maskedData,
+ ];
+
+ $form = $this->formFactory->create(PaypalFormType::class, null, $formOptions);
+
+ return [
+ 'testMode' => $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'formView' => $form->createView(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'saveAccountDetails' => $saveAccountDetails,
+ 'maskedData' => $maskedData,
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetPostfinanceCardView.php b/PaymentMethod/View/NovalnetPostfinanceCardView.php
new file mode 100755
index 0000000..c4a8653
--- /dev/null
+++ b/PaymentMethod/View/NovalnetPostfinanceCardView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetPostfinanceView.php b/PaymentMethod/View/NovalnetPostfinanceView.php
new file mode 100755
index 0000000..61c3814
--- /dev/null
+++ b/PaymentMethod/View/NovalnetPostfinanceView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetPrepaymentView.php b/PaymentMethod/View/NovalnetPrepaymentView.php
new file mode 100755
index 0000000..e693ada
--- /dev/null
+++ b/PaymentMethod/View/NovalnetPrepaymentView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetPrzelewyView.php b/PaymentMethod/View/NovalnetPrzelewyView.php
new file mode 100755
index 0000000..a3a8119
--- /dev/null
+++ b/PaymentMethod/View/NovalnetPrzelewyView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetSepaView.php b/PaymentMethod/View/NovalnetSepaView.php
new file mode 100755
index 0000000..13d912c
--- /dev/null
+++ b/PaymentMethod/View/NovalnetSepaView.php
@@ -0,0 +1,54 @@
+config->getOneclick()) {
+ $maskedData = $this->novalnetHelper->getSavedAccountDetails(
+ $this->doctrine,
+ 'DIRECT_DEBIT_SEPA',
+ $context->getCustomerUser()->getId()
+ );
+ $saveAccountDetails = true;
+ }
+
+ $formOptions = [
+ 'masked_data' => $maskedData,
+ ];
+
+ $form = $this->formFactory->create(SepaFormType::class, null, $formOptions);
+
+ return [
+ 'testMode' => $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'formView' => $form->createView(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'saveAccountDetails' => $saveAccountDetails,
+ 'maskedData' => $maskedData,
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetTrustlyView.php b/PaymentMethod/View/NovalnetTrustlyView.php
new file mode 100755
index 0000000..f3962dc
--- /dev/null
+++ b/PaymentMethod/View/NovalnetTrustlyView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/NovalnetView.php b/PaymentMethod/View/NovalnetView.php
new file mode 100755
index 0000000..817af1a
--- /dev/null
+++ b/PaymentMethod/View/NovalnetView.php
@@ -0,0 +1,124 @@
+formFactory = $formFactory;
+ $this->novalnetHelper = $novalnetHelper;
+ $this->translator = $translator;
+ $this->doctrine = $doctrine;
+ $this->userLocalizationManager = $userLocalizationManager;
+ $this->config = $config;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getLabel()
+ {
+ return $this->config->getLabel();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getShortLabel()
+ {
+ return $this->config->getShortLabel();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAdminLabel()
+ {
+ return $this->config->getAdminLabel();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPaymentMethodIdentifier()
+ {
+ return $this->config->getPaymentMethodIdentifier();
+ }
+
+ public function getInstalmentDetails($orderAmount)
+ {
+ $cycles = $this->config->getInstalmentCycle();
+ $cycles = json_decode($cycles[0]);
+ $instalmentDetails = ['netAmount' => sprintf('%.2f', ($orderAmount/100)) . ' €'];
+ asort($cycles);
+ foreach ($cycles as $key => $values) {
+ $instalmentAmount = $orderAmount / $values;
+ if (($instalmentAmount) >= 999) {
+
+ $instalmentDetails['dropdownData'][$values] = sprintf($this->translator->trans('novalnet.checkout.instalment_detail'), $values, sprintf('%.2f', ($instalmentAmount/100)) . ' €');
+ $lastCycleAmount = sprintf('%.2f', ($orderAmount/100)) - sprintf('%.2f', ($instalmentAmount/100)) * ($values - 1);
+ $instalmentDetails['tableData'][] = ['cycles' => $values,
+ 'amount' => sprintf('%.2f', ($instalmentAmount/100)),
+ 'currency' => '€',
+ 'lastCycleAmount' => sprintf('%.2f', ($lastCycleAmount)),
+ ];
+ }
+ }
+ return $instalmentDetails;
+ }
+}
diff --git a/PaymentMethod/View/NovalnetWechatpayView.php b/PaymentMethod/View/NovalnetWechatpayView.php
new file mode 100755
index 0000000..de135bf
--- /dev/null
+++ b/PaymentMethod/View/NovalnetWechatpayView.php
@@ -0,0 +1,32 @@
+ $this->config->getTestMode(),
+ 'notification' => $this->config->getBuyerNotification(),
+ 'paymentMethod' => $this->config->getPaymentMethodIdentifier(),
+ 'displayLogo' => $this->config->getDisplayPaymentLogo()
+ ];
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetAlipayViewProvider.php b/PaymentMethod/View/Provider/NovalnetAlipayViewProvider.php
new file mode 100755
index 0000000..9da50d2
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetAlipayViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetAlipayView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetAlipayView(NovalnetAlipayConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetBancontactViewProvider.php b/PaymentMethod/View/Provider/NovalnetBancontactViewProvider.php
new file mode 100755
index 0000000..6999f4a
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetBancontactViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetBancontactView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetBancontactView(NovalnetBancontactConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetBanktransferViewProvider.php b/PaymentMethod/View/Provider/NovalnetBanktransferViewProvider.php
new file mode 100755
index 0000000..dcafd13
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetBanktransferViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetBanktransferView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetBanktransferConfigInterface $config
+ */
+ protected function addNovalnetBanktransferView(NovalnetBanktransferConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetCashpaymentViewProvider.php b/PaymentMethod/View/Provider/NovalnetCashpaymentViewProvider.php
new file mode 100755
index 0000000..2882be3
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetCashpaymentViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetCashpaymentView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetCashpaymentView(NovalnetCashpaymentConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetCreditCardViewProvider.php b/PaymentMethod/View/Provider/NovalnetCreditCardViewProvider.php
new file mode 100755
index 0000000..2c4134c
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetCreditCardViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetCreditCardView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetCreditCardView(NovalnetCreditCardConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetEpsViewProvider.php b/PaymentMethod/View/Provider/NovalnetEpsViewProvider.php
new file mode 100755
index 0000000..85bd81c
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetEpsViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetEpsView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetEpsConfigInterface $config
+ */
+ protected function addNovalnetEpsView(NovalnetEpsConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetGiropayViewProvider.php b/PaymentMethod/View/Provider/NovalnetGiropayViewProvider.php
new file mode 100755
index 0000000..e1dedf8
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetGiropayViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetGiropayView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetGiropayView(NovalnetGiropayConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetGuaranteedInvoiceViewProvider.php b/PaymentMethod/View/Provider/NovalnetGuaranteedInvoiceViewProvider.php
new file mode 100755
index 0000000..42a3542
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetGuaranteedInvoiceViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetGuaranteedInvoiceView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetGuaranteedInvoiceView(NovalnetGuaranteedInvoiceConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetGuaranteedSepaViewProvider.php b/PaymentMethod/View/Provider/NovalnetGuaranteedSepaViewProvider.php
new file mode 100755
index 0000000..3848c49
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetGuaranteedSepaViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetGuaranteedSepaView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetGuaranteedSepaView(NovalnetGuaranteedSepaConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetIdealViewProvider.php b/PaymentMethod/View/Provider/NovalnetIdealViewProvider.php
new file mode 100755
index 0000000..02f1eda
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetIdealViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetIdealView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetIdealView(NovalnetIdealConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetInstalmentInvoiceViewProvider.php b/PaymentMethod/View/Provider/NovalnetInstalmentInvoiceViewProvider.php
new file mode 100755
index 0000000..0747b45
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetInstalmentInvoiceViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetInstalmentInvoiceView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetInstalmentInvoiceView(NovalnetInstalmentInvoiceConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetInstalmentSepaViewProvider.php b/PaymentMethod/View/Provider/NovalnetInstalmentSepaViewProvider.php
new file mode 100755
index 0000000..0fe2385
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetInstalmentSepaViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetInstalmentSepaView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetInstalmentSepaView(NovalnetInstalmentSepaConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetInvoiceViewProvider.php b/PaymentMethod/View/Provider/NovalnetInvoiceViewProvider.php
new file mode 100755
index 0000000..b2c6a08
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetInvoiceViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetInvoiceView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetInvoiceView(NovalnetInvoiceConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetMultibancoViewProvider.php b/PaymentMethod/View/Provider/NovalnetMultibancoViewProvider.php
new file mode 100755
index 0000000..f524f57
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetMultibancoViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetMultibancoView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetMultibancoView(NovalnetMultibancoConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetOnlinebanktransferViewProvider.php b/PaymentMethod/View/Provider/NovalnetOnlinebanktransferViewProvider.php
new file mode 100755
index 0000000..183a0f2
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetOnlinebanktransferViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetOnlinebanktransferView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetOnlinebanktransferView(NovalnetOnlinebanktransferConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetPaypalViewProvider.php b/PaymentMethod/View/Provider/NovalnetPaypalViewProvider.php
new file mode 100755
index 0000000..6af1a59
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetPaypalViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetPaypalView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetPaypalConfigInterface $config
+ */
+ protected function addNovalnetPaypalView(NovalnetPaypalConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetPostfinanceCardViewProvider.php b/PaymentMethod/View/Provider/NovalnetPostfinanceCardViewProvider.php
new file mode 100755
index 0000000..c2d42c3
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetPostfinanceCardViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetPostfinanceCardView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetPostfinanceCardView(NovalnetPostfinanceCardConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetPostfinanceViewProvider.php b/PaymentMethod/View/Provider/NovalnetPostfinanceViewProvider.php
new file mode 100755
index 0000000..dc2d970
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetPostfinanceViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetPostfinanceView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetPostfinanceView(NovalnetPostfinanceConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetPrepaymentViewProvider.php b/PaymentMethod/View/Provider/NovalnetPrepaymentViewProvider.php
new file mode 100755
index 0000000..403c0d1
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetPrepaymentViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetPrepaymentView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetPrepaymentConfigInterface $config
+ */
+ protected function addNovalnetPrepaymentView(NovalnetPrepaymentConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetPrzelewyViewProvider.php b/PaymentMethod/View/Provider/NovalnetPrzelewyViewProvider.php
new file mode 100755
index 0000000..8463620
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetPrzelewyViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetPrzelewyView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetPrzelewyView(NovalnetPrzelewyConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetSepaViewProvider.php b/PaymentMethod/View/Provider/NovalnetSepaViewProvider.php
new file mode 100755
index 0000000..d9f6a3d
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetSepaViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetSepaView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetSepaConfigInterface $config
+ */
+ protected function addNovalnetSepaView(NovalnetSepaConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetTrustlyViewProvider.php b/PaymentMethod/View/Provider/NovalnetTrustlyViewProvider.php
new file mode 100755
index 0000000..b02078a
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetTrustlyViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetTrustlyView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetTrustlyView(NovalnetTrustlyConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/PaymentMethod/View/Provider/NovalnetWechatpayViewProvider.php b/PaymentMethod/View/Provider/NovalnetWechatpayViewProvider.php
new file mode 100755
index 0000000..e401dc3
--- /dev/null
+++ b/PaymentMethod/View/Provider/NovalnetWechatpayViewProvider.php
@@ -0,0 +1,56 @@
+factory = $factory;
+ $this->configProvider = $configProvider;
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function buildViews()
+ {
+ $configs = $this->configProvider->getPaymentConfigs();
+ foreach ($configs as $config) {
+ $this->addNovalnetWechatpayView($config);
+ }
+ }
+
+ /**
+ * @param NovalnetConfigInterface $config
+ */
+ protected function addNovalnetWechatpayView(NovalnetWechatpayConfigInterface $config)
+ {
+ $this->addView(
+ $config->getPaymentMethodIdentifier(),
+ $this->factory->create($config)
+ );
+ }
+}
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7613dcb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,80 @@
+# NOVALNET PAYMENT INTEGRATION FOR OROCOMMERCE
+Novalnet’s free payment bunlde for OroCommerce ensures simple and secure integration of payments and payment services for OroCommerce shops, allowing shop owners to automate the entire payment process from checkout till collection.
+
+## Integration requirements
+Novalnet merchant account is required for using this Novalnet Payment Gateway for OroCommerce. The Bundle is available for the 5.0.0 - 5.1.0 version in the following languages: EN & DE.
+
+## Advanced functions of OroCommerce payment bundle
+- Easy configuration for all payment methods
+- One platform for all relevant payment types and related services
+- Complete automation of all payment processes
+- Secure SSL-encoded gateways
+- More than 50 fraud prevention modules integrated to prevent risk in real-time
+- Effortless configuration of risk management with fraud prevention
+- Comprehensive affiliate system with automated split conversion of transaction on revenue sharing
+- Dynamic subscription and member management for recurring payments
+- No PCI DSS certification required when using our payment module
+- Real-time monitoring of the transaction flow from the checkout to the receivables
+- Multilevel claims management with integrated handover to collection and various export functions for the accounting
+- Automated e-mail notification function concerning payment status reports
+- Clear real-time overview and monitoring of payment status
+- Automated bookkeeping report in XML, SOAP, CSV, MT940
+- Simple seamless integration of the payment module
+- Secure SSL- encoded gateways
+- Credit/Debit Card iframe integration
+- Custom CSS configuration for Credit/Debit Card iframe
+- One-click shopping supported for Credit/Debit Cards, Direct Debit SEPA, Direct Debit SEPA with payment guarantee, Instalment by Direct Debit SEPA & PayPal
+- Easy confirmation/cancellation of on-hold transactions for Direct Debit SEPA, Direct Debit SEPA with payment guarantee, Instalment payment for Direct Debit SEPA, Credit/Debit Card, Invoice, Invoice with payment guarantee, Instalment payment for Invoice, Prepayment & PayPal
+- Refund option for Credit/Debit Cards, Direct Debit SEPA, Direct Debit SEPA with payment guarantee, Instalment by Direct Debit SEPA, Invoice, Invoice with payment guarantee, Instalment by Invoice, Prepayment, Barzahlen/viacash, Sofort, iDEAL, eps, giropay, PayPal, Przelewy24, PostFinance Card, PostFinance E-Finance, Bancontact, Online bank transfer, Alipay, WeChat pay & Trustly
+- Responsive templates
+
+For detailed documentation and other technical inquiries, please send us an email at technic@novalnet.de
+
+## Integrated payment methods for OroCommerce payment bundle
+- Direct Debit SEPA
+- Credit/Debit Cards
+- Invoice
+- Prepayment
+- Invoice with payment guarantee
+- Direct Debit SEPA with payment guarantee
+- Instalment by Invoice
+- Instalment by Direct Debit SEPA
+- iDEAL
+- Sofort
+- giropay
+- Barzahlen/viacash
+- Przelewy24
+- eps
+- PayPal
+- PostFinance Card
+- PostFinance E-Finance
+- Bancontact
+- Multibanco
+- Online bank transfer
+- Alipay
+- WeChat pay
+- Trustly
+
+## Installation
+Easy installation of Novalnet Payment Bunlde for OroCommerce will be done through the following steps:
+1. Get the payment bundle & detailed documentation by contacting us
+2. Install Bundle to your OroCommerce shop
+3. Include Merchant Details in the shop admin panel
+4. Activate & configure the preferred payment types in your shop admin panel
+
+## License
+See our License Agreement at: https://www.novalnet.com/payment-plugins-free-license/
+## Documentation & Support
+For more information about the Novalnet Payment Bunlde for OroCommerce and pricing, please get in touch with us: sales@novalnet.de or +49 89 9230683-20
+
+Novalnet AG
+Zahlungsinstitut (ZAG)
+Feringastr. 4
+85774 Unterföhring
+Deutschland
+Web: www.novalnet.de
+
+## Who is Novalnet AG?
+Novalnet AG is a leading financial service institution offering payment gateways for processing online payments. Operating in the market as a full payment service provider Novalnet AG provides online merchants user-friendly payment integration with all major shop systems and self-programmed sites.
+Accept, manage and monitor payments all on one platform with one single contract!
+Our SaaS engine is PCI DSS certified and designed to enable real-time risk management, secured payments via escrow accounts, efficient receivables management, dynamic member and subscription management, customized payment solutions for various business models (e.g. marketplaces, affiliate programs etc.) etc.
diff --git a/Resources/config/callbacks.yml b/Resources/config/callbacks.yml
new file mode 100755
index 0000000..066ac75
--- /dev/null
+++ b/Resources/config/callbacks.yml
@@ -0,0 +1,452 @@
+services:
+ novalnet.event_listener.callback.novalnet_response.credit_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_credit_card'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_sepa'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_invoice'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.prepayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_prepayment'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.cashpayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_cashpayment'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.paypal:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_paypal'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.banktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_banktransfer'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.ideal:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_ideal'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.guaranteed_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_guaranteed_sepa'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.guaranteed_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_guaranteed_invoice'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.giropay:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_giropay'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.eps:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_eps'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.przelewy:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_przelewy'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.postfinance_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_postfinance_card'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.postfinance:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_postfinance'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.bancontact:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_bancontact'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.multibanco:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_multibanco'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.instalment_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_instalment_invoice'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.instalment_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_instalment_sepa'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.onlinebanktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_onlinebanktransfer'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.trustly:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_trustly'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+
+ novalnet.event_listener.callback.novalnet_response.wechatpay:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_wechatpay'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.event_listener.callback.novalnet_response.alipay:
+ class: 'Novalnet\Bundle\NovalnetBundle\EventListener\NovalnetResponseListener'
+ arguments:
+ - '@novalnet.payment_method_provider.novalnet_alipay'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@session'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@router'
+ - '@novalnet.payment_method.novalnet_callback'
+ - '@novalnet.client.gateway'
+ - '@oro_frontend_localization.manager.user_localization'
+ calls:
+ - ['setLogger', ['@logger']]
+ tags:
+ - { name: kernel.event_listener, event: oro_payment.callback.error, method: onError }
+ - { name: kernel.event_listener, event: oro_payment.callback.return, method: onReturn }
+ - { name: kernel.event_listener, event: oro_payment.callback.notify, method: onNotify }
+
+ novalnet.payment_method.novalnet_callback:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\NovalnetCallback'
+ arguments:
+ - '@doctrine'
+ - '@oro_entity.doctrine_helper'
+ - '@translator'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@oro_config.global'
+ - '@oro_email.sender.email_model_sender'
+ - '@request_stack'
+ - "@logger"
+ tags:
+ - { name: monolog.logger, channel: novalnet }
diff --git a/Resources/config/controllers.yml b/Resources/config/controllers.yml
new file mode 100755
index 0000000..7ae833e
--- /dev/null
+++ b/Resources/config/controllers.yml
@@ -0,0 +1,50 @@
+services:
+ _defaults:
+ public: true
+
+ Novalnet\Bundle\NovalnetBundle\Controller\NovalnetExtensionController:
+ calls:
+ - [setContainer, ['@Psr\Container\ContainerInterface']]
+ tags:
+ - { name: container.service_subscriber }
+ - { name: container.service_subscriber, id: novalnet.client.gateway, key: Novalnet\Bundle\NovalnetBundle\Client\Gateway }
+ - { name: container.service_subscriber, id: novalnet.payment_method.novalnet_helper, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\NovalnetHelper }
+ - { name: container.service_subscriber, id: oro_entity.doctrine_helper, key: Oro\Bundle\EntityBundle\ORM\DoctrineHelper }
+ - { name: container.service_subscriber, id: translator, key: Symfony\Contracts\Translation\TranslatorInterface }
+ - { name: container.service_subscriber, id: oro_payment.provider.payment_transaction, key: Oro\Bundle\PaymentBundle\Provider\PaymentTransactionProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_credit_card, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetCreditCardMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_bancontact, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetBancontactMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_banktransfer, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetBanktransferMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_cashpayment, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetCashpaymentMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_eps, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetEpsMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_giropay, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetGiropayMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_guaranteed_invoice, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetGuaranteedInvoiceMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_guaranteed_sepa, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetGuaranteedSepaMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_ideal, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetIdealMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_instalment_invoice, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetInstalmentInvoiceMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_instalment_sepa, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetInstalmentSepaMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_invoice, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetInvoiceMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_multibanco, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetMultibancoMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_paypal, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetPaypalMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_postfinance_card, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetPostfinanceCardMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_postfinance, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetPostfinanceMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_prepayment, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetPrepaymentMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_przelewy, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetPrzelewyMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_sepa, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetSepaMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_alipay, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetAlipayMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_wechatpay, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetWechatpayMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_onlinebanktransfer, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetOnlinebanktransferMethodProvider }
+ - { name: container.service_subscriber, id: novalnet.payment_method_provider.novalnet_trustly, key: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetTrustlyMethodProvider }
+
+ Novalnet\Bundle\NovalnetBundle\Controller\NovalnetSettingsController:
+ calls:
+ - [setContainer, ['@Psr\Container\ContainerInterface']]
+ tags:
+ - { name: container.service_subscriber }
+ - { name: container.service_subscriber, id: novalnet.client.gateway, key: Novalnet\Bundle\NovalnetBundle\Client\Gateway }
+
+ Novalnet\Bundle\NovalnetBundle\Controller\Frontend\AjaxNovalnetController:
+ calls:
+ - [setContainer, ['@Psr\Container\ContainerInterface']]
+ tags:
+ - { name: container.service_subscriber }
diff --git a/Resources/config/form_types.yml b/Resources/config/form_types.yml
new file mode 100755
index 0000000..4afa81a
--- /dev/null
+++ b/Resources/config/form_types.yml
@@ -0,0 +1,68 @@
+services:
+ novalnet.form.type.settings:
+ class: Novalnet\Bundle\NovalnetBundle\Form\Type\NovalnetSettingsType
+ arguments:
+ - '@translator'
+ - '@novalnet.settings.novalnet_settings_data.provider'
+ tags:
+ - { name: form.type }
+ novalnet.form.type.instalment_invoice_form_type:
+ class: 'Novalnet\Bundle\NovalnetBundle\Form\Type\InstalmentInvoiceCycleType'
+ arguments:
+ - '@translator'
+ tags:
+ - { name: form.type, alias: novalnet_instalment_invoice_form_type }
+ novalnet.form.type.instalment_sepa_form_type:
+ class: 'Novalnet\Bundle\NovalnetBundle\Form\Type\InstalmentSepaCycleType'
+ arguments:
+ - '@translator'
+ tags:
+ - { name: form.type, alias: novalnet_instalment_sepa_form_type }
+ novalnet.form.type.instalment_sepa_saved_account_details_type:
+ class: 'Novalnet\Bundle\NovalnetBundle\Form\Type\InstalmentSepaSavedAccountDetailsType'
+ arguments:
+ - '@translator'
+ tags:
+ - { name: form.type, alias: novalnet_instalment_sepa_form_type }
+ novalnet.form.type.guaranteed_sepa_form_type:
+ class: 'Novalnet\Bundle\NovalnetBundle\Form\Type\GuaranteedSepaFormType'
+ arguments:
+ - '@translator'
+ tags:
+ - { name: form.type, alias: novalnet_instalment_sepa_saved_account_details_type }
+ novalnet.form.type.guaranteed_sepa_saved_account_details_type:
+ class: 'Novalnet\Bundle\NovalnetBundle\Form\Type\GuaranteedSepaSavedAccountDetailsType'
+ arguments:
+ - '@translator'
+ tags:
+ - { name: form.type, alias: novalnet_guaranteed_sepa_saved_account_details_type }
+ novalnet.form.type.sepa_form_type:
+ class: 'Novalnet\Bundle\NovalnetBundle\Form\Type\SepaFormType'
+ arguments:
+ - '@translator'
+ tags:
+ - { name: form.type, alias: novalnet_sepa_form_type }
+ novalnet.form.type.sepa_saved_account_details_type:
+ class: 'Novalnet\Bundle\NovalnetBundle\Form\Type\SepaSavedAccountDetailsType'
+ arguments:
+ - '@translator'
+ tags:
+ - { name: form.type, alias: novalnet_sepa_saved_account_details_type }
+ novalnet.form.type.paypal_form_type:
+ class: 'Novalnet\Bundle\NovalnetBundle\Form\Type\PaypalFormType'
+ arguments:
+ - '@translator'
+ tags:
+ - { name: form.type, alias: novalnet_paypal_form_type }
+ novalnet.form.type.credit_card_form_type:
+ class: 'Novalnet\Bundle\NovalnetBundle\Form\Type\CreditCardFormType'
+ arguments:
+ - '@translator'
+ tags:
+ - { name: form.type, alias: novalnet_credit_card_form_type }
+ novalnet.form.type.credit_card_saved_card_details_type:
+ class: 'Novalnet\Bundle\NovalnetBundle\Form\Type\CreditCardSavedCardDetailsType'
+ arguments:
+ - '@translator'
+ tags:
+ - { name: form.type, alias: novalnet_credit_card_saved_card_details_type }
diff --git a/Resources/config/jsmodules.yml b/Resources/config/jsmodules.yml
new file mode 100755
index 0000000..4b58831
--- /dev/null
+++ b/Resources/config/jsmodules.yml
@@ -0,0 +1,3 @@
+dynamic-imports:
+ novalnet:
+ - novalnet/js/app/components/novalnet-payment-settings-component
diff --git a/Resources/config/method.yml b/Resources/config/method.yml
new file mode 100755
index 0000000..06f0d52
--- /dev/null
+++ b/Resources/config/method.yml
@@ -0,0 +1,1192 @@
+parameters:
+ novalnet.payment_method.novalnet: 'novalnet'
+ novalnet.payment_method.identifier_prefix.novalnet_sepa: 'novalnet_sepa'
+ novalnet.payment_method.identifier_prefix.novalnet_credit_card: 'novalnet_credit_card'
+ novalnet.payment_method.identifier_prefix.novalnet_invoice: 'novalnet_invoice'
+ novalnet.payment_method.identifier_prefix.novalnet_prepayment: 'novalnet_prepayment'
+ novalnet.payment_method.identifier_prefix.novalnet_guaranteed_invoice: 'novalnet_guaranteed_invoice'
+ novalnet.payment_method.identifier_prefix.novalnet_guaranteed_sepa: 'novalnet_guaranteed_sepa'
+ novalnet.payment_method.identifier_prefix.novalnet_instalment_invoice: 'novalnet_instalment_invoice'
+ novalnet.payment_method.identifier_prefix.novalnet_instalment_sepa: 'novalnet_instalment_sepa'
+ novalnet.payment_method.identifier_prefix.novalnet_ideal: 'novalnet_ideal'
+ novalnet.payment_method.identifier_prefix.novalnet_banktransfer: 'novalnet_banktransfer'
+ novalnet.payment_method.identifier_prefix.novalnet_cashpayment: 'novalnet_cashpayment'
+ novalnet.payment_method.identifier_prefix.novalnet_giropay: 'novalnet_giropay'
+ novalnet.payment_method.identifier_prefix.novalnet_przelewy: 'novalnet_przelewy'
+ novalnet.payment_method.identifier_prefix.novalnet_eps: 'novalnet_eps'
+ novalnet.payment_method.identifier_prefix.novalnet_paypal: 'novalnet_paypal'
+ novalnet.payment_method.identifier_prefix.novalnet_postfinance_card: 'novalnet_postfinance_card'
+ novalnet.payment_method.identifier_prefix.novalnet_postfinance: 'novalnet_postfinance'
+ novalnet.payment_method.identifier_prefix.novalnet_bancontact: 'novalnet_bancontact'
+ novalnet.payment_method.identifier_prefix.novalnet_multibanco: 'novalnet_multibanco'
+ novalnet.payment_method.identifier_prefix.novalnet_alipay: 'novalnet_alipay'
+ novalnet.payment_method.identifier_prefix.novalnet_wechatpay: 'novalnet_wechatpay'
+ novalnet.payment_method.identifier_prefix.novalnet_onlinebanktransfer: 'novalnet_onlinebanktransfer'
+ novalnet.payment_method.identifier_prefix.novalnet_trustly: 'novalnet_trustly'
+
+services:
+ novalnet.generator.identifier.novalnet_sepa:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_sepa%'
+
+ novalnet.generator.identifier.novalnet_credit_card:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_credit_card%'
+
+ novalnet.generator.identifier.novalnet_invoice:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_invoice%'
+
+ novalnet.generator.identifier.novalnet_prepayment:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_prepayment%'
+
+ novalnet.generator.identifier.novalnet_guaranteed_invoice:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_guaranteed_invoice%'
+
+ novalnet.generator.identifier.novalnet_guaranteed_sepa:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_guaranteed_sepa%'
+
+ novalnet.generator.identifier.novalnet_instalment_invoice:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_instalment_invoice%'
+
+ novalnet.generator.identifier.novalnet_instalment_sepa:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_instalment_sepa%'
+
+ novalnet.generator.identifier.novalnet_ideal:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_ideal%'
+
+ novalnet.generator.identifier.novalnet_banktransfer:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_banktransfer%'
+
+ novalnet.generator.identifier.novalnet_giropay:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_giropay%'
+
+ novalnet.generator.identifier.novalnet_cashpayment:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_cashpayment%'
+
+ novalnet.generator.identifier.novalnet_przelewy:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_przelewy%'
+
+ novalnet.generator.identifier.novalnet_eps:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_eps%'
+
+ novalnet.generator.identifier.novalnet_paypal:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_paypal%'
+
+ novalnet.generator.identifier.novalnet_postfinance_card:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_postfinance_card%'
+
+ novalnet.generator.identifier.novalnet_postfinance:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_postfinance%'
+
+ novalnet.generator.identifier.novalnet_bancontact:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_bancontact%'
+
+ novalnet.generator.identifier.novalnet_multibanco:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_multibanco%'
+
+ novalnet.generator.identifier.novalnet_alipay:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_alipay%'
+
+ novalnet.generator.identifier.novalnet_wechatpay:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_wechatpay%'
+
+ novalnet.generator.identifier.novalnet_onlinebanktransfer:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_onlinebanktransfer%'
+
+ novalnet.generator.identifier.novalnet_trustly:
+ parent: oro_integration.generator.prefixed_identifier_generator
+ public: true
+ arguments:
+ - '%novalnet.payment_method.identifier_prefix.novalnet_trustly%'
+
+ novalnet.payment_method.config.factory.novalnet_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetSepaConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_sepa'
+
+ novalnet.payment_method.config.factory.novalnet_credit_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetCreditCardConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_credit_card'
+
+ novalnet.payment_method.config.factory.novalnet_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetInvoiceConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_invoice'
+
+ novalnet.payment_method.config.factory.novalnet_prepayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetPrepaymentConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_prepayment'
+
+ novalnet.payment_method.config.factory.novalnet_guaranteed_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetGuaranteedInvoiceConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_guaranteed_invoice'
+
+ novalnet.payment_method.config.factory.novalnet_guaranteed_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetGuaranteedSepaConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_guaranteed_sepa'
+
+ novalnet.payment_method.config.factory.novalnet_instalment_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetInstalmentInvoiceConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_instalment_invoice'
+
+ novalnet.payment_method.config.factory.novalnet_instalment_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetInstalmentSepaConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_instalment_sepa'
+
+ novalnet.payment_method.config.factory.novalnet_ideal:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetIdealConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_ideal'
+
+ novalnet.payment_method.config.factory.novalnet_alipay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetAlipayConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_alipay'
+
+ novalnet.payment_method.config.factory.novalnet_wechatpay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetWechatpayConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_wechatpay'
+
+ novalnet.payment_method.config.factory.novalnet_onlinebanktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetOnlinebanktransferConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_onlinebanktransfer'
+
+ novalnet.payment_method.config.factory.novalnet_trustly:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetTrustlyConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_trustly'
+
+ novalnet.payment_method.config.factory.novalnet_banktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetBanktransferConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_banktransfer'
+
+ novalnet.payment_method.config.factory.novalnet_giropay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetGiropayConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_giropay'
+
+ novalnet.payment_method.config.factory.novalnet_cashpayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetCashpaymentConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_cashpayment'
+
+ novalnet.payment_method.config.factory.novalnet_przelewy:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetPrzelewyConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_przelewy'
+
+ novalnet.payment_method.config.factory.novalnet_eps:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetEpsConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_eps'
+
+ novalnet.payment_method.config.factory.novalnet_paypal:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetPaypalConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_paypal'
+
+
+ novalnet.payment_method.config.factory.novalnet_postfinance_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetPostfinanceCardConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_postfinance_card'
+
+ novalnet.payment_method.config.factory.novalnet_postfinance:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetPostfinanceConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_postfinance'
+
+ novalnet.payment_method.config.factory.novalnet_bancontact:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetBancontactConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_bancontact'
+
+ novalnet.payment_method.config.factory.novalnet_multibanco:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Factory\NovalnetMultibancoConfigFactory'
+ public: false
+ arguments:
+ - '@novalnet.generator.identifier.novalnet_multibanco'
+
+ novalnet.payment_method.config.provider.novalnet_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetSepaConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_sepa'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_credit_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetCreditCardConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_credit_card'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetInvoiceConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_invoice'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_prepayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetPrepaymentConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_prepayment'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_guaranteed_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetGuaranteedInvoiceConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_guaranteed_invoice'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_guaranteed_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetGuaranteedSepaConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_guaranteed_sepa'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_instalment_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetInstalmentInvoiceConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_instalment_invoice'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_instalment_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetInstalmentSepaConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_instalment_sepa'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_ideal:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetIdealConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_ideal'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_alipay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetAlipayConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_alipay'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_wechatpay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetWechatpayConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_wechatpay'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_onlinebanktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetOnlinebanktransferConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_onlinebanktransfer'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_trustly:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetTrustlyConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_trustly'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_banktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetBanktransferConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_banktransfer'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_giropay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetGiropayConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_giropay'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_cashpayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetCashpaymentConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_cashpayment'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_przelewy:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetPrzelewyConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_przelewy'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_eps:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetEpsConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_eps'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_paypal:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetPaypalConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_paypal'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_postfinance_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetPostfinanceCardConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_postfinance_card'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_postfinance:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetPostfinanceConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_postfinance'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_bancontact:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetBancontactConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_bancontact'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.config.provider.novalnet_multibanco:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Config\Provider\NovalnetMultibancoConfigProvider'
+ public: false
+ arguments:
+ - '@doctrine'
+ - '@logger'
+ - '@novalnet.payment_method.config.factory.novalnet_multibanco'
+ - '%novalnet.payment_method.novalnet%'
+
+ novalnet.payment_method.factory.novalnet:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetPaymentMethodFactory'
+ public: false
+ abstract: true
+ arguments:
+ - '@router'
+ - '@oro_entity.doctrine_helper'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@request_stack'
+ - '@translator'
+ - '@oro_frontend_localization.manager.user_localization'
+ - '@novalnet.client.gateway'
+ - '@oro_payment.provider.methods_configs_rules.by_context.basic'
+
+ novalnet.client.gateway:
+ class: 'Novalnet\Bundle\NovalnetBundle\Client\Gateway'
+ public: true
+ arguments:
+ - '@novalnet.client.http'
+
+ novalnet.client.http:
+ class: 'GuzzleHttp\Client'
+ public: true
+
+ novalnet.payment_method.novalnet_helper:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\NovalnetHelper'
+ public: true
+
+ novalnet.payment_method.factory.novalnet_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetSepaPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_credit_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetCreditCardPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetInvoicePaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_prepayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetPrepaymentPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_guaranteed_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetGuaranteedInvoicePaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_guaranteed_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetGuaranteedSepaPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_instalment_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetInstalmentInvoicePaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_instalment_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetInstalmentSepaPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_ideal:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetIdealPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_trustly:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetTrustlyPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_onlinebanktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetOnlinebanktransferPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_wechatpay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetWechatpayPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_alipay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetAlipayPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_banktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetBanktransferPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_giropay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetGiropayPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_cashpayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetCashpaymentPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_przelewy:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetPrzelewyPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_eps:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetEpsPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_paypal:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetPaypalPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_postfinance_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetPostfinanceCardPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_postfinance:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetPostfinancePaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_bancontact:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetBancontactPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.factory.novalnet_multibanco:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\Factory\NovalnetMultibancoPaymentMethodFactory'
+ public: false
+ parent: novalnet.payment_method.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetViewFactory'
+ arguments:
+ - '@form.factory'
+ - '@novalnet.payment_method.novalnet_helper'
+ - '@translator'
+ - '@doctrine'
+ - '@oro_frontend_localization.manager.user_localization'
+ public: false
+ abstract: true
+
+ novalnet.payment_method.view.factory.novalnet_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetSepaViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_credit_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetCreditCardViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetInvoiceViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_prepayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetPrepaymentViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_guaranteed_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetGuaranteedInvoiceViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_guaranteed_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetGuaranteedSepaViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_instalment_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetInstalmentInvoiceViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_instalment_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetInstalmentSepaViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_ideal:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetIdealViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_alipay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetAlipayViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_wechatpay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetWechatpayViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_onlinebanktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetOnlinebanktransferViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_trustly:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetTrustlyViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_banktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetBanktransferViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_giropay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetGiropayViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_cashpayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetCashpaymentViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_przelewy:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetPrzelewyViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_eps:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetEpsViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_paypal:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetPaypalViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_postfinance:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetPostfinanceViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_postfinance_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetPostfinanceCardViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_bancontact:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetBancontactViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method.view.factory.novalnet_multibanco:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Factory\NovalnetMultibancoViewFactory'
+ public: false
+ parent: novalnet.payment_method.view.factory.novalnet
+
+ novalnet.payment_method_provider.novalnet_sepa:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetSepaMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_sepa'
+ - '@novalnet.payment_method.factory.novalnet_sepa'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_credit_card:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetCreditCardMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_credit_card'
+ - '@novalnet.payment_method.factory.novalnet_credit_card'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_invoice:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetInvoiceMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_invoice'
+ - '@novalnet.payment_method.factory.novalnet_invoice'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_prepayment:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetPrepaymentMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_prepayment'
+ - '@novalnet.payment_method.factory.novalnet_prepayment'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_guaranteed_invoice:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetGuaranteedInvoiceMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_guaranteed_invoice'
+ - '@novalnet.payment_method.factory.novalnet_guaranteed_invoice'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+ novalnet.payment_method_provider.novalnet_guaranteed_sepa:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetGuaranteedSepaMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_guaranteed_sepa'
+ - '@novalnet.payment_method.factory.novalnet_guaranteed_sepa'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_instalment_invoice:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetInstalmentInvoiceMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_instalment_invoice'
+ - '@novalnet.payment_method.factory.novalnet_instalment_invoice'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_instalment_sepa:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetInstalmentSepaMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_instalment_sepa'
+ - '@novalnet.payment_method.factory.novalnet_instalment_sepa'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_ideal:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetIdealMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_ideal'
+ - '@novalnet.payment_method.factory.novalnet_ideal'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_alipay:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetAlipayMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_alipay'
+ - '@novalnet.payment_method.factory.novalnet_alipay'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_wechatpay:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetWechatpayMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_wechatpay'
+ - '@novalnet.payment_method.factory.novalnet_wechatpay'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_onlinebanktransfer:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetOnlinebanktransferMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_onlinebanktransfer'
+ - '@novalnet.payment_method.factory.novalnet_onlinebanktransfer'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_trustly:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetTrustlyMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_trustly'
+ - '@novalnet.payment_method.factory.novalnet_trustly'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_banktransfer:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetBanktransferMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_banktransfer'
+ - '@novalnet.payment_method.factory.novalnet_banktransfer'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_giropay:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetGiropayMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_giropay'
+ - '@novalnet.payment_method.factory.novalnet_giropay'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_cashpayment:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetCashpaymentMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_cashpayment'
+ - '@novalnet.payment_method.factory.novalnet_cashpayment'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_przelewy:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetPrzelewyMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_przelewy'
+ - '@novalnet.payment_method.factory.novalnet_przelewy'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_eps:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetEpsMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_eps'
+ - '@novalnet.payment_method.factory.novalnet_eps'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_paypal:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetPaypalMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_paypal'
+ - '@novalnet.payment_method.factory.novalnet_paypal'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_postfinance_card:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetPostfinanceCardMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_postfinance_card'
+ - '@novalnet.payment_method.factory.novalnet_postfinance_card'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_postfinance:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetPostfinanceMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_postfinance'
+ - '@novalnet.payment_method.factory.novalnet_postfinance'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_bancontact:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetBancontactMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_bancontact'
+ - '@novalnet.payment_method.factory.novalnet_bancontact'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method_provider.novalnet_multibanco:
+ class: Novalnet\Bundle\NovalnetBundle\PaymentMethod\Provider\NovalnetMultibancoMethodProvider
+ public: true
+ arguments:
+ - '@novalnet.payment_method.config.provider.novalnet_multibanco'
+ - '@novalnet.payment_method.factory.novalnet_multibanco'
+ tags:
+ - { name: oro_payment.payment_method_provider }
+
+ novalnet.payment_method.view.provider.novalnet_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetSepaViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_sepa'
+ - '@novalnet.payment_method.config.provider.novalnet_sepa'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_credit_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetCreditCardViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_credit_card'
+ - '@novalnet.payment_method.config.provider.novalnet_credit_card'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetInvoiceViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_invoice'
+ - '@novalnet.payment_method.config.provider.novalnet_invoice'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_prepayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetPrepaymentViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_prepayment'
+ - '@novalnet.payment_method.config.provider.novalnet_prepayment'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_guaranteed_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetGuaranteedInvoiceViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_guaranteed_invoice'
+ - '@novalnet.payment_method.config.provider.novalnet_guaranteed_invoice'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_guaranteed_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetGuaranteedSepaViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_guaranteed_sepa'
+ - '@novalnet.payment_method.config.provider.novalnet_guaranteed_sepa'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_instalment_invoice:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetInstalmentInvoiceViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_instalment_invoice'
+ - '@novalnet.payment_method.config.provider.novalnet_instalment_invoice'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_instalment_sepa:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetInstalmentSepaViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_instalment_sepa'
+ - '@novalnet.payment_method.config.provider.novalnet_instalment_sepa'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_ideal:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetIdealViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_ideal'
+ - '@novalnet.payment_method.config.provider.novalnet_ideal'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_alipay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetAlipayViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_alipay'
+ - '@novalnet.payment_method.config.provider.novalnet_alipay'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_wechatpay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetWechatpayViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_wechatpay'
+ - '@novalnet.payment_method.config.provider.novalnet_wechatpay'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_onlinebanktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetOnlinebanktransferViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_onlinebanktransfer'
+ - '@novalnet.payment_method.config.provider.novalnet_onlinebanktransfer'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_trustly:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetTrustlyViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_trustly'
+ - '@novalnet.payment_method.config.provider.novalnet_trustly'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_banktransfer:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetBanktransferViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_banktransfer'
+ - '@novalnet.payment_method.config.provider.novalnet_banktransfer'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_giropay:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetGiropayViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_giropay'
+ - '@novalnet.payment_method.config.provider.novalnet_giropay'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_cashpayment:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetCashpaymentViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_cashpayment'
+ - '@novalnet.payment_method.config.provider.novalnet_cashpayment'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_przelewy:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetPrzelewyViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_przelewy'
+ - '@novalnet.payment_method.config.provider.novalnet_przelewy'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_eps:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetEpsViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_eps'
+ - '@novalnet.payment_method.config.provider.novalnet_eps'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_paypal:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetPaypalViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_paypal'
+ - '@novalnet.payment_method.config.provider.novalnet_paypal'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_postfinance_card:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetPostfinanceCardViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_postfinance_card'
+ - '@novalnet.payment_method.config.provider.novalnet_postfinance_card'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_postfinance:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetPostfinanceViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_postfinance'
+ - '@novalnet.payment_method.config.provider.novalnet_postfinance'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_bancontact:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetBancontactViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_bancontact'
+ - '@novalnet.payment_method.config.provider.novalnet_bancontact'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
+
+ novalnet.payment_method.view.provider.novalnet_multibanco:
+ class: 'Novalnet\Bundle\NovalnetBundle\PaymentMethod\View\Provider\NovalnetMultibancoViewProvider'
+ public: false
+ arguments:
+ - '@novalnet.payment_method.view.factory.novalnet_multibanco'
+ - '@novalnet.payment_method.config.provider.novalnet_multibanco'
+ tags:
+ - { name: oro_payment.payment_method_view_provider }
diff --git a/Resources/config/oro/app.yml b/Resources/config/oro/app.yml
new file mode 100755
index 0000000..44267b1
--- /dev/null
+++ b/Resources/config/oro/app.yml
@@ -0,0 +1,7 @@
+monolog:
+ handlers:
+ novalnet:
+ level: debug
+ type: stream
+ path: '%kernel.logs_dir%/novalnet.log'
+ channels: novalnet
diff --git a/Resources/config/oro/assets.yml b/Resources/config/oro/assets.yml
new file mode 100755
index 0000000..799dd31
--- /dev/null
+++ b/Resources/config/oro/assets.yml
@@ -0,0 +1,3 @@
+css:
+ inputs:
+ - 'bundles/novalnet/default/scss/style.scss'
diff --git a/Resources/config/oro/bundles.yml b/Resources/config/oro/bundles.yml
new file mode 100755
index 0000000..0dfc931
--- /dev/null
+++ b/Resources/config/oro/bundles.yml
@@ -0,0 +1,2 @@
+bundles:
+ - Novalnet\Bundle\NovalnetBundle\NovalnetBundle
diff --git a/Resources/config/oro/datagrids.yml b/Resources/config/oro/datagrids.yml
new file mode 100755
index 0000000..e64fa95
--- /dev/null
+++ b/Resources/config/oro/datagrids.yml
@@ -0,0 +1,32 @@
+datagrids:
+ order-payment-transactions-grid:
+ properties:
+ novalnet_payment_transaction_refund_link:
+ type: url
+ route: novalnet_transaction_show_refund
+ params: { paymentTransactionId: id }
+ novalnet_payment_manage_transaction_link:
+ type: url
+ route: novalnet_transaction_show_manage_transaction
+ params: { paymentTransactionId: id }
+ actions:
+ refund:
+ type: dialog
+ label: novalnet.order.action.payment_refund.label
+ link: novalnet_payment_transaction_refund_link
+ icon: money
+ widgetOptions:
+ options:
+ dialogOptions:
+ title: "@translator->trans(novalnet.order.action.payment_refund.label)"
+ width: auto
+ manage_transaction:
+ type: dialog
+ label: novalnet.order.action.manage_transaction.label
+ link: novalnet_payment_manage_transaction_link
+ icon: pencil
+ widgetOptions:
+ options:
+ dialogOptions:
+ title: "@translator->trans(novalnet.order.action.manage_transaction.label)"
+ action_configuration: ['@novalnet.datagrid.order_payment_transactions.action_permission_provider', "getActionPermissions"]
diff --git a/Resources/config/oro/routing.yml b/Resources/config/oro/routing.yml
new file mode 100755
index 0000000..bd4b819
--- /dev/null
+++ b/Resources/config/oro/routing.yml
@@ -0,0 +1,21 @@
+novalnet_frontend_ajax:
+ resource: "@NovalnetBundle/Controller/Frontend/AjaxNovalnetController.php"
+ type: annotation
+ prefix: /novalnet
+ options:
+ frontend: true
+ expose: true
+
+novalnet_settings:
+ resource: "@NovalnetBundle/Controller/NovalnetSettingsController.php"
+ type: annotation
+ prefix: /novalnet-settings
+ options:
+ expose: true
+
+novalnet_extension:
+ resource: "@NovalnetBundle/Controller/NovalnetExtensionController.php"
+ type: annotation
+ prefix: /novalnet-extension
+ options:
+ expose: true
diff --git a/Resources/config/oro/twig.yml b/Resources/config/oro/twig.yml
new file mode 100755
index 0000000..65bff44
--- /dev/null
+++ b/Resources/config/oro/twig.yml
@@ -0,0 +1,2 @@
+bundles:
+ - '@Novalnet/Form/fields.html.twig'
diff --git a/Resources/config/services.yml b/Resources/config/services.yml
new file mode 100755
index 0000000..6709638
--- /dev/null
+++ b/Resources/config/services.yml
@@ -0,0 +1,30 @@
+services:
+ novalnet.integration.channel:
+ class: Novalnet\Bundle\NovalnetBundle\Integration\NovalnetChannelType
+ public: true
+ tags:
+ - { name: oro_integration.channel, type: novalnet }
+
+ novalnet.integration.transport:
+ class: Novalnet\Bundle\NovalnetBundle\Integration\NovalnetTransport
+ public: false
+ tags:
+ - { name: oro_integration.transport, type: novalnet, channel_type: novalnet }
+
+ novalnet.settings.novalnet_settings_data.provider:
+ class: 'Novalnet\Bundle\NovalnetBundle\Settings\DataProvider\BasicNovalnetSettingsDataProvider'
+
+ novalnet.datagrid.order_payment_transactions.action_permission_provider:
+ class: Novalnet\Bundle\NovalnetBundle\Datagrid\ActionPermissionProvider
+ public: true
+ arguments:
+ - '@doctrine.orm.entity_manager'
+ - '@oro_entity.doctrine_helper'
+
+ novalnet.layout.provider.novalnet_transaction_data_provider:
+ class: 'Novalnet\Bundle\NovalnetBundle\Layout\DataProvider\NovalentTransactionDataProvider'
+ arguments:
+ - '@doctrine'
+ tags:
+ - { name: layout.data_provider, alias: novalnet_transaction_data_provider }
+
diff --git a/Resources/config/validation.yml b/Resources/config/validation.yml
new file mode 100755
index 0000000..500be59
--- /dev/null
+++ b/Resources/config/validation.yml
@@ -0,0 +1,27 @@
+Novalnet\Bundle\NovalnetBundle\Entity\NovalnetSettings:
+ properties:
+ paymentAccessKey:
+ - NotBlank: ~
+ productActivationKey:
+ - NotBlank: ~
+ invoiceDuedate:
+ - Valid: ~
+ - Length:
+ max: 2
+ sepaDuedate:
+ - Length:
+ max: 2
+ cashpaymentDuedate:
+ - Valid: ~
+ - Length:
+ max: 2
+ prepaymentDuedate:
+ - Valid: ~
+ - Length:
+ max: 2
+ callbackEmailTo:
+ - Regex:
+ pattern: '/^([\w_\-\.]+)@([\w0-9\-]+\.)+([\w0-9\-\.]+)+([,]([\w0-9_\-\.]+)@([\w0-9\-]+\.)+([\w0-9\-\.]+))*$/'
+ - Length:
+ max: 255
+
diff --git a/Resources/novalnet_callback.html.twig b/Resources/novalnet_callback.html.twig
new file mode 100755
index 0000000..986a4a1
--- /dev/null
+++ b/Resources/novalnet_callback.html.twig
@@ -0,0 +1 @@
+Hello
diff --git a/Resources/public/default/scss/style.scss b/Resources/public/default/scss/style.scss
new file mode 100755
index 0000000..5c01156
--- /dev/null
+++ b/Resources/public/default/scss/style.scss
@@ -0,0 +1,94 @@
+.nn-test-mode{
+ position: relative;
+ background-color: #0080c9;
+ color: #fff;
+ padding: 10px 20px;
+ margin-bottom: 8px;
+ font-size: 10px;
+ text-align: center;
+ text-transform: uppercase;
+ letter-spacing: 1px;
+ line-height: 0.8px;
+ border-radius: 0px 0px 5px 5px;
+ transition: transform 0.5s ease 0.5s;
+ animation: novalnet-blinker 4s linear infinite;
+ font-weight: bold;
+ float: right;
+}
+
+@keyframes novalnet-blinker {
+ 100% {
+ opacity: 0;
+ }
+}
+.nn-info-box{
+ position: relative;
+ width: auto;
+ height: auto;
+ background: content-box;
+ font-size: 14px;
+ color: #333;
+ margin: 20px 0px;
+ padding: 1em 0;
+ border-left: 5px solid #0080c9;
+ box-shadow: 0 0 8px 0px rgba(0,0,0,.4);
+ clear: both;
+}
+
+.nn-info-box ul {
+ margin: 0 20px 0px 20px;
+ padding: 0;
+}
+
+.nn-info-box li {
+ list-style-type: none;
+}
+
+.info-box p {
+ padding: 0 1em;
+ margin-bottom: 0px;
+}
+
+.info-box a {
+ padding: 0 1em;
+ margin-bottom: 0px;
+}
+
+.nn-bold {
+ font-weight: bold;
+}
+
+.novalnet_cc_overlay {
+ position: fixed;
+ width: 100%;
+ height: 100% !important;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 9999;
+ cursor: pointer;
+}
+
+#novalnet_instalment_table {
+ border-collapse: collapse;
+ width: 100%;
+}
+
+#novalnet_instalment_table td, #novalnet_instalment_table th {
+ border: 1px solid #ddd;
+ padding: 8px;
+}
+
+#novalnet_instalment_table tr:nth-child(even){background-color: #f2f2f2;}
+
+#novalnet_instalment_table tr:hover {background-color: #ddd;}
+
+#novalnet_instalment_table th {
+ padding-top: 12px;
+ padding-bottom: 12px;
+ text-align: left;
+ background-color: #545456;
+ color: white;
+}
diff --git a/Resources/public/img/alipay.png b/Resources/public/img/alipay.png
new file mode 100755
index 0000000..3c7e61d
Binary files /dev/null and b/Resources/public/img/alipay.png differ
diff --git a/Resources/public/img/amex.png b/Resources/public/img/amex.png
new file mode 100755
index 0000000..cfbbba5
Binary files /dev/null and b/Resources/public/img/amex.png differ
diff --git a/Resources/public/img/bancontact.png b/Resources/public/img/bancontact.png
new file mode 100755
index 0000000..d0491c7
Binary files /dev/null and b/Resources/public/img/bancontact.png differ
diff --git a/Resources/public/img/banktransfer.png b/Resources/public/img/banktransfer.png
new file mode 100755
index 0000000..3804437
Binary files /dev/null and b/Resources/public/img/banktransfer.png differ
diff --git a/Resources/public/img/barzahlen.png b/Resources/public/img/barzahlen.png
new file mode 100755
index 0000000..1eb4d4b
Binary files /dev/null and b/Resources/public/img/barzahlen.png differ
diff --git a/Resources/public/img/cartasi.png b/Resources/public/img/cartasi.png
new file mode 100755
index 0000000..8b2cc12
Binary files /dev/null and b/Resources/public/img/cartasi.png differ
diff --git a/Resources/public/img/carte_bleue.png b/Resources/public/img/carte_bleue.png
new file mode 100755
index 0000000..ffe67f4
Binary files /dev/null and b/Resources/public/img/carte_bleue.png differ
diff --git a/Resources/public/img/diners.png b/Resources/public/img/diners.png
new file mode 100755
index 0000000..d9d4810
Binary files /dev/null and b/Resources/public/img/diners.png differ
diff --git a/Resources/public/img/discover.png b/Resources/public/img/discover.png
new file mode 100755
index 0000000..6db9e3c
Binary files /dev/null and b/Resources/public/img/discover.png differ
diff --git a/Resources/public/img/eps.png b/Resources/public/img/eps.png
new file mode 100755
index 0000000..02875ae
Binary files /dev/null and b/Resources/public/img/eps.png differ
diff --git a/Resources/public/img/giropay.png b/Resources/public/img/giropay.png
new file mode 100755
index 0000000..5bcd509
Binary files /dev/null and b/Resources/public/img/giropay.png differ
diff --git a/Resources/public/img/guaranteed_invoice.png b/Resources/public/img/guaranteed_invoice.png
new file mode 100755
index 0000000..e9a4a36
Binary files /dev/null and b/Resources/public/img/guaranteed_invoice.png differ
diff --git a/Resources/public/img/guaranteed_sepa.png b/Resources/public/img/guaranteed_sepa.png
new file mode 100755
index 0000000..7daf3ca
Binary files /dev/null and b/Resources/public/img/guaranteed_sepa.png differ
diff --git a/Resources/public/img/ideal.png b/Resources/public/img/ideal.png
new file mode 100755
index 0000000..9d08251
Binary files /dev/null and b/Resources/public/img/ideal.png differ
diff --git a/Resources/public/img/instalment_invoice.png b/Resources/public/img/instalment_invoice.png
new file mode 100755
index 0000000..e9a4a36
Binary files /dev/null and b/Resources/public/img/instalment_invoice.png differ
diff --git a/Resources/public/img/instalment_sepa.png b/Resources/public/img/instalment_sepa.png
new file mode 100755
index 0000000..7daf3ca
Binary files /dev/null and b/Resources/public/img/instalment_sepa.png differ
diff --git a/Resources/public/img/invoice.png b/Resources/public/img/invoice.png
new file mode 100755
index 0000000..e9a4a36
Binary files /dev/null and b/Resources/public/img/invoice.png differ
diff --git a/Resources/public/img/jcb.png b/Resources/public/img/jcb.png
new file mode 100755
index 0000000..0064100
Binary files /dev/null and b/Resources/public/img/jcb.png differ
diff --git a/Resources/public/img/loader.gif b/Resources/public/img/loader.gif
new file mode 100755
index 0000000..0949768
Binary files /dev/null and b/Resources/public/img/loader.gif differ
diff --git a/Resources/public/img/maestro.png b/Resources/public/img/maestro.png
new file mode 100755
index 0000000..26c6386
Binary files /dev/null and b/Resources/public/img/maestro.png differ
diff --git a/Resources/public/img/mastercard.png b/Resources/public/img/mastercard.png
new file mode 100755
index 0000000..fed2b8e
Binary files /dev/null and b/Resources/public/img/mastercard.png differ
diff --git a/Resources/public/img/multibanco.png b/Resources/public/img/multibanco.png
new file mode 100755
index 0000000..f652230
Binary files /dev/null and b/Resources/public/img/multibanco.png differ
diff --git a/Resources/public/img/novalnet-icon.ico b/Resources/public/img/novalnet-icon.ico
new file mode 100755
index 0000000..bfaab54
Binary files /dev/null and b/Resources/public/img/novalnet-icon.ico differ
diff --git a/Resources/public/img/onlinebanktransfer.png b/Resources/public/img/onlinebanktransfer.png
new file mode 100755
index 0000000..2856393
Binary files /dev/null and b/Resources/public/img/onlinebanktransfer.png differ
diff --git a/Resources/public/img/paypal.png b/Resources/public/img/paypal.png
new file mode 100755
index 0000000..9defac5
Binary files /dev/null and b/Resources/public/img/paypal.png differ
diff --git a/Resources/public/img/postfinance.png b/Resources/public/img/postfinance.png
new file mode 100755
index 0000000..0b34416
Binary files /dev/null and b/Resources/public/img/postfinance.png differ
diff --git a/Resources/public/img/postfinance_card.png b/Resources/public/img/postfinance_card.png
new file mode 100755
index 0000000..e704b07
Binary files /dev/null and b/Resources/public/img/postfinance_card.png differ
diff --git a/Resources/public/img/prepayment.png b/Resources/public/img/prepayment.png
new file mode 100755
index 0000000..9104281
Binary files /dev/null and b/Resources/public/img/prepayment.png differ
diff --git a/Resources/public/img/przelewy.png b/Resources/public/img/przelewy.png
new file mode 100755
index 0000000..331d7b3
Binary files /dev/null and b/Resources/public/img/przelewy.png differ
diff --git a/Resources/public/img/sepa.png b/Resources/public/img/sepa.png
new file mode 100755
index 0000000..7daf3ca
Binary files /dev/null and b/Resources/public/img/sepa.png differ
diff --git a/Resources/public/img/trustly.png b/Resources/public/img/trustly.png
new file mode 100755
index 0000000..574a8fe
Binary files /dev/null and b/Resources/public/img/trustly.png differ
diff --git a/Resources/public/img/unionpay.png b/Resources/public/img/unionpay.png
new file mode 100755
index 0000000..5b8c37c
Binary files /dev/null and b/Resources/public/img/unionpay.png differ
diff --git a/Resources/public/img/visa.png b/Resources/public/img/visa.png
new file mode 100755
index 0000000..87b9709
Binary files /dev/null and b/Resources/public/img/visa.png differ
diff --git a/Resources/public/img/wechatpay.png b/Resources/public/img/wechatpay.png
new file mode 100755
index 0000000..1b79553
Binary files /dev/null and b/Resources/public/img/wechatpay.png differ
diff --git a/Resources/public/js/app/components/creditcard-additional-fields-component.js b/Resources/public/js/app/components/creditcard-additional-fields-component.js
new file mode 100755
index 0000000..c8547dd
--- /dev/null
+++ b/Resources/public/js/app/components/creditcard-additional-fields-component.js
@@ -0,0 +1,412 @@
+define(function (require) {
+ 'use strict';
+
+ const mediator = require('oroui/js/mediator');
+ const _ = require('underscore');
+ const $ = require('jquery');
+ const __ = require('orotranslation/js/translator');
+ const scriptjs = require('scriptjs');
+ const Modal = require('oroui/js/modal');
+ const routing = require('routing');
+ require('jquery.validate');
+
+ const BaseComponent = require('oroui/js/app/components/base/component');
+
+ const CreditCardAdditionalFieldsComponent = BaseComponent.extend({
+
+ /**
+ * @property {jQuery}
+ */
+ $el: null,
+
+ /**
+ * @property {Boolean}
+ */
+ disposable: true,
+
+ /**
+ * @property {Object}
+ */
+ options: {
+ paymentMethod: null,
+ selectors: {
+ fieldPanHash: '[name$="novalnet_credit_card_form_type[panhash]"]',
+ fieldUniqueId: '[name$="novalnet_credit_card_form_type[uniqueId]"]',
+ fieldDoRedirect: '[name$="novalnet_credit_card_form_type[doRedirect]"]',
+ fieldCustomerDetails: '[name$="novalnet_credit_card_form_type[customerDetails]"]',
+ fieldClientKey: '[name$="novalnet_credit_card_form_type[clientKey]"]',
+ fieldLabelstyle: '[name$="novalnet_credit_card_form_type[labelStyle]"]',
+ fieldInputstyle: '[name$="novalnet_credit_card_form_type[inputStyle]"]',
+ fieldContainerstyle: '[name$="novalnet_credit_card_form_type[containerStyle]"]',
+ fieldInlineForm: '[name$="novalnet_credit_card_form_type[inlineForm]"]',
+ fieldEnforce3d: '[name$="novalnet_credit_card_form_type[enforce3d]"]',
+ fieldSaveCardDetails: '[name$="novalnet_credit_card_form_type[saveCardDetails]"]',
+ fieldCreditCardToken : '[name$="novalnet_credit_card_form_type[creditCardSavedCardDetails][paymentData]"]:checked',
+ }
+ },
+
+ /**
+ * @inheritDoc
+ */
+ constructor: function CreditCardAdditionalFieldsComponent(options)
+ {
+ CreditCardAdditionalFieldsComponent.__super__.constructor.call(this, options);
+ },
+
+ /**
+ * @inheritDoc
+ */
+ initialize: function (options) {
+ this.options = _.extend({}, this.options, options);
+ this.$el = $(options._sourceElement);
+
+
+ $('input[name="novalnet_credit_card_form_type[creditCardSavedCardDetails][paymentData]"]').change(function (event) {
+ if ($('input[name="novalnet_credit_card_form_type[creditCardSavedCardDetails][paymentData]"]:checked').val() == 'new_account_details') {
+ $('#novalnet-credit-card-payment-form').show();
+ } else {
+ $('#novalnet-credit-card-payment-form').hide();
+ }
+ });
+
+ $('.credit-card-remove-saved-card-details').click(function (event) {
+ const modal = new Modal({
+ allowCancel: true,
+ className: 'modal modal-primary',
+ title: __('novalnet.remove_card_details_confirmation_text'),
+ content: ''
+ });
+ modal.on('ok', _.bind(function () {
+ const tokenId = $(this).attr('data-token-id');
+ $.ajax({
+ url: routing.generate("novalnet_frontend_ajax_remove_payment_data", { id: tokenId }),
+ type: 'POST',
+ }).done(function (data) {
+
+ if (data.successful == true) {
+ $('#credit_card_saved_card_details_'+tokenId).remove();
+ mediator.execute(
+ 'showFlashMessage',
+ 'success',
+ __('novalnet.remove_card_details_success_msg')
+ );
+ } else {
+ mediator.execute(
+ 'showFlashMessage',
+ 'error',
+ __('novalnet.remove_card_details_failure_msg')
+ );
+ }
+ }).fail(function (jqXHR, textStatus, errorThrown) {
+ mediator.execute(
+ 'showFlashMessage',
+ 'success',
+ errorThrown
+ );
+ });
+ }, this));
+
+ modal.open();
+ });
+
+
+
+ if (typeof NovalnetUtility !== 'object') {
+ scriptjs('https://cdn.novalnet.de/js/v2/NovalnetUtility.js', this._includeJs.bind(this));
+ } else {
+ this.loadNovalnetPaymentIframe(this.$el);
+ }
+
+ mediator.on('checkout:payment:before-transit', this.beforeTransit, this);
+ mediator.on('checkout:payment:before-hide-filled-form', this.beforeHideFilledForm, this);
+ mediator.on('checkout:payment:before-restore-filled-form', this.beforeRestoreFilledForm, this);
+ mediator.on('checkout:payment:remove-filled-form', this.removeFilledForm, this);
+ mediator.on('checkout-content:initialized', this.refreshPaymentMethod, this);
+
+ },
+
+ refreshPaymentMethod: function () {
+ mediator.trigger('checkout:payment:method:refresh');
+ },
+
+ beforeHideFilledForm: function () {
+ this.disposable = false;
+ },
+
+ beforeRestoreFilledForm: function () {
+ if (this.disposable) {
+ this.dispose();
+ }
+ },
+
+ removeFilledForm: function () {
+ // Remove hidden form js component
+ if (!this.disposable) {
+ this.disposable = true;
+ this.dispose();
+ }
+ },
+
+ _includeJs: function () {
+ mediator.execute('showLoading');
+ this.loadNovalnetPaymentIframe(this.$el);
+ mediator.execute('hideLoading');
+
+ },
+
+
+ loadNovalnetPaymentIframe: function (form) {
+ var inlineForm = form.find(this.options.selectors.fieldInlineForm).val();
+ var enforce3d = form.find(this.options.selectors.fieldEnforce3d).val();
+
+ if (inlineForm == 0) {
+ $('#novalnet_cc_iframe').css('min-height', '175px');
+ }
+
+ $('input[name="novalnet_credit_card_form_type[panhash]"]').val('');
+ $('input[name="novalnet_credit_card_form_type[uniqueId]"]').val('');
+ $('input[name="novalnet_credit_card_form_type[doRedirect]"]').val('');
+
+ const clientKey = form.find(this.options.selectors.fieldClientKey).val();
+
+ const customerDetails = JSON.parse(form.find(this.options.selectors.fieldCustomerDetails).val());
+
+ NovalnetUtility.setClientKey(clientKey);
+
+ const configurationObject = {
+
+ // You can handle the process here, when specific events occur.
+ callback: {
+
+ // Called once the pan_hash (temp. token) created successfully.
+ on_success: function (data) {
+
+ $('input[name="novalnet_credit_card_form_type[panhash]"]').val(data ['hash']);
+ $('input[name="novalnet_credit_card_form_type[uniqueId]"]').val(data ['unique_id']);
+ $('input[name="novalnet_credit_card_form_type[doRedirect]"]').val(data ['do_redirect']);
+
+ $('form[name="oro_workflow_transition"]').submit();
+
+ return true;
+ },
+
+ // Called in case of an invalid payment data or incomplete input.
+ on_error: function (data) {
+ if ( undefined !== data['error_message'] ) {
+ mediator.execute(
+ 'showFlashMessage',
+ 'error',
+ data['error_message'],
+ );
+ return false;
+ }
+ },
+
+ // Called in case the Challenge window Overlay (for 3ds2.0) displays
+ on_show_overlay: function (data) {
+ $('#novalnet_cc_iframe').addClass('novalnet_cc_overlay');
+ },
+
+ // Called in case the Challenge window Overlay (for 3ds2.0) hided
+ on_hide_overlay: function (data) {
+ $('#novalnet_cc_iframe').removeClass('novalnet_cc_overlay');
+ }
+ },
+
+ // You can customize your Iframe container styel, text etc.
+ iframe: {
+
+ // It is mandatory to pass the Iframe ID here. Based on which the entire process will took place.
+ id: "novalnet_cc_iframe",
+
+ // Set to 1 to make you Iframe input container more compact (default - 0)
+ inline: inlineForm,
+
+ skip_auth: 1,
+
+ // Add the style (css) here for either the whole Iframe contanier or for particular label/input field
+ style: {
+ // The css for the Iframe container
+ container: form.find(this.options.selectors.fieldContainerStyle).val(),
+
+ // The css for the input field of the Iframe container
+ input: form.find(this.options.selectors.fieldInputStyle).val(),
+
+ // The css for the label of the Iframe container
+ label: form.find(this.options.selectors.fieldLabelStyle).val(),
+ },
+
+ // You can customize the text of the Iframe container here
+ text: {
+
+ // Basic Error Message
+ error: __('novalnet.cc_error_msg'),
+
+ // You can customize the text for the Card Holder here
+ card_holder : {
+
+ // You have to give the Customized label text for the Card Holder Container here
+ label: __('novalnet.card_holder_label'), //__('novalnet.card_holder.label'),
+
+ // You have to give the Customized placeholder text for the Card Holder Container here
+ place_holder: __('novalnet.card_holder_placeholder'),
+
+ // You have to give the Customized error text for the Card Holder Container here
+ error: ''
+ },
+ card_number : {
+
+ // You have to give the Customized label text for the Card Number Container here
+ label: __('novalnet.card_number_label'),
+
+ // You have to give the Customized placeholder text for the Card Number Container here
+ place_holder: 'XXXX XXXX XXXX XXXX',
+
+ // You have to give the Customized error text for the Card Number Container here
+ error: ''
+ },
+ expiry_date : {
+
+ // You have to give the Customized label text for the Expiry Date Container here
+ label: __('novalnet.expiry_date_label'),
+
+ // You have to give the Customized error text for the Expiry Date Container here
+ error: '',
+
+ // You have to give the Customized placeholder text for the Expiry Date Container here
+ place_holder: __('novalnet.expiry_date_placeholder')
+ },
+ cvc : {
+
+ // You have to give the Customized label text for the CVC/CVV/CID Container here
+ label: __('novalnet.cvc_label'),
+
+ // You have to give the Customized placeholder text for the CVC/CVV/CID Container here
+ place_holder: 'XXX',
+
+ // You have to give the Customized error text for the CVC/CVV/CID Container here
+ error: ''
+ }
+ }
+ },
+
+ // Add Customer data
+ customer: {
+
+
+ // Your End-customer's First name which will be prefilled in the Card Holder field
+ first_name: customerDetails.first_name,
+
+ // Your End-customer's Last name which will be prefilled in the Card Holder field
+ last_name: customerDetails.last_name,
+
+ // Your End-customer's Email ID.
+ email: customerDetails.email,
+
+ // Your End-customer's billing address.
+ billing: {
+
+ // Your End-customer's billing street (incl. House no).
+ street: customerDetails.street,
+
+ // Your End-customer's billing city.
+ city: customerDetails.city,
+
+ // Your End-customer's billing zip.
+ zip: customerDetails.zip,
+
+ // Your End-customer's billing country ISO code.
+ country_code: customerDetails.country_code,
+ },
+ shipping: {
+
+ // Set to 1 if the billing and shipping address are same and no need to specify shipping details again here.
+ same_as_billing: customerDetails.same_as_billing,
+
+ },
+ },
+
+ // Add transaction data
+ transaction: {
+
+ // The payable amount that can be charged for the transaction (in minor units), for eg:- Euro in Eurocents (5,22 EUR = 522).
+ amount: customerDetails.amount,
+
+ // The three-character currency code as defined in ISO-4217.
+ currency: customerDetails.currency,
+
+ // Set to 1 for the TEST transaction (default - 0).
+ test_mode: customerDetails.test_mode,
+
+ enforce_3d : enforce3d
+ },
+ custom: {
+ // The End-customers selected language. The Iframe container will be rendered in this Language.
+ lang : customerDetails.lang,
+ }
+ }
+ // Create the Credit Card form
+ NovalnetUtility.createCreditCardForm(configurationObject);
+ },
+
+
+
+ /**
+ * @param {Object} eventData
+ */
+ beforeTransit: function (eventData) {
+
+ if (eventData.data.paymentMethod === this.options.paymentMethod) {
+
+ eventData.stopped = true;
+
+ const ccPanHash = this.$el.find(this.options.selectors.fieldPanHash).val();
+ const ccUniqueId = this.$el.find(this.options.selectors.fieldUniqueId).val();
+ const ccDoRedirect = this.$el.find(this.options.selectors.fieldDoRedirect).val();
+ const ccToken = this.$el.find(this.options.selectors.fieldCreditCardToken).val();
+ const saveCardDetails = this.$el.find(this.options.selectors.fieldSaveCardDetails).prop('checked');
+ if (((ccPanHash != undefined && ccPanHash != '') && (ccUniqueId != '' && ccUniqueId != undefined)) || (ccToken != 'new_account_details' && ccToken != undefined)) {
+ const additionalData = {
+ panHash: ccPanHash,
+ uniqueId: ccUniqueId,
+ doRedirect: ccDoRedirect,
+ ccToken: (ccToken != undefined && ccToken != 'new_account_details' && ccToken != '') ? ccToken : '',
+ saveCardDetails: (saveCardDetails != undefined) ? saveCardDetails : '',
+ };
+
+
+
+ mediator.trigger('checkout:payment:additional-data:set', JSON.stringify(additionalData));
+ eventData.resume();
+ } else {
+
+ NovalnetUtility.getPanHash();
+ }
+ }
+ },
+
+
+
+ /**
+ * @inheritDoc
+ */
+ dispose: function () {
+ if (this.disposed || !this.disposable) {
+ return;
+ }
+
+ mediator.off('checkout:payment:before-transit', this.beforeTransit, this);
+ mediator.off('checkout:payment:before-hide-filled-form', this.beforeHideFilledForm, this);
+ mediator.off('checkout:payment:before-restore-filled-form', this.beforeRestoreFilledForm, this);
+ mediator.off('checkout:payment:remove-filled-form', this.removeFilledForm, this);
+ mediator.off('checkout-content:initialized', this.refreshPaymentMethod, this);
+
+ CreditCardAdditionalFieldsComponent.__super__.dispose.call(this);
+ },
+
+
+ });
+
+ return CreditCardAdditionalFieldsComponent;
+});
+
diff --git a/Resources/public/js/app/components/guaranteed-invoice-additional-fields-component.js b/Resources/public/js/app/components/guaranteed-invoice-additional-fields-component.js
new file mode 100755
index 0000000..f14c377
--- /dev/null
+++ b/Resources/public/js/app/components/guaranteed-invoice-additional-fields-component.js
@@ -0,0 +1,65 @@
+define(function (require) {
+ 'use strict';
+
+ const mediator = require('oroui/js/mediator');
+ const _ = require('underscore');
+ const $ = require('jquery');
+ require('jquery.validate');
+
+ const BaseComponent = require('oroui/js/app/components/base/component');
+
+ const GuaranteedInvoiceValidation = BaseComponent.extend({
+
+ /**
+ * @property {Object}
+ */
+ options: {
+ paymentMethod: null,
+ },
+
+ /**
+ * @inheritDoc
+ */
+ constructor: function GuaranteedInvoiceValidation()
+ {
+ GuaranteedInvoiceValidation.__super__.constructor.apply(this, arguments);
+ },
+
+ /**
+ * @inheritDoc
+ */
+ initialize: function (options) {
+ this.options = _.extend({}, this.options, options);
+ mediator.on('checkout:payment:before-transit', this.validateBeforeTransit, this);
+ },
+
+ /**
+ * @param {Object} eventData
+ */
+ validateBeforeTransit: function (eventData) {
+ if (eventData.data.paymentMethod === this.options.paymentMethod) {
+ var fieldErrorMsg = $('#guaranteed_invoice_error_msg').val();
+ if (fieldErrorMsg && fieldErrorMsg != undefined) {
+ eventData.stopped = true;
+ mediator.execute('hideLoading');
+ mediator.execute('showErrorMessage', fieldErrorMsg);
+ }
+ }
+ },
+
+
+ /**
+ * @inheritDoc
+ */
+ dispose: function () {
+ if (this.disposed) {
+ return;
+ }
+ mediator.off('checkout:payment:before-transit', this.validateBeforeTransit, this);
+ GuaranteedInvoiceValidation.__super__.dispose.call(this);
+ },
+ });
+
+ return GuaranteedInvoiceValidation;
+});
+
diff --git a/Resources/public/js/app/components/guaranteed-sepa-additional-fields-component.js b/Resources/public/js/app/components/guaranteed-sepa-additional-fields-component.js
new file mode 100755
index 0000000..2119057
--- /dev/null
+++ b/Resources/public/js/app/components/guaranteed-sepa-additional-fields-component.js
@@ -0,0 +1,261 @@
+define(function (require) {
+ 'use strict';
+
+ const mediator = require('oroui/js/mediator');
+ const _ = require('underscore');
+ const __ = require('orotranslation/js/translator');
+ const $ = require('jquery');
+ const Modal = require('oroui/js/modal');
+ const routing = require('routing');
+ require('jquery.validate');
+
+ const BaseComponent = require('oroui/js/app/components/base/component');
+
+ const GuaranteedSepaAdditionalFieldsComponent = BaseComponent.extend({
+ /**
+ * @property {jQuery}
+ */
+ $el: null,
+
+ /**
+ * @property {Boolean}
+ */
+ disposable: true,
+
+ /**
+ * @property {Object}
+ */
+ options: {
+ paymentMethod: null,
+ selectors: {
+ container: '.novalnet-guaranteed-sepa-additional-fields',
+ fieldSepaIban: '[name$="novalnet_guaranteed_sepa_form_type[guaranteedSepaiban]"]',
+ fieldErrorMsg: '[name$="novalnet_guaranteed_sepa_form_type[guaranteedSepaErrorMsg]"]',
+ fieldSepaToken : '[name$="novalnet_guaranteed_sepa_form_type[guaranteedSepaSavedAccountDetails][paymentData]"]:checked',
+ fieldSepaSaveAccountDetails : '[name$="novalnet_guaranteed_sepa_form_type[guaranteedSepaSaveAccountDetails]'
+ }
+ },
+
+ /**
+ * @inheritDoc
+ */
+ constructor: function GuaranteedSepaAdditionalFieldsComponent()
+ {
+ GuaranteedSepaAdditionalFieldsComponent.__super__.constructor.apply(this, arguments);
+ },
+
+ /**
+ * @inheritDoc
+ */
+ initialize: function (options) {
+ this.options = _.extend({}, this.options, options);
+ this.$el = $(options._sourceElement);
+
+ $('#nn-guaranteed-sepa-mandate').click(function () {
+ $('#nn-guaranteed-sepa-mandate-details').toggle();
+ });
+
+
+ $('input[name="novalnet_guaranteed_sepa_form_type[guaranteedSepaSavedAccountDetails][paymentData]"]').change(function (event) {
+ if ($('input[name="novalnet_guaranteed_sepa_form_type[guaranteedSepaSavedAccountDetails][paymentData]"]:checked').val() == 'new_account_details') {
+ $('#novalnet-guaranteed-sepa-payment-form').show();
+ } else {
+ $('#novalnet-guaranteed-sepa-payment-form').hide();
+ }
+ });
+
+ $('.guaranteed-sepa-remove-saved-account-details').click(function (event) {
+ const modal = new Modal({
+ allowCancel: true,
+ className: 'modal modal-primary',
+ title: 'Are you sure you want to remove these account details?',
+ content: ''
+ });
+ modal.on('ok', _.bind(function () {
+ const tokenId = $(this).attr('data-token-id');
+ $.ajax({
+ url: routing.generate("novalnet_frontend_ajax_remove_payment_data", { id: tokenId }),
+ type: 'POST',
+ }).done(function (data) {
+
+ if (data.successful == true) {
+ $('#guaranteed_sepa_saved_account_details_'+tokenId).remove();
+ mediator.execute(
+ 'showFlashMessage',
+ 'success',
+ __('novalnet.remove_account_details_success_msg')
+ );
+ } else {
+ mediator.execute(
+ 'showFlashMessage',
+ 'error',
+ __('novalnet.remove_account_details_failure_msg')
+ );
+ }
+ }).fail(function (jqXHR, textStatus, errorThrown) {
+ mediator.execute(
+ 'showFlashMessage',
+ 'success',
+ errorThrown
+ );
+ });
+ }, this));
+
+ modal.open();
+ });
+
+ mediator.on('checkout:payment:before-transit', this.beforeTransit, this);
+ mediator.on('checkout:payment:before-hide-filled-form', this.beforeHideFilledForm, this);
+ mediator.on('checkout:payment:before-restore-filled-form', this.beforeRestoreFilledForm, this);
+ mediator.on('checkout:payment:remove-filled-form', this.removeFilledForm, this);
+ mediator.on('checkout-content:initialized', this.refreshPaymentMethod, this);
+
+ this.validate = this.validate.bind(this);
+ this.getForm().on('focusout', 'input,textarea', this.validate);
+
+ },
+
+ /**
+ * @returns {jQuery|HTMLElement}
+ */
+ getForm: function () {
+ return $(this.options.selectors.container);
+ },
+
+ /**
+ * @param {Object} [event]
+ *
+ * @returns {Boolean}
+ */
+ validate: function (event) {
+ let appendElement;
+ if (event !== undefined && event.target) {
+ const element = $(event.target);
+ const parentForm = element.closest('form');
+
+ if (parentForm.length) {
+ return element.validate().form();
+ }
+
+ appendElement = element.clone();
+ } else {
+ appendElement = this.getForm().clone();
+ }
+
+ const virtualForm = $('