2017 © Pedro PelĂĄez
 

library nette-paypal-payment-buttons

PayPal payment buttons component for Nette Framework

image

hostbox/nette-paypal-payment-buttons

PayPal payment buttons component for Nette Framework

  • Saturday, July 19, 2014
  • by HostBox
  • Repository
  • 1 Watchers
  • 3 Stars
  • 54 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Paypal Payment buttons for Nette Framework Build Status

Support for Buy Now, Add to Cart, Donate, QR Codes, and Subscribe buttons

Package Installation

The best way to install Social Plugins is using Composer:, (*1)

$ composer require hostbox/nette-paypal-payment-buttons

Packagist - Versions, (*2)

Nette Forum (cs) - plugin section, (*3)

Nette Addons, (*4)

or manual edit composer.json in your project, (*5)

"require": {
    "hostbox/nette-paypal-payment-buttons": "v1.0.0"
}

Component Installation

config.neon, (*6)

services:
    # Config
    - HostBox\Components\PayPal\PaymentButtons\Config('PaypalMerchantId')
    # Factory
    - HostBox\Components\PayPal\PaymentButtons\ButtonFactory

Presenter, (*7)

use HostBox\Components\PayPal\PaymentButtons\ButtonFactory;
use HostBox\Components\PayPal\PaymentButtons\Subscribe;
use Nette\Application\UI\Presenter;

class PaypalPaymentPresenter extends Presenter {

    /** @var ButtonFactory */
    protected $buttonFactory;


    public function __construct(ButtonFactory $buttonFactory) {
        parent::__construct();
        $this->buttonFactory = $buttonFactory;
    }

    // component create by Factory
    public function createComponentBuyNow() {
        return $this->buttonFactory->createBuyNow();
    }

    // default settings by factory function parameter
    public function createComponentDonate() {
        return $this->buttonFactory->createDonate(array(
            'quantity' => 10,
            'tax' => 10.5
        ));
    }

    // by component function parameter
    public function createComponentQRCodes() {
        $component = $this->buttonFactory->createQRCodes();
        $component->assign(array(
            'quantity' => 10,
            'tax' => 10.5
        ));

        return $component;
    }

    // by component variable
    public function createComponentSubscribe() {
        $component = $this->buttonFactory->createSubscribe();
        $component->period = Subscribe::PERIOD_YEARS

        return $component;
    }

}

Template, (*8)

{control buyNow}
{control addToCart}
{control subscribe}
{control qRCodes}

// temporary(only for this render) settings editing in Template
{control donate, quantity => 10, tax => 10.5}

The Versions

19/07 2014

dev-master

9999999-dev

PayPal payment buttons component for Nette Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pavel Machåƈ

component payment paypal nette

15/04 2014

v1.0.0

1.0.0.0

PayPal payment buttons component for Nette Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pavel Machåƈ

component payment paypal nette