public function send()
    {
        if (empty($this->firstDueDate)) {
            self::setFirstDueDate(\Carbon\Carbon::now()->addDays(3));
        }

        if (empty($this->numberOfPayments)) {
            self::setNumberOfPayments(1);
        }

        $this->validatePaymentSettings();

        $config = [
            'reference'         => $this->reference,
            'amount'            => $this->amount,
            'notificationURL'   => $this->notificationURL,
            'description'       => $this->description,
            'instructions'      => $this->instructions,
            'periodicity'       => 'monthly',
            'numberOfPayments'  => $this->numberOfPayments,
            'firstDueDate'      => $this->firstDueDate,
        ];

        $custumerArray = array_merge($this->custumer['customer'], ['address' => $this->custumer['address']]);

        $data = array_filter(array_merge($config, ['customer' => $custumerArray]));

        return $this->sendJsonTransaction($data, $this->url['boletos'], 'POST', ['Accept: application/json;charset=ISO-8859-1', 'Content-type: application/json;charset=ISO-8859-1']);
    }
public function send()
    {
        if (empty($this->firstDueDate)) {
            self::setFirstDueDate(\Carbon\Carbon::now()->addDays(3));
        }

        if (empty($this->numberOfPayments)) {
            self::setNumberOfPayments(1);
        }

        $this->validatePaymentSettings();

        $config = [
            'reference'         => $this->reference,
            'amount'            => $this->amount,
            'notificationURL'   => $this->notificationURL,
            'description'       => $this->description,
            'instructions'      => $this->instructions,
            'periodicity'       => 'monthly',
            'numberOfPayments'  => $this->numberOfPayments,
            'firstDueDate'      => $this->firstDueDate,
        ];

        $custumerArray = array_merge($this->custumer['customer'], ['address' => $this->custumer['address']]);

        $data = array_filter(array_merge($config, ['customer' => $custumerArray]));

        return $this->sendJsonTransaction($data, $this->url['boletos'], 'POST', ['Accept: application/json;charset=ISO-8859-1', 'Content-type: application/json;charset=ISO-8859-1']);
    }
public function send ( ) { if ( empty ( $ this -> firstDueDate ) ) { self :: setFirstDueDate ( \ Carbon \ Carbon :: now ( ) -> addDays ( 3 ) ) ; } if ( empty ( $ this -> numberOfPayments ) ) { self :: setNumberOfPayments ( 1 ) ; } $ this -> validatePaymentSettings ( ) ; $ config = [ 'reference' => $ this -> reference , 'amount' => $ this -> amount , 'notificationURL' => $ this -> notificationURL , 'description' => $ this -> description , 'instructions' => $ this -> instructions , 'periodicity' => 'monthly' , 'numberOfPayments' => $ this -> numberOfPayments , 'firstDueDate' => $ this -> firstDueDate , ] ; $ custumerArray = array_merge ( $ this -> custumer [ 'customer' ] , [ 'address' => $ this -> custumer [ 'address' ] ] ) ; $ data = array_filter ( array_merge ( $ config , [ 'customer' => $ custumerArray ] ) ) ; return $ this -> sendJsonTransaction ( $ data , $ this -> url [ 'boletos' ] , 'POST' , [ 'Accept: application/json;charset=ISO-8859-1' , 'Content-type: application/json;charset=ISO-8859-1' ] ) ; }
Envia o boleto para o pagseguro.

@throws \Artistas\PagSeguro\PagSeguroException

@return \SimpleXMLElement
Envia o boleto para o pagseguro .