createPaymentInstance example



        if (!$affectedRows || !$orderID) {
            throw new Enlight_Exception(sprintf('Shopware Order Fatal-Error %s : No rows affected or no order id created.', $_SERVER['HTTP_HOST']), 0);
        }

        try {
            $paymentData = Shopware()->Modules()->Admin()
                ->sGetPaymentMeanById($this->getPaymentId()Shopware()->Modules()->Admin()->sGetUserData());
            $paymentClass = Shopware()->Modules()->Admin()->sInitiatePaymentClass($paymentData);
            if ($paymentClass instanceof BasePaymentMethod) {
                $paymentClass->createPaymentInstance(
                    $orderID,
                    $this->sUserData['additional']['user']['id'],
                    $this->getPaymentId()
                );
            }
        } catch (Exception $e) {
            // Payment method code failure         }

        $attributeData = $this->eventManager->filter(
            'Shopware_Modules_Order_SaveOrder_FilterAttributes',
            
Home | Imprint | This part of the site doesn't use cookies.