2017 © Pedro Peláez
 

library pop-payment

Pop Payment Component Pop PHP Framework

image

popphp/pop-payment

Pop Payment Component Pop PHP Framework

  • Thursday, March 2, 2017
  • by nicksagona
  • Repository
  • 1 Watchers
  • 2 Stars
  • 568 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

pop-payment

END OF LIFE

The pop-payment component v2.1.0 is now end-of-life and will no longer be maintained., (*1)

Build Status Coverage Status, (*2)

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:, (*3)

  • 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:, (*4)

Common Fields
amount city shipToLastName
cardNum state shipToCompany
expDate zip shipToAddress
ccv country shipToCity
firstName phone shipToState
lastName fax shipToZip
company email shipToCountry
address shipToFirstName

pop-payment is a component of the Pop PHP Framework., (*5)

INSTALL

Install pop-payment using Composer., (*6)

composer require popphp/pop-payment

BASIC USAGE

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

$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();
}

The Versions

02/03 2017

dev-master

9999999-dev http://www.popphp.org/

Pop Payment Component Pop PHP Framework

  Sources   Download

New BSD

The Requires

  • php >=5.4.0

 

The Development Requires

php payment payment gateway pop pop php credit card processing

02/03 2017

2.1.0p1

2.1.0.0-patch1 http://www.popphp.org/

Pop Payment Component Pop PHP Framework

  Sources   Download

New BSD

The Requires

  • php >=5.4.0

 

The Development Requires

php payment payment gateway pop pop php credit card processing

01/07 2016

2.1.0

2.1.0.0 http://www.popphp.org/

Pop Payment Component Pop PHP Framework

  Sources   Download

New BSD

The Requires

  • php >=5.4.0

 

The Development Requires

php payment payment gateway pop pop php credit card processing

10/05 2016

2.0.0p2

2.0.0.0-patch2 http://www.popphp.org/

Pop Payment Component Pop PHP Framework

  Sources   Download

New BSD

The Requires

  • php >=5.4.0

 

The Development Requires

php payment payment gateway pop pop php credit card processing

19/02 2016

2.0.0p1

2.0.0.0-patch1 http://www.popphp.org/

Pop Payment Component Pop PHP Framework

  Sources   Download

New BSD

The Requires

  • php >=5.4.0

 

The Development Requires

php payment payment gateway pop pop php credit card processing

21/07 2015

2.0.0

2.0.0.0 http://www.popphp.org/

Pop Payment Component Pop PHP Framework

  Sources   Download

New BSD

The Requires

  • php >=5.4.0

 

The Development Requires

php payment payment gateway pop pop php credit card processing