Download the PHP package iodigital/peachpayment without Composer
On this page you can find all versions of the php package iodigital/peachpayment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download iodigital/peachpayment
More information about iodigital/peachpayment
Files in iodigital/peachpayment
Package peachpayment
Short Description A library to help integrate Peach Payments
License MIT
Homepage https://github.com/iodigital/peachpayment
Informations about the package peachpayment
PeachPayment
This is a work in progress.
Installation
Via Composer
This package uses auto discovery but can be added to your config/app.php
providers
by adding \IoDigital\PeachPayment\PeachPaymentServiceProvider::class,
You can publish the assets with the following:
php artisan vendor:publish --tag=peachpayment-config
php artisan vendor:publish --tag=peachpayment-migrations
Config file
The configuration file provides you with the ability of adding your production and test Peach Payment credentials. The package does a check against your app environment.
The variables that can be used are:
PEACH_PAYMENTS_USER_ID
PEACH_PAYMENTS_PASSWORD
PEACH_PAYMENTS_AUTHORIZATION_HEADER
PEACH_PAYMENTS_ENTITY_ID_ONCE_OFF
PEACH_PAYMENTS_ENTITY_ID_RECURRING
PEACH_PAYMENTS_TEST_MODE
PEACH_PAYMENTS_NOTIFICATION_URL
PEACH_PAYMENTS_WEBHOOK_SECRET_KEY
Migrations
payment_cards
This table can be used in conjunction with Server to Server functionality.
payment_results
This table can be used to store the results of transactions.
payment_events
This table can be used to store the event data received from webhooks.
Usage
This package provides the ability of using Server to Server and COPYandPay. Fairly simple to get either one going:
As explained further below, you can also override your Peach Payment credentials on the fly:
Where $settings
is a fluent class.
Methods available to Server to Server:
Methods available to COPYandPAY:
To determine the result of a transaction with Peach Payment, you can use the Response class:
Saving the response is also available:
$response->save($result, $paymentCard);
Webhooks
The following change needs to be made in your app/Http/Middleware/VerifyCsrfToken.php
file:
Helpers
Setting.php
This class allows you to inject or modify your Peach Payment credentials on a per usage basis. By default, it uses the variables given in the config file and you only have to override the variables needed.
Usage is fairly straightforward:
This should provide flexibility in certain edge cases.
Change log
Please see the changelog for more information on what has changed recently.
Testing
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
- [author name][link-author]
- [All Contributors][link-contributors]
License
license. Please see the license file for more information.