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 1mo ago

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 37% 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

2535d 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

[spatie/laravel-stripe-webhooks

Handle stripe webhooks in a Laravel application

5213.1M8](/packages/spatie-laravel-stripe-webhooks)[duncanmcclean/simple-commerce

A simple, yet powerful e-commerce addon for Statamic.

16313.2k2](/packages/duncanmcclean-simple-commerce)[flux-se/sylius-stripe-plugin

Sylius Stripe plugin using Payment Request

1029.3k](/packages/flux-se-sylius-stripe-plugin)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

322.8k](/packages/duncanmcclean-statamic-cargo)[metisfw/paypal

PayPal SDK integration for Nette Framework

109.2k](/packages/metisfw-paypal)[paymentsuite/stripe-bundle

Stripe PaymentSuite Component

105.0k](/packages/paymentsuite-stripe-bundle)

PHPackages © 2026

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