Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SW 449 #521

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

76 changes: 26 additions & 50 deletions Frontend/MoptPaymentPayone/Controllers/Backend/FcPayone.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function Plugin()

public function connectiontestAction()
{
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();
$this->mid = $_GET['mid'];
$this->aid = $_GET['aid'];
$this->pid = $_GET['pid'];
Expand Down Expand Up @@ -456,7 +456,7 @@ public function ajaxgetTestResultsAction()

$data = array();
sleep(2);
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();
$filename = Shopware()->Container()->get('kernel')->getLogDir() . '/moptPayoneConnectionTest.log';
$resultfile = fopen($filename, "r");
$aLines = '';
Expand Down Expand Up @@ -518,7 +518,7 @@ public function apilogAction()
public function ajaxapilogAction()
{

$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$offset = $this->Request()->get('offset');
$limit = $this->Request()->get('limit');
Expand All @@ -544,7 +544,7 @@ public function ajaxtransactionstatusAction()
$breadcrump = array(
"Konfiguration", "Features", "ajaxtransactionstatusconfig", "Statusweiterleitung"
);
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$start = $this->Request()->get('start');
$limit = $this->Request()->get('limit');
Expand Down Expand Up @@ -610,7 +610,7 @@ public function ajaxpaymentstatusconfigAction()
public function ajaxgetPaymentStatusConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$data['data'] = $this->get('MoptPayoneMain')->getPayoneConfig($paymentid, true);
Expand All @@ -622,7 +622,7 @@ public function ajaxgetPaymentStatusConfigAction()
public function ajaxgetRiskCheckConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$data['data'] = $this->get('MoptPayoneMain')->getPayoneConfig($paymentid, true);
Expand All @@ -634,7 +634,7 @@ public function ajaxgetRiskCheckConfigAction()
public function ajaxgetAddressCheckConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$data['data'] = $this->get('MoptPayoneMain')->getPayoneConfig($paymentid, true);
Expand Down Expand Up @@ -681,7 +681,7 @@ public function ajaxcreditcardAction()
public function ajaxgetCreditCardConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$repository = Shopware()->Models()->getRepository('Shopware\Models\Payment\Payment');
Expand All @@ -696,7 +696,7 @@ public function ajaxgetCreditCardConfigAction()
public function ajaxgetIframeConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$repository = Shopware()->Models()->getRepository('Shopware\CustomModels\MoptPayoneCreditcardConfig\MoptPayoneCreditcardConfig');
Expand All @@ -711,7 +711,7 @@ public function ajaxgetIframeConfigAction()
public function ajaxgetPaypalConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$repository = Shopware()->Models()->getRepository('Shopware\CustomModels\MoptPayonePaypal\MoptPayonePaypal');
$query = $this->getAllPaymentsQuery(null, null, $repository);
Expand All @@ -725,7 +725,7 @@ public function ajaxgetPaypalConfigAction()
public function ajaxgetRatepayConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$repository = Shopware()->Models()->getRepository('Shopware\CustomModels\MoptPayoneRatepay\MoptPayoneRatepay');
$query = $this->getAllPaymentsQuery(null,null,$repository);
Expand All @@ -746,7 +746,7 @@ public function ajaxgetRatepayConfigAction()
public function ajaxgetAmazonConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$repository = Shopware()->Models()->getRepository('Shopware\CustomModels\MoptPayoneAmazonPay\MoptPayoneAmazonPay');
$query = $this->getAllPaymentsQuery(null,null,$repository);
Expand Down Expand Up @@ -779,7 +779,7 @@ public function ajaxdebitAction()
public function ajaxgetDebitConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$repository = Shopware()->Models()->getRepository('Shopware\Models\Payment\Payment');
Expand Down Expand Up @@ -820,7 +820,7 @@ public function ajaxfinanceAction()
public function ajaxgetFinanceConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$repository = Shopware()->Models()->getRepository('Shopware\Models\Payment\Payment');
Expand Down Expand Up @@ -854,7 +854,7 @@ public function ajaxonlinetransferAction()
public function ajaxgetOnlineTransferConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$repository = Shopware()->Models()->getRepository('Shopware\Models\Payment\Payment');
Expand Down Expand Up @@ -897,7 +897,7 @@ public function ajaxwalletAction()
public function ajaxgetWalletConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$repository = Shopware()->Models()->getRepository('Shopware\Models\Payment\Payment');
Expand Down Expand Up @@ -931,7 +931,7 @@ public function ajaxtransactionstatusconfigAction()
public function ajaxgetTransactionStatusConfigAction()
{
$data = array();
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$data['data'] = $this->get('MoptPayoneMain')->getPayoneConfig($paymentid, true);
Expand Down Expand Up @@ -961,16 +961,13 @@ public function ajaxgeneralconfigAction()

public function ajaxgetGeneralConfigAction()
{
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$paymentid = $this->Request()->getParam('paymentid');
$data['data'] = $this->get('MoptPayoneMain')->getPayoneConfig($paymentid, true);
$data['status'] = 'success';
$encoded = json_encode($data);
echo $encoded;
// @codingStandardsIgnoreStart
exit(0);
// @codingStandardsIgnoreEnd
}

public function ajaxriskcheckAction()
Expand Down Expand Up @@ -1034,7 +1031,7 @@ public function ajaxtextblocksAction()

public function ajaxgettextblocksAction()
{
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$offset = $this->Request()->get('offset');
$limit = $this->Request()->get('limit');
Expand Down Expand Up @@ -1063,7 +1060,7 @@ public function ajaxgettextblocksAction()

public function ajaxsavetextblocksAction()
{
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

$localeId = $this->Request()->get('localeId');
$snippetId = $this->Request()->get('snippetId');
Expand All @@ -1077,57 +1074,45 @@ public function ajaxsavetextblocksAction()

$encoded = json_encode($data);
echo $encoded;
// @codingStandardsIgnoreStart
exit(0);
// @codingStandardsIgnoreEnd
}

public function ajaxSavePaymentConfigAction()
{
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();
$paymentData = $this->Request()->getPost();
$this->createPayment($paymentData);
$data['status'] = 'success';
$data['message'] = 'Zahlungsart erfolgreich gespeichert!';
$encoded = json_encode($data);
echo $encoded;
// @codingStandardsIgnoreStart
exit(0);
// @codingStandardsIgnoreEnd
}

public function ajaxSavePayoneConfigAction()
{
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();
$paymentData = $this->Request()->getPost();
$data['status'] = 'success';
$data['message'] = 'Zahlungsart erfolgreich gespeichert!';
$this->createPayoneConfig($paymentData);
$this->createPayoneCreditcardConfig($paymentData);
$encoded = json_encode($data);
echo $encoded;
// @codingStandardsIgnoreStart
exit(0);
// @codingStandardsIgnoreEnd
}

public function ajaxSaveIframeConfigAction()
{
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();
$paymentData = $this->Request()->getPost();
$data['status'] = 'success';
$data['message'] = 'Konfiguration erfolgreich gespeichert!';
$this->createIframeConfig($paymentData);
$encoded = json_encode($data);
echo $encoded;
// @codingStandardsIgnoreStart
exit(0);
// @codingStandardsIgnoreEnd
}

public function ajaxSavePaypalConfigAction()
{
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();
$paymentData = $this->Request()->getPost();
$data['status'] = 'success';
$data['message'] = 'Konfiguration erfolgreich gespeichert!';
Expand All @@ -1154,9 +1139,6 @@ public function ajaxSavePaypalConfigAction()
}
$encoded = json_encode($data);
echo $encoded;
// @codingStandardsIgnoreStart
exit(0);
// @codingStandardsIgnoreEnd
}

public function ajaxSaveApplepayCertAction()
Expand All @@ -1167,7 +1149,7 @@ public function ajaxSaveApplepayCertAction()
mkdir($shoproot.$folder, 0700);
}
$response = 0;
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

if (isset($_FILES['file']) && !empty($_FILES['file']['name'] && $_FILES['file']['size'] > 0)) {
$fileData = $_FILES['file'];
Expand All @@ -1192,9 +1174,6 @@ public function ajaxSaveApplepayCertAction()

}
echo $response;
// @codingStandardsIgnoreStart
exit(0);
// @codingStandardsIgnoreEnd
}

public function ajaxSaveApplepayKeyAction()
Expand All @@ -1206,7 +1185,7 @@ public function ajaxSaveApplepayKeyAction()
}

$response = 0;
$this->Front()->Plugins()->Json()->setRenderer(true);
$this->Front()->Plugins()->ViewRenderer()->setNoRender();

if (isset($_FILES['file']) && !empty($_FILES['file']['name'] && $_FILES['file']['size'] > 0)) {
$fileData = $_FILES['file'];
Expand All @@ -1231,9 +1210,6 @@ public function ajaxSaveApplepayKeyAction()

}
echo $response;
// @codingStandardsIgnoreStart
exit(0);
// @codingStandardsIgnoreEnd
}

public function updateSnippet($options)
Expand Down
Loading