Download the PHP package kalimeromk/casys-laravel without Composer
On this page you can find all versions of the php package kalimeromk/casys-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kalimeromk/casys-laravel
More information about kalimeromk/casys-laravel
Files in kalimeromk/casys-laravel
Package casys-laravel
Short Description Integration of casys payment method
License MIT
Informations about the package casys-laravel
Casys Laravel Package
This is a package to integrate the Casys payment gateway into Laravel. It generates complete scaffolding for simple integration, including support for recurring payments.
Features
- Views
resources/views/vendor/casys
- Configuration
config/casys.php
- Controllers
/Http/Controllers/CasysController
/Http/Controllers/RecurringPaymentController
- Recurring Payment Support
/Http/Services/RecurringPayment.php
- Example integration for managing recurring payments using SOAP services.
- Routes
- Predefined routes for standard and recurring payments.
Installation
Require this package by running:
After installation, publish the package files:
This will publish the following files:
config/casys.php
resources/views/vendor/casys
Laravel Setup
Register the route file in your RouteServiceProvider
or add the following routes to your existing route file:
Standard Payment Routes
Recurring Payment Routes
For Laravel <=7, use the controller string syntax:
How to Use
Configuration
Add your credentials to the .env
file:
Standard Payments
For standard payments, simply pass the amount and client data to the appropriate method in the CasysController
. The views provided by the package will handle the UI. If you wish to customize the views, edit the published views in resources/views/vendor/casys
.
Recurring Payments
The package includes support for recurring payments through the RecurringPayment
class and RecurringPaymentController
. Here’s how you can integrate it:
Recurring Payment Parameters
The recurring payment requires the following parameters:
-
RPRef: A string containing details about the recurring payment, formatted as:
- RPRefID: Unique ID returned during the initial registration of the recurring transaction.
Example Workflow
-
Initial Registration The cardholder performs the initial transaction with the
RPRef
parameter set. The system returns anRPRefID
, which you should store for future recurring payments. - Subsequent Payments
Use the stored
RPRefID
to initiate subsequent payments without user involvement.
Example Request
Call the /recurring-payment
endpoint with the following payload:
Example Recurring Payment Integration
You can use the RecurringPayment
service class in your application:
Provided Controllers
CasysController
Handles the standard payment flow, including:
- Loading the payment page (
paymentLoader
route). - Validating and processing payments (
payment
route). - Handling success (
paymentOKURL
route) and failure (paymentFailURL
route) callbacks.
RecurringPaymentController
Handles recurring payment requests via the /recurring-payment
route. Example integration is included for making SOAP calls to the Casys gateway.
Info
This package is in an alpha stage and is designed to be flexible for your specific needs. Suggestions are welcome!
All versions of casys-laravel with dependencies
ext-json Version *
ext-soap Version *