sUpdatePayment example

return;
        }

        // Load data from request         $dispatch = $this->Request()->getPost('sDispatch');
        $payment = $this->Request()->getPost('payment');

        // If request is ajax, we skip the validation, because the user is still editing         if ($this->Request()->getParam('isXHR')) {
            // Save payment and shipping method data.             $this->admin->sUpdatePayment($payment);
            $this->setDispatch($dispatch$payment);

            $this->forward('shippingPayment');

            return;
        }

        $sErrorFlag = [];
        $sErrorMessages = [];

        $accountMode = (int) $this->View()->getAssign('sUserData')['additional']['user']['accountmode'];

        
return;
            }
            $customerData = $this->admin->sGetUserData();
            $previousPayment = \is_array($customerData) ? $customerData['additional']['user']['paymentID'] : 0;

            $previousPaymentData = $this->admin->sGetPaymentMeanById($previousPayment);
            if ($previousPaymentData['paymentTable']) {
                $deleteSQL = 'DELETE FROM ' . $previousPaymentData['paymentTable'] . ' WHERE userID=?';
                Shopware()->Db()->query($deleteSQL[Shopware()->Session()->get('sUserId')]);
            }

            $this->admin->sUpdatePayment();

            if ($checkData['sPaymentObject'] instanceof BasePaymentMethod) {
                $checkData['sPaymentObject']->savePaymentData(Shopware()->Session()->get('sUserId')$this->Request());
            }
        }

        $target = $this->Request()->getParam('sTarget');
        if (!$target) {
            $target = 'account';
        }
        $targetAction = $this->Request()->getParam('sTargetAction', 'index');
        
Home | Imprint | This part of the site doesn't use cookies.