PHPackages                             nattreid/stripe-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. nattreid/stripe-api

ActiveLibrary[Payment Processing](/categories/payments)

nattreid/stripe-api
===================

Stripe API for Nette Framework

1.1.2(6y ago)041MITPHPPHP &gt;= 7.1

Since Feb 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/nattreid/stripe-api)[ Packagist](https://packagist.org/packages/nattreid/stripe-api)[ RSS](/packages/nattreid-stripe-api/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (5)Used By (0)

Stripe API pro Nette Framework
==============================

[](#stripe-api-pro-nette-framework)

Nastavení v **config.neon**

```
extensions:
    stripeApi: NAttreid\StripeApi\DI\StripeApiExtension

stripeApi:
	publishableApiKey: xxxXXXxXXXXxxxx
```

### Použití

[](#použití)

```
/** @var \NAttreid\StripeApi\Control\IPayButtonFactory @inject */
public $payButtonFactory;

/** @var \NAttreid\StripeApi\Control\IPaymentFactory @inject */
public $paymentFactory;

/** @var \NAttreid\StripeApi\Control\IMasterPassButtonFactory @inject */
public $masterpassFactory;

/** @var \NAttreid\StripeApi\Control\ICardElementFactory @inject */
public $cardElementFactory;

/** @var \NAttreid\StripeApi\Control\ICardPaymentFactory @inject */
public $cardPaymentFactory;

protected function createComponentButton()
{
    $control = $this->payButtonFactory->create();

    $payment = new \NAttreid\StripeApi\Helpers\Payments\PaymentRequest();
    $payment->setCurrency('usd');
    $payment->setCountry('US');
    $payment->setPrice(1000);

    $control->setPayment($payment);
    $control->setOnlyApplePay();        # platby pouze apple pay
    $control->setOnlyPaymentRequest();  # pouze ostatni platby, krome apple pay
    $control->setUnsupported('Nepodporuje');         # text nepodporovane platby v prohlizeci

    $control->setSuccessUrl('/success');
    $control->setErrorUrl('/error');

    $control->onSuccess[] = function ($charge) {

    };

    $control->onError[] = function (\Exception $exception) {

    };

    return $control;
}

protected function createComponentPayment()
{
    $control = $this->paymentFactory->create();

    $payment = new \NAttreid\StripeApi\Helpers\Payments\Giropay();
    $payment->setCurrency('eur');
    $payment->setOrderId(5555);
    $payment->setOwner('Testing Name');
    $payment->setPrice(200);

    $control->setPayment($payment);

    $control->setSuccessUrl('/success');
    $control->setErrorUrl('/error');

    $control->onSuccess[] = function ($charge) {

    };

    $control->onError[] = function (\Exception $exception) {

    };

    return $control;
}

protected function createComponentMasterpass()
{
    $control = $this->masterpassFactory->create();

    $payment = new \NAttreid\StripeApi\Helpers\Payments\Masterpass();
    $payment->setCurrency('eur');
    $payment->setCartId('xxXXXxXXxXXXXxx');
    $payment->setPrice(200);

    $control->setPayment($payment);

    $control->setSuccessUrl('/success');
    $control->setErrorUrl('/error');

    $control->onSuccess[] = function ($charge) {

    };

    $control->onError[] = function (\Exception $exception) {

    };

    return $control;
}

protected function createComponentCardElement()
{
    $control = $this->cardElementFactory->create();

    $payment = new \NAttreid\StripeApi\Helpers\Payments\Card();
    $payment->setCurrency('eur');
    $payment->setPrice(200);

    $control->setPayment($payment);

    $control->setSuccessUrl('/success');
    $control->setErrorUrl('/error');

    $control->onSuccess[] = function ($charge) {

    };

    $control->onError[] = function (\Exception $exception) {

    };

    return $control;
}

protected function createComponentCardPayment()
{
    $control = $this->cardElementFactory->create();
    $control->setTitle('Payment');
    $control->setLocale('auto');
    $control->setAllowRemember(true);

    $payment = new \NAttreid\StripeApi\Helpers\Payments\Card();
    $payment->setCurrency('eur');
    $payment->setPrice(200);
    $payment->setEmail('test@test.com);

    $control->setPayment($payment);

    $control->setSuccessUrl('/success');
    $control->setErrorUrl('/error');

    $control->onSuccess[] = function ($charge) {

    };

    $control->onError[] = function (\Exception $exception) {

    };

    return $control;
}
```

```
{control button}

{control payment}

{control masterpass}

{control cardPayment, 'Pay with Card'}

{control cardElement, 'Submit Payment', [class => button]}
```

###  Health Score

25

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Total

4

Last Release

2486d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a388aeb3f00b15a3af1c1a5d3a2107c94af1730c6043dd30ce32a63f95ea290?d=identicon)[attreid](/maintainers/attreid)

### Embed Badge

![Health badge](/badges/nattreid-stripe-api/health.svg)

```
[![Health](https://phpackages.com/badges/nattreid-stripe-api/health.svg)](https://phpackages.com/packages/nattreid-stripe-api)
```

###  Alternatives

[tightenco/nova-stripe

A tool to create a quick Stripe dashboard in your Laravel Nova admin panels

110305.1k](/packages/tightenco-nova-stripe)[jacobbennett/stripe-test-token

Quickly create Stripe test tokens for successful and exceptional Stripe responses.

14654.7k](/packages/jacobbennett-stripe-test-token)[flux-se/payum-stripe

Payum Stripe gateways

29401.9k4](/packages/flux-se-payum-stripe)[payum/stripe

The Payum extension. It provides Stripe payment integration.

22562.4k2](/packages/payum-stripe)[craftcms/commerce-stripe

Stripe integration for Craft Commerce 5.0+

32156.8k3](/packages/craftcms-commerce-stripe)[simonhamp/laravel-stripe-connect

1332.8k](/packages/simonhamp-laravel-stripe-connect)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
