Skip to content

oozman/omnipay-paymongo

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

Omnipay - Paymongo

A Paymongo driver for Omnipay PHP payment processing library.

Installation

composer require omarusman/omnipay-paymongo

Usage

Credit or Debit Card

To start processing payment via Paymongo's Credit or Debit Card.

1. Make an Omnipay Gateway:

$gateway = Omnipay::create('Paymongo_Card');
$gateway->setKeys('pk_test_csp6bBgoLuJ6TXT6Nzm6bTVN', 'sk_test_NW1bkhC8pa77ttiYQaJcVAhU');

This will create you a new instance of Omnipay Paymongo_Card gateway and set your Paymongo's public key and secret key.

You can view your keys at Paymongo Developer Page

2. Authorize a credit or debit card:

$token = $gateway->authorize([
    'number'      => '4123 4501 3100 0508',
    'expiryMonth' => '1',
    'expiryYear'  => '22',
    'cvv'         => '123',
]);

This will return a Token object which you can use to process a payment.

3. Process a Payment

$payment = $gateway->purchase([
    'amount'               => '123.45',
    'currency'             => 'PHP',
    'description'          => 'Just a purchase!',
    'statement_descriptor' => 'MyCo',
    'token'                => $token,
]);

This will return a Payment object containing information about your payment.

About

A PayMongo driver for Omnipay PHP payment processing library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages