PHPackages                             popphp/pop-payment - 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. popphp/pop-payment

AbandonedLibrary[Payment Processing](/categories/payments)

popphp/pop-payment
==================

Pop Payment Component Pop PHP Framework

2.1.0p1(9y ago)2860New BSDPHPPHP &gt;=5.4.0

Since Jul 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/popphp/pop-payment)[ Packagist](https://packagist.org/packages/popphp/pop-payment)[ Docs](http://www.popphp.org/)[ RSS](/packages/popphp-pop-payment/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

pop-payment
===========

[](#pop-payment)

END OF LIFE
-----------

[](#end-of-life)

The `pop-payment` component v2.1.0 is now end-of-life and will no longer be maintained.

[![Build Status](https://camo.githubusercontent.com/65128085d6a6e7e97c4a0a4f77414e04f20aac012ff6070dc14fe0d8f3c69d74/68747470733a2f2f7472617669732d63692e6f72672f706f707068702f706f702d7061796d656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/popphp/pop-payment)[![Coverage Status](https://camo.githubusercontent.com/a70e4b790b3a3811d04600d8392e51e2e2962cd894a185d54adc539179eb28b7/687474703a2f2f63632e706f707068702e6f72672f636f7665726167652e7068703f636f6d703d706f702d7061796d656e74)](http://cc.popphp.org/pop-payment/)

OVERVIEW
--------

[](#overview)

`pop-payment` is a component for processing payments via some of the known payment processing gateway vendors. It can also be extended to support other shipping vendors and their available APIs. Currently, the built-in supported vendors are:

- Authorize.net
- PayLeap
- PayPal
- TrustCommerce
- USAEPay

The main idea is the "normalize" the the fields across the adapters so that the main interface has common fields that are "translated" into the fields required for the selected adapter's API. So, instead of having to worry that Authorize.net's credit card field is called `x_card_num` and USAEPay's credit card field is `UMcard`, you just need to worry about the field `cardNum` and it'll be mapped correctly to the adapter. The main common fields are:

Common FieldsamountcityshipToLastNamecardNumstateshipToCompanyexpDatezipshipToAddressccvcountryshipToCityfirstNamephoneshipToStatelastNamefaxshipToZipcompanyemailshipToCountryaddressshipToFirstName`pop-payment` is a component of the [Pop PHP Framework](http://www.popphp.org/).

INSTALL
-------

[](#install)

Install `pop-payment` using Composer.

```
composer require popphp/pop-payment

```

BASIC USAGE
-----------

[](#basic-usage)

### Creating a payment object

[](#creating-a-payment-object)

```
use Pop\Payment\Payment;
use Pop\Payment\Adapter\Authorize;

$payment = new Payment(new Authorize('API_LOGIN_ID', 'TRANSACTION_KEY'));
```

### Using the payment object to process a transaction

[](#using-the-payment-object-to-process-a-transaction)

```
$payment->amount    = 41.51;
$payment->cardNum   = '4111111111111111';
$payment->expDate   = '03/17';

$payment->firstName = 'Test';
$payment->lastName  = 'Person';
$payment->company   = 'Test Company';
$payment->address   = '123 Main St.';
$payment->city      = 'New Orleans';
$payment->state     = 'LA';
$payment->zip       = '70124';
$payment->country   = 'US';

$payment->shippingSameAsBilling();

$payment->send();

if ($payment->isApproved()) {
    // If approved
} else if ($payment->isDeclined()) {
    // If declined
} else if ($payment->isError()) {
    // Some other unknown error
    echo $payment->getMessage();
}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

5

Last Release

3363d ago

### Community

Maintainers

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

---

Top Contributors

[![nicksagona](https://avatars.githubusercontent.com/u/898670?v=4)](https://github.com/nicksagona "nicksagona (13 commits)")

---

Tags

phppaymentpayment gatewaypoppop phpcredit card processing

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/popphp-pop-payment/health.svg)

```
[![Health](https://phpackages.com/badges/popphp-pop-payment/health.svg)](https://phpackages.com/packages/popphp-pop-payment)
```

###  Alternatives

[yandex-money/yandex-money-sdk-php

Yandex.Money API SDK for PHP

105167.4k2](/packages/yandex-money-yandex-money-sdk-php)[cryptonator/merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

2713.7k](/packages/cryptonator-merchant-php-sdk)

PHPackages © 2026

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