Download the PHP package beziworld/laravel-paypo without Composer

On this page you can find all versions of the php package beziworld/laravel-paypo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-paypo

Laravel PayPo

tests Latest Version

PayPo "buy now, pay later" (deferred payments) for Laravel, built on the PayPo REST API v3:

Polska wersja dokumentacji

Why this package

The only maintained PHP library is answear/pay-po. It is framework agnostic and keeps one merchant in static global configuration. This package adds what a Laravel shop needs on top of the API: a notification route with signature verification and events, several merchant accounts in one application (including tenants whose credentials live in the database), tokens in the Laravel cache, Http::fake friendly transport and typed data objects.

Installation

Notifications go to the package route POST /paypo/notification/{connection}; the URL of the connection is sent as notifyUrl automatically.

Payment flow

The buyer comes back to the return URL with ?status=OK or ?status=ERR. The status parameter is only a hint for the message shown in the browser; the order state comes from notifications or PayPo::transaction().

Notifications and events

Event When
TransactionStatusChanged every authentic status or amount change notification
TransactionAccepted PayPo granted the deferred payment
TransactionCompleted the order was confirmed and is ready to be settled
TransactionRejected the deferred payment was refused (it may still become accepted)
TransactionCanceled the transaction was cancelled
SettlementReported the wire transfer specification was generated (settlementStatus, message)

Every event carries the Notification data object and the connection name. PayPo repeats notifications for 24 hours until it receives HTTP 200 and statuses may arrive out of order, so listeners must be idempotent; compare TransactionStatus::rank() with the stored status to ignore stale ones.

The signature is base64(HMAC-SHA256("POST+" . path . "+" . json, merchantApiKey)). Notifications with a missing or wrong signature, of another merchant or with an unknown status get HTTP 400. Set PAYPO_VERIFY_STATUS=true to additionally fetch the transaction from the API before the events are dispatched (HTTP 503 makes PayPo retry when the API is unreachable).

Your own controller can use PayPo::parseNotification($request->getContent(), $request->header('X-PayPo-Signature'), '/webhooks/paypo').

Confirmation, cancellation, refunds, status

Unconfirmed orders may be cancelled by PayPo after a period agreed in the merchant contract, so confirm orders after shipping. A refund of an ACCEPTED transaction completes it automatically; refunds may never increase the order value.

Many merchants

Each merchant has its own cached OAuth token. Use PAYPO_BASE_URL=https://api.paypo.ro/v3 and PAYPO_CURRENCY=RON (or the same keys in a connection) for the Romanian market.

Errors

Exception When
ApiException PayPo rejected the request or could not be reached: httpStatus(), validation errors() (path and message), payload(), isConflict(), isNotFound(), isRateLimited() with retryAfter()
InvalidNotification a notification with a missing or wrong signature, of another merchant or malformed
InvalidConfiguration missing credentials or URLs, unknown connection

All extend PayPoException. Registration, confirmation, cancellation and refunds are never retried automatically; the only resend happens after HTTP 401, when the cached token expired and the request was not processed. Status reads are retried on connection errors and HTTP 5xx (PAYPO_RETRIES, PAYPO_RETRY_DELAY).

Development

The implementation follows the official "PayPo API v.3.1" specification (document version 3.1.2). PayPo issues sandbox credentials to merchants; the test suite uses Http::fake with the examples from the specification.

Author

Created and maintained by Kamil Ćwiertnia, beziworld.eu.

Need an integration? Get in touch through beziworld.eu.

Other packages by the author

laravel-payu · laravel-paynow · laravel-przelewy24 · laravel-tpay · laravel-imoje

License

MIT. See LICENSE.md. This package is not affiliated with PayPo sp. z o.o.


All versions of laravel-paypo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
guzzlehttp/guzzle Version ^7.8
illuminate/contracts Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package beziworld/laravel-paypo contains the following files

Loading the files please wait ...