Download the PHP package vedatunlu/payment without Composer
On this page you can find all versions of the php package vedatunlu/payment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vedatunlu/payment
More information about vedatunlu/payment
Files in vedatunlu/payment
Package payment
Short Description Payment systems api integration for Laravel
License MIT
Homepage https://github.com/vedatunlu/laravel-payment
Informations about the package payment
Laravel Payment
Laravel Payment is a package used for managing payment gateway integrations. This package provides an easy interface for integrating popular payment gateways such as Sipay (and soon Iyzico, Sipay, PayTr, iPara, Paynet etc.) into your Laravel application.
Features
- Easy integration with various payment gateways
- Easy usage with Payment client class
- Wallet usage with available payment gateways
- Easy validation for hash keys within incoming error or success callback request, webhooks etc.
- Multiple usage with available gateways and its methods.
Installation
-
Use Composer to add the Laravel Payment package to your project:
-
Package service providers will be discovered by your laravel project automatically. So you don't need to update your app/config.php file to add package service provider.
- Publish the config files to your project.
The command above will create a file named payment.php on config directory.
Create environment variables on your .env file before usage
Add your credentials provided by your payment gateway to the related payment gateway scope of the payment config file which is published to the config directory of your laravel file. You can provide the credentials from your service provider if you don't have yet. You don't need to define any other credentials if you don't plan to use another one. If yes. You can use each of payment gateway supported by the package by defining credentials on the related scope of the payment config file.
Payment class usage reference table
Please check out the table given below to get basic knowledge of the Payment class behavior before using it.
Method Name | Description | Available gateways |
getCards | Returns saved cards with given customer | Sipay |
saveCard | Stores card information on the payment gateway host | Sipay |
updateCard | Updates card information on the payment gateway host | Sipay |
deleteCard | Deletes card information on the payment gateway host | Sipay |
payWith2D | Start a 2D payment with given credit card for given customer info | Sipay |
payWith3D | Start a 3D payment with given credit card for given customer info | Sipay |
payWithSavedCard | Start a payment with stored credit card on the payment gateway host | Sipay |
verifyPayment | Make a verification request for given payment | Sipay |
refund | Start a refund process for given invoice | Sipay |
installmentInquiry | Make an installment inquiry request for given credit card | Sipay |
transactionStatus | Check all processed transaction's status | Sipay |
Hint: All methods accepts an array as parameter. You are not required to attach any credentials such as merchant_id, app_key, secret_key thanks to the package service provider can attach the credentials automatically. Please check your payment gateway documentation to get further information about the required parameters of the endpoints.
Basic Usage Examples
-
getCards:
-
saveCard:
-
payWith3D:
- Validate Incoming Sipay Hash key:
You can easily validate hash keys returned from sipay gateway using Payment::validate($hashKey).
This method returns array including status, total amount, invoice id, order id, currency code if key is valid. If not method will be returned false.
Contributing to the package
We welcome and appreciate your contributions to the package! The contribution guide can be found here.
License
This package is open-sourced software licensed under the MIT license.