https://github.com/pod-point/payments-php
A payment service for PHP.
https://github.com/pod-point/payments-php
Last synced: about 1 year ago
JSON representation
A payment service for PHP.
- Host: GitHub
- URL: https://github.com/pod-point/payments-php
- Owner: Pod-Point
- License: mit
- Created: 2019-07-29T13:51:37.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-07T15:33:30.000Z (over 2 years ago)
- Last Synced: 2025-04-13T08:56:58.551Z (about 1 year ago)
- Language: PHP
- Size: 63.5 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Payments
[](https://travis-ci.com/Pod-Point/payments-php)
[](https://codecov.io/gh/Pod-Point/payments-php)
A payment service for PHP applications.
## Installation
To install this package, run the following command:
```bash
composer require pod-point/payments-php
```
## Usage
When performing actions using a payment service, a provider-specific exception will be thrown if it's requirements to perform that action are not met. This exception will contain the data received from the provider which can be used by the consuming application to resolve any issues.
For example, when trying to make a payment with the Stripe payment service, if authorisation is required, an exception will be thrown with a "payment intent" object which can be used by a clients Stripe SDK to carry out the authorisation.
### Laravel
For Laravel applications, bind the payment service interface to an instance of a provider payment service within an application service provider.
## Development
### Testing
This project uses PHPUnit, run the following command to run the tests:
```bash
vendor/bin/phpunit
```
A test secret key for Stripe will be required to run the tests.