src/Payment.php
public function pay()
    {
        if (!Settings::first()->ready()) {
            return false;
        }

        if ($this->ammount != 0) {
            try {
                Charge::create([
                    'amount'      => $this->ammount,
                    'currency'    => $this->currency,
                    'source'      => $this->source,
                    'description' => $this->description,
                ]);
            } catch (Exception $e) {
                $this->error = $e;

                return false;
            }
        }

        return true;
    }
public function pay()
    {
        if (!Settings::first()->ready()) {
            return false;
        }

        if ($this->ammount != 0) {
            try {
                Charge::create([
                    'amount'      => $this->ammount,
                    'currency'    => $this->currency,
                    'source'      => $this->source,
                    'description' => $this->description,
                ]);
            } catch (Exception $e) {
                $this->error = $e;

                return false;
            }
        }

        return true;
    }
public function pay ( ) { if ( ! Settings :: first ( ) -> ready ( ) ) { return false ; } if ( $ this -> ammount != 0 ) { try { Charge :: create ( [ 'amount' => $ this -> ammount , 'currency' => $ this -> currency , 'source' => $ this -> source , 'description' => $ this -> description , ] ) ; } catch ( Exception $ e ) { $ this -> error = $ e ; return false ; } } return true ; }
Execute the payment and return true if succeeded.

@param string $description

@return \Laralum\Payments\Payment
Execute the payment and return true if succeeded .