Download the PHP package sextanet/laravel-webpay without Composer
On this page you can find all versions of the php package sextanet/laravel-webpay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sextanet/laravel-webpay
More information about sextanet/laravel-webpay
Files in sextanet/laravel-webpay
Package laravel-webpay
Short Description Laravel Webpay
License MIT
Homepage https://github.com/sextanet/laravel-webpay
Informations about the package laravel-webpay
Laravel Webpay
Laravel, Transbank, Webpay and SextaNet products and logos are property of their respective companies.
The easiest way to use Webpay in your projects
Installation
You can install the package via composer:
Publish and run migrations
Copy these keys in your .env
file
Usage
With attached model (recommended)
By default, it uses these 3 fields which are required by Transbank:
Name | Description | Example |
---|---|---|
amount | Total price (integer format) | 10000 |
order_id | Unique identifier for your transaction | 1 |
session_id | Unique session for your transaction | 23d6436f95b1987cd616b85bae806649 |
If you use other names for your fields, no problem: you can make each model recognize them very easily using the following magic methods:
Easy peasy!
Setting custom URLs
For convenience, you can set custom pages for each status before calling payWithOrder() method
Cancelled
Rejected
Testing cards
Type | Numbers | Result |
---|---|---|
VISA | 4051 8856 0044 6623 | Approved |
Mastercard | 5186 0595 5959 0568 | Rejected |
Redcompra | 4051 8842 3993 7763 | Approved |
VISA Prepaid | 4051 8860 0005 6590 | Approved |
- Expire date: (Any valid date)
- RUT: 11111111-1
- Password: 123
Source: Official Transbank Developers website
Production mode
When you are ready to be in production, you need to set WEBPAY_IN_PRODUCTION
to true
, and specify WEBPAY_COMMERCE_CODE
and WEBPAY_SECRET_KEY
.
Alternative usage
If you don't want to import Trait, you can create or instanciate a order, and then, calling LaravelWebpay::create($order)
method, for example:
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-webpay with dependencies
illuminate/contracts Version ^10.0||^11.0
spatie/laravel-package-tools Version ^1.16
transbank/transbank-sdk Version ^4.0