src/Payum/Sofort/Api.php
public function createTransaction(array $fields)
    {
        $fields = (array_replace([
            'success_url' => null,
            'success_link_redirect' => true,
            'abort_url' => null,
            'notification_url' => null,
            'notify_on' => implode(',', [self::STATUS_PENDING, self::STATUS_LOSS, self::STATUS_RECEIVED, self::STATUS_REFUNDED, self::STATUS_UNTRACEABLE]),
            'reason' => '',
            'reason_2' => '',
            'product_code' => null,
        ], $fields));

        $sofort = new Sofortueberweisung($this->options['config_key']);
        $sofort->setAmount($fields['amount']);
        $sofort->setCurrencyCode($fields['currency_code']);
        $sofort->setReason($fields['reason'], $fields['reason_2'], $fields['product_code']);

        $sofort->setSuccessUrl($fields['success_url'], $fields['success_link_redirect']);
        $sofort->setAbortUrl($fields['abort_url']);

        if (false == $this->options['disable_notification']) {
            $sofort->setNotificationUrl($fields['notification_url'], $fields['notify_on']);
        }

        $sofort->sendRequest();

        return array_filter([
            'error' => $sofort->getError(),
            'transaction_id' => $sofort->getTransactionId(),
            'payment_url' => $sofort->getPaymentUrl(),
        ]);
    }
public function createTransaction(array $fields)
    {
        $fields = (array_replace([
            'success_url' => null,
            'success_link_redirect' => true,
            'abort_url' => null,
            'notification_url' => null,
            'notify_on' => implode(',', [self::STATUS_PENDING, self::STATUS_LOSS, self::STATUS_RECEIVED, self::STATUS_REFUNDED, self::STATUS_UNTRACEABLE]),
            'reason' => '',
            'reason_2' => '',
            'product_code' => null,
        ], $fields));

        $sofort = new Sofortueberweisung($this->options['config_key']);
        $sofort->setAmount($fields['amount']);
        $sofort->setCurrencyCode($fields['currency_code']);
        $sofort->setReason($fields['reason'], $fields['reason_2'], $fields['product_code']);

        $sofort->setSuccessUrl($fields['success_url'], $fields['success_link_redirect']);
        $sofort->setAbortUrl($fields['abort_url']);

        if (false == $this->options['disable_notification']) {
            $sofort->setNotificationUrl($fields['notification_url'], $fields['notify_on']);
        }

        $sofort->sendRequest();

        return array_filter([
            'error' => $sofort->getError(),
            'transaction_id' => $sofort->getTransactionId(),
            'payment_url' => $sofort->getPaymentUrl(),
        ]);
    }
@param array $fields

@return array