PHPackages                             mralston/payment - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. mralston/payment

ActiveLibrary[Payment Processing](/categories/payments)

mralston/payment
================

Payment flows for cash, finance and leasing.

v1.0.1(3mo ago)0104↑87.5%2[3 PRs](https://github.com/mralston/payment/pulls)MITPHPPHP ^8.4

Since Jan 2Pushed 2mo agoCompare

[ Source](https://github.com/mralston/payment)[ Packagist](https://packagist.org/packages/mralston/payment)[ Docs](https://github.com/mralston/payment)[ RSS](/packages/mralston-payment/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (2)Dependencies (15)Versions (6)Used By (0)

Payment
=======

[](#payment)

Introduction
------------

[](#introduction)

Payment flows for cash, finance and leasing.

Installation
------------

[](#installation)

```
composer require mralston/payment
```

Configuration
-------------

[](#configuration)

Add the following to your .env file

```
# Configure the parent model for payment records
PAYMENT_PARENT_MODEL=\App\Models\Quote

# Optionally configure an Inertia route view from your application
PAYMENT_INERTIA_ROOT_VIEW=/layouts/inertia

# Helper class
PAYMENT_HELPER=\App\Services\PaymentHelper
```

Parent Model
------------

[](#parent-model)

Payment records are linked to a parent model in your application; a quotation or contract for example. The parent model must implement the `PaymentParentModel` interface which includes a several relationships. The easiest way to implement the relationship methods is using the `HasPayments` trait. The parent model is declared in the `PAYMENT_PARENT_MODEL` configuration variable.

```
