PHPackages                             guss77/kohana-paypal - 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. guss77/kohana-paypal

ActiveLibrary[Payment Processing](/categories/payments)

guss77/kohana-paypal
====================

Kohana module to add PayPal payment options to a Kohana application

1.0.1(9y ago)19992[2 issues](https://github.com/guss77/kohana-paypal/issues)GPL-3.0PHPPHP &gt;=5.4.0

Since Sep 4Pushed 9y ago1 watchersCompare

[ Source](https://github.com/guss77/kohana-paypal)[ Packagist](https://packagist.org/packages/guss77/kohana-paypal)[ Docs](http://github.com/guss77/kohana-paypal)[ RSS](/packages/guss77-kohana-paypal/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

kohana-paypal
=============

[](#kohana-paypal)

PayPal module for Kohana 3.3

Installation
------------

[](#installation)

1. Clone into the 'modules' directory of your Kohana installation or run `composer require guss77/kohana-paypal`
2. Add a reference to load the module in your 'bootstrap.php' file
3. Copy 'config/paypal.php' to your application's 'config' directory and edit according to your requirements:
4. Replace the client Id and secret with your real PayPal client ID and secret
5. You may also want to change the default currency
6. Copy 'classes/PayPal.php' to your application's 'classes' directory and implement the abstract methods:
7. `PayPal::approved()` should handle recording the data for the completed transaction and return a URL to direct the user to - for example, a "thank you for buying" page. See below for details.
8. `PayPal::cancelled()` should handle recording that the transaction was cancelled and return a URL to direct the user to - for example, a "sorry that you cancelled your purchase" page. See below for details.

Usage
-----

[](#usage)

To create a transaction, call `PayPal::payment($amount)` where `$amount` is the transaction amount.

Please note that, while not required, you should pass `$amount` as a string, otherwise if the amount is not an integer (i.e. it has a fractional part) then it may be subject to IEEE 754 floating point rounding. To prevent that, the module truncates numeric floating point amounts to 2 decimal points, but that operation may still be subject to rounding.

PayPal::payment() will redirect the user to approve the payment through PayPal web interface. When the user completes the approval, the method PayPal::approved() in the application's implementation will be called. The approved() method receives the transaction completion details and can do any processing it needs, and then return a URL to which the user will be redirected.

If the user cancelled the transaction, the PayPal module will call the method PayPal::cancelled in the application's implementation, which will also need to return a URL to redirect the user.

An Example flow:

- User clicks on the "buy" button on the page for product "A123".
- Application calls PayPal::payment($priceForProduct, \[ 'ProductId' =&gt; "A123" \]);
- User gets redirected to PayPal and approved the payment.
- User gets redirected back to the site where the PayPal module completes the transaction.
- PayPal module calls the Application's PayPal::approved(\[ 'ProductId' =&gt; "A123" \], "PAY-ABCD1234EDFGH5678", (object)\[ "email" =&gt; "", "first\_name" =&gt; "first", "last\_name" =&gt; "Last", "payer\_id" =&gt; "ABCD1234EFGH", "shipping\_address" =&gt; (object)\[ ... \] \]);
- approved() registers the transaction completion in the database and orders a delivery for the user
- approved() returns the URL to the "thanks for purchasing" page
- PayPal module redirects the user to the "thanks" page.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~335 days

Total

2

Last Release

3573d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c78ae0c263489d27d6f6fb472b32f307ae2936d893d3e25f72af5ae1abb9e3a8?d=identicon)[guss77](/maintainers/guss77)

---

Top Contributors

[![guss77](https://avatars.githubusercontent.com/u/381782?v=4)](https://github.com/guss77 "guss77 (25 commits)")

### Embed Badge

![Health badge](/badges/guss77-kohana-paypal/health.svg)

```
[![Health](https://phpackages.com/badges/guss77-kohana-paypal/health.svg)](https://phpackages.com/packages/guss77-kohana-paypal)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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