Download the PHP package neolikotsi/payfast without Composer
On this page you can find all versions of the php package neolikotsi/payfast. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download neolikotsi/payfast
More information about neolikotsi/payfast
Files in neolikotsi/payfast
Package payfast
Short Description Laravel 5.4+|6+|7+ package for processing ITN payments through payfast.co.za
License MIT
Informations about the package payfast
Laravel Payfast
A dead simple Laravel payment processing class for payments through payfast.co.za. This package only supports ITN transactions. Laravel Payfast is strictly use at own risk.
Installation
Add Laravel Payfast to your composer.json
Add the PayfastServiceProvider to your providers array in config/app.php
Config
publish default configuration file.
IMPORTANT: You will need to edit App\Http\Middleware\VerifyCsrfToken
by adding the route, which handles the ITN response to the $excepted array. Validation is done via the ITN response.
Usage
Creating a payment returns an html form ready to POST to payfast. When the customer submits the form they will be redirected to payfast to complete payment. Upon successful payment the customer will be returned to the specified 'return_url' and in the case of a cancellation they will be returned to the specified 'cancel_url'
NOTE
If you want to use subscripions, make sure to set your merchant's passphrase in the config file for this package. It is required for subscriptions.
ITN Responses
Payfast will send a POST request to notify the merchant (You) with a status on the transaction. This will allow you to update your order status based on the appropriate status sent back from Payfast. You are not forced to use the key 'm_payment_id' to store your merchant reference but this is the the key that will be returned back to you from Payfast for further verification.
The response variables POSTED back by payfast may be accessed as follows:
Variables Returned by Payfast
Amounts
The cart total may be set in 2 ways, as a string value:
Or as an Integer. In the case of an integer, the cart total must be passed through in cents, as follows:
Payment Form
By default the paymentForm() method will return a compiled HTML form including a submit button. There are 3 configurations available for the submit button.
Testing
License
The MIT License (MIT). Please see License File for more information.
All versions of payfast with dependencies
illuminate/http Version ^5.4|^6.0|^7.0|^8.0
billowapp/show-me-the-money Version ^0.1.2|^0.2|^0.4