Invoice the billable entity outside of regular billing cycle.

@param  array  $options
@return \Stripe\Invoice|bool
436447
public function invoice(array $options = [])
    {
        if ($this->stripe_id) {
            $parameters = array_merge($options, ['customer' => $this->stripe_id]);

            try {
                return StripeInvoice::create($parameters, $this->getStripeKey())->pay();
            } catch (StripeErrorInvalidRequest $e) {
                return false;
            }
        }

        return true;
    }
1362786
public function optionsByArray($options) {
		if ($options) {
			$this->options = array_merge($this->options, $options);
		}

		return $this;
	}
2631
protected function addBilling(array $params, array $options)
    {
        if ($address = Arr::get($options, 'billing_address')) {
            $params['payer']['payer_info']['billing_address'] = [
                'line1'        => Arr::get($address, 'address1', ''),
                'line2'        => Arr::get($address, 'address2', ''),
                'city'         => Arr::get($address, 'city', ''),
                'country_code' => Arr::get($address, 'country', ''),
                'postal_code'  => Arr::get($address, 'zip', ''),
                'state'        => Arr::get($address, 'state', ''),
            ];
        }

        return $params;
    }
1074284
public function create($amount, $payment, $options = [])
    {
        $payload = [
            'intent'              => 'sale',
            'application_context' => [],
            'payer'               => [
                'payment_method' => 'paypal',
                'payer_info'     => [],
            ],
            'transactions' => [
                [
                    'amount' => [
                        'currency' => Arr::get($options, 'currency', $this->gateway->getCurrency()),
                        'total'    => $this->gateway->amount($amount),
                        'details'  => [],
                    ],
                    'description'     => Arr::get($options, 'description', 'PayMe Purchase'),
                    'payment_options' => ['allowed_payment_method' => 'IMMEDIATE_PAY'],
                    'invoice_number'  => Arr::get($options, 'reference', ''),
                    'item_list'       => [],
                ],
            ],
            'redirect_urls' => [
                'cancel_url' => Arr::get($options, 'cancel_url', ''),
                'return_url' => Arr::get($options, 'return_url', ''),
            ],
        ];

        $payload = $this->addLineItems($payload, $options);
        $payload = $this->addBilling($payload, $options);
        $payload = $this->addShipping($payload, $options);
        $payload = $this->addDiscount($payload, $options);

        return $this->gateway->commit(
            'post',
            $this->gateway->buildUrlFromString('payments/payment'),
            $payload, $options
        );
    }
1187752
public function recurring($amount, $options = array())
   {
       $this->required_options('unit, start_date, occurrences', $options);

       $params = array(
        'METHOD' => 'CreateRecurringPaymentsProfile',
        'BILLINGFREQUENCY' => $options['occurrences'],
        'BILLINGPERIOD' => $options['unit'],
        'PROFILESTARTDATE' => $options['start_date'],
        'DESC' => isset($options['description']) ? $options['description'] : '',
        'IPADDRESS' => isset($options['ip']) ? $options['ip'] : $_SERVER['REMOTE_ADDR'],
    );

       $this->post = array_merge($this->post, $params);

       return $this->do_action($amount, 'Sale', $options);
   }
557271
public function createAsStripeCustomer(array $options = [])
    {
        $options = array_key_exists('email', $options)
                ? $options
                : array_merge($options, ['email' => $this->email]);

        // Here we will create the customer instance on Stripe and store the ID of the
        // user from Stripe. This ID will correspond with the Stripe user instances
        // and allow us to retrieve users from Stripe later when we need to work.
        $customer = StripeCustomer::create(
            $options, $this->getStripeKey()
        );

        $this->stripe_id = $customer->id;

        $this->save();

        return $customer;
    }
148485
public function invoices($includePending = false, $parameters = []): Collection
    {
        $invoices = [];

        $customer = $this->asBraintreeCustomer();

        $parameters = array_merge([
            'id' => TransactionSearch::customerId()->is($customer->id),
            'range' => TransactionSearch::createdAt()->between(
                Carbon::today()->subYears(2)->format('m/d/Y H:i'),
                Carbon::tomorrow()->format('m/d/Y H:i')
            ),
        ], $parameters);

        $transactions = BraintreeTransaction::search($parameters);

        // Here we will loop through the Braintree invoices and create our own custom Invoice
        // instance that gets more helper methods and is generally more convenient to work
        // work than the plain Braintree objects are. Then, we'll return the full array.
        if (! is_null($transactions)) {
            foreach ($transactions as $transaction) {
                if ($transaction->status == BraintreeTransaction::SETTLED || $includePending) {
                    $invoices[] = new Invoice($this, $transaction);
                }
            }
        }

        return new Collection($invoices);
    }
264329
public function invoiceFor($description, $amount, array $options = []): Successful
    {
        return $this->tab($description, $amount, $options);
    }
327223
public function authorize($money, Merchant_Billing_CreditCard $creditcard, $options = array())
  {
      $this->add_invoice($options);
      $this->add_creditcard($creditcard);
      $this->add_address($options);
      $this->add_customer_data($options);
      $this->add_duplicate_window();

      return $this->commit('AUTH_ONLY', $money);
  }
1079316
public function createTransfers(array $options)
    {
        $pay = new Transfers($this->config->get());
        return $pay->create($options);
    }
1186776
public function create($creditcard, $options = [])
    {
        $params = [];

        $params['transaction'] = 'fail';

        if ($creditcard === 'success') {
            $params['transaction'] = 'success';
        }

        return $this->gateway->commit('post', 'create', $params);
    }
635643
public function invoiceFor($description, $amount, array $options = [])
    {
        if (!$this->stripe_id) {
            throw new InvalidArgumentException('User is not a customer. See the createAsStripeCustomer method.');
        }

        $options = array_merge([
            'customer' => $this->stripe_id,
            'amount' => $amount,
            'currency' => $this->preferredCurrency(),
            'description' => $description,
        ], $options);

        StripeInvoiceItem::create(
            $options, ['api_key' => $this->getStripeKey()]
        );

        return $this->invoice();
    }
539623
public function options(array $options): self
    {
        foreach ($options as $name => $value) {
            $this->option($name, $value);
        }

        return $this;
    }
485490
public function charge($amount, array $options = []): Successful
    {
        $response = BraintreeTransaction::sale(array_merge([
            'amount' => number_format($amount * (1 + ($this->taxPercentage() / 100)), 2, '.', ''),
            'paymentMethodToken' => $this->paymentMethod()->token,
            'options' => [
                'submitForSettlement' => true,
            ],
            'recurring' => true,
        ], $options));

        if (! $response->success) {
            throw new Exception('Braintree was unable to perform a charge: '.$response->message);
        }

        return $response;
    }
1284221
private function addInvoice($trans, $invoice_no, $ref_no, $options)
    {
        $trans->addChild('InvoiceNo', $invoice_no);
        $trans->addChild('RefNo', $ref_no ?: $invoice_no);
        if ($options['merchant']) {
            $trans->addChild('OperatorID', $options['merchant']);
        }
        if ($options['description']) {
            $trans->addChild('Memo', $options['description']);
        }
    }
990940
public static function create(array $options): Token
    {
        $token = new self($options);
        $token->token = $token->generate();

        return $token;
    }
446404
public function withOptions($options)
    {
        if (is_array($options)) {
            $options = new RequestOptions($options);
        }

        $this->options = $options;

        return $this;
    }