francisfueconcillo / larapaymongo

Laravel-Paymongo Payment Integration
6 stars 7 forks source link

LaraPaymongo


Overview

LaraPaymongo is a PayMongo integration with Laravel. Paymongo currently supports Credit/Debit Cards (Philippines only), GCash and GrabPay Payments. LaraPaymongo provides an easy way to integrate your Laravel website with Paymongo.

Features

Installation

composer require peppertech/larapaymongo

Configuration

Environment variables

Variable Required Description Default Value
MIX_PAYMONGO_API_URL Yes PayMongo API URL https://api.paymongo.com/v1
MIX_PAYMONGO_PUBLIC_KEY Yes PayMongo Public Key. Values for Test or Live will be provided. none
PAYMONGO_STATEMENT_DESCRIPTOR Yes The string that will appear on customer Billing Statement. This should be different per project. none
PAYMONGO_SECRET_KEY Yes PayMongo Secret Key. Values for Test or Live will be provided. none
PAYMONGO_PUBLIC_KEY Yes PayMongo Public Key. same as MIX_PAYMONGO_PUBLIC_KEY none
PAYMONGO_WEBHOOK_SIG NO PayMongo Webhook Signature. This should be different per project. Generated using PayMongo API only once per project. none

Integration

LaraPaymongoIntegrator class

The publish command will copy LaraPaymongoIntegrator in /app diectory. This class will contain the necessary logic of your application to be ran before and after payment is done by the user.

Vue Components

Vue Components are copied from this package to your app in resources/js/components.

Ready-made Routes and Views

Here are the available routes and views for LaraPaymongo

IMPORTANT: The Views/payment.blade.php of this package extends from view/layouts.app of your app, so it should exist in your application's views.

Testing