public function sellUsingHostedData($hostedDataId, $amount, $comments = null, $invoiceNumber = null)
    {
        $service = $this->getService();

        $payment = new Model\Payment($hostedDataId, $amount);
        if (!empty($comments) || !empty($invoiceNumber)) {
            $transactionDetails = new Model\TransactionDetails('ns1', $comments, $invoiceNumber);
        } else {
            $transactionDetails = null;
        }
        $sellAction = new Request\Transaction\SellHostedData($service, $payment, $transactionDetails);

        return $sellAction->sell();
    }
public function sellUsingHostedData($hostedDataId, $amount, $comments = null, $invoiceNumber = null)
    {
        $service = $this->getService();

        $payment = new Model\Payment($hostedDataId, $amount);
        if (!empty($comments) || !empty($invoiceNumber)) {
            $transactionDetails = new Model\TransactionDetails('ns1', $comments, $invoiceNumber);
        } else {
            $transactionDetails = null;
        }
        $sellAction = new Request\Transaction\SellHostedData($service, $payment, $transactionDetails);

        return $sellAction->sell();
    }
public function sellUsingHostedData ( $ hostedDataId , $ amount , $ comments = null , $ invoiceNumber = null ) { $ service = $ this -> getService ( ) ; $ payment = new Model \ Payment ( $ hostedDataId , $ amount ) ; if ( ! empty ( $ comments ) || ! empty ( $ invoiceNumber ) ) { $ transactionDetails = new Model \ TransactionDetails ( 'ns1' , $ comments , $ invoiceNumber ) ; } else { $ transactionDetails = null ; } $ sellAction = new Request \ Transaction \ SellHostedData ( $ service , $ payment , $ transactionDetails ) ; return $ sellAction -> sell ( ) ; }
Make a sale using a previously stored credit card information

@param string      $hostedDataId
@param float       $amount
@param string|null $comments
@param string|null $invoiceNumber

@return Response\Order\Sell|Response\Error
@throws \Exception
Make a sale using a previously stored credit card information