2017 © Pedro Peláez
 

library nette-prtpe

PRTPE extension for Nette Framework

image

geniv/nette-prtpe

PRTPE extension for Nette Framework

  • Tuesday, March 6, 2018
  • by geniv
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Prtpe

PRTPE payment gateway, (*1)

API: https://docs.prtpe.com/, (*2)

Installation

$ composer require geniv/nette-prtpe

or, (*3)

"geniv/nette-prtpe": ">=1.0.0"

require:, (*4)

"php": ">=5.6.0",
"curl/curl": "^1.6"

Include in application

neon configure:, (*5)

# prtpe
prtpe:
    entityId: 'xxx'
    password: 'yyy'
    userId: 'zzz'

neon configure extension:, (*6)

extensions:
    prtpe: Prtpe\Bridges\Nette\Extension

presenters:, (*7)

use Prtpe\Prtpe;
/** @var Prtpe @inject */
public $prtpe;

// init settings prtple payment gate
$prtpe->setTest(true|false) : void

// is test mode?
$prtpe->isTestMode() : bool

API Reference and test data: https://docs.prtpe.com/reference/parameters, (*8)

COPY&PAY && Server-to-Server, (*9)

// set part custom descriptor
$prtpe->setDescriptor($text = 'vs: XXXYYY') : Prtpe

// manual enable create registration token
$prtpe->setStorePayment($state = true) : Prtpe

// add registration code for select storage payment
$prtpe->addRegistration($registrationId = '##id##') : Prtpe


// payment is success or not
$pay->isSuccess() : bool

// result prtpe status code (https://docs.prtpe.com/reference/resultCodes)
$pay->getResultCode(): string

// checkout id or payment id
$pay->getId() : strign

// registration id registred payment
$pay->getRegistrationId() : string

// array from payment gateway
$pay->getResult() : array

// value from array payment gateway
$pay->getResult('amount') : string

COPY&PAY

// send checkout
$checkout = $prtpe->checkout($price, 'VISA', $currency) : Response

// get inline script
$prtpe->getPaymentWidgetsScript($checkoutId) : string

// get url form
$prtpe->getPaymentWidgetsForm($shopperResultUrl = $this->link('success'), $brands = ['VISA', 'MASTER']) : string

// get status checkout
$status = $prtpe->getStatusCheckout($resourcePath) : Response

Customization: https://docs.prtpe.com/tutorials/integration-guide/customisation, (*10)

Advanced Options: https://docs.prtpe.com/tutorials/integration-guide/advanced-options, (*11)

Server-to-Server

// new credit card
$card = new Card($number, $holder, $expiryMonth, $expiryYear, $cvv) : Card

// send payment
$pay = $prtpe->payment($card, $price, 'VISA', $currency) : Response

// get status payment
$pay = $prtpe->getStatusPayment($checkoutId = '##id##') : Response

// store card
$pay = $prtpe->storePaymentData($card) : Response

Recurent payment (COPY&PAY + Server-to-Server)

// recurent payment, send payment
$pay = $prtpe->sendRepeatedPayment($idRegistration, $price, 'VISA', $currency) : Response

// recurent payment, delete payment
$pay = $prtpe->deleteStorePaymentData($idRegistration) : Response

usage:, (*12)

// checkout

try {
    $prtpe = $this->prtpe->setDescriptor('vs:123'));

    $checkout = $prtpe->checkout(10);
    if ($checkout->isSuccess()) {
        $paymentWidgetsScript = $prtpe->getPaymentWidgetsScript($checkout->getId());
        $paymentWidgetsForm = $prtpe->getPaymentWidgetsForm($this->link('//success'));
    }
} catch (Exception $e) {
    $this->flashMessage($e->getMessage(), 'danger');
}
try {
    $statusCheckout = $this->prtpe->getStatusCheckout($resourcePath);
    if ($statusCheckout->isSuccess()) {
        // save $statusCheckout
    }
} catch (Exception $e) {
    $this->flashMessage($e->getMessage(), 'danger');
}
$pay = $this->prtpe
    ->setDescriptor('vs:123')
    ->sendRepeatedPayment($idRegistration, 10);

The Versions

06/03 2018

dev-develop

dev-develop

PRTPE extension for Nette Framework

  Sources   Download

MIT GPL-3.0

The Requires

 

by Radek Frystak

payment nette geniv prtpe

24/02 2018

dev-master

9999999-dev

PRTPE extension for Nette Framework

  Sources   Download

MIT GPL-3.0

The Requires

 

by Radek Frystak

payment nette geniv prtpe

24/02 2018

v1.0.8

1.0.8.0

PRTPE extension for Nette Framework

  Sources   Download

MIT

The Requires

 

by Radek Frystak

payment nette geniv prtpe

21/02 2018

v1.0.7

1.0.7.0

PRTPE extension for Nette Framework

  Sources   Download

MIT

The Requires

 

by Radek Frystak

payment nette geniv prtpe

21/02 2018

v1.0.6

1.0.6.0

PRTPE extension for Nette Framework

  Sources   Download

MIT

The Requires

 

by Radek Frystak

payment nette geniv prtpe

21/02 2018

v1.0.5

1.0.5.0

PRTPE extension for Nette Framework

  Sources   Download

MIT

The Requires

 

by Radek Frystak

payment nette geniv prtpe

19/01 2018

v1.0.4

1.0.4.0

PRTPE extension for Nette Framework

  Sources   Download

MIT GPL-3.0

The Requires

 

by Radek Frystak

payment nette geniv prtpe

01/11 2017

v1.0.3

1.0.3.0

PRTPE extension for Nette Framework

  Sources   Download

GPL-3.0

The Requires

 

by Radek Frystak

payment nette geniv prtpe

02/08 2017

v1.0.2

1.0.2.0

PRTPE extension for Nette Framework

  Sources   Download

GPL-3.0

The Requires

 

by Radek Frystak

payment nette geniv prtpe

19/07 2017

v1.0.1

1.0.1.0

PRTPE extension for Nette Framework

  Sources   Download

GPL-3.0

The Requires

 

by Radek Frystak

payment nette geniv prtpe

18/07 2017

v1.0.0

1.0.0.0

Newsletter MailerLite service

  Sources   Download

GPL-3.0

The Requires

 

by Radek Frystak

payment nette geniv prtpe