delower186/twocheckout
最新稳定版本:v1.0.3
Composer 安装命令:
composer require delower186/twocheckout
包简介
2checkout payment gateway integration for laravel application.
README 文档
README
2checkout package for Laravel application
Providing Simple 2Checkout Payment Gateway Integration for Laravel applications
Requirements
- Laravel >= 5.5
Installation
- Use following command to install:
composer require delower186/twocheckout
- Add the service provider to your if Laravel version is below 5.5
$providersarray inconfig/app.phpfile like:
Delower186\Twocheckout\TwocheckoutServiceProvider
Delower186\Twocheckout\TwocheckoutServiceProvider::class
- Add the alias to your
$aliasesarray inconfig/app.phpfile like:
'Twocheckout' => Delower186\Twocheckout\Facades\Twocheckout
'Twocheckout' => Delower186\Twocheckout\Facades\Twocheckout::class
- Run the following command to publish configuration:
php artisan vendor:publish
Usage
Configuration
- after creating 2checkout account add merchant code to .env file
MERCHANT_CODE='your merchant code here'
Options
- Migrate database if you want to see demo / use built in system then go to the following link
http://127.0.0.1:8000/twocheckout
- Otherwise include the following facade to your controller which will enable you to use 2 static methods loadScripts() and buyNow($price)
use Delower186\Twocheckout\Facades\Twocheckout;
Twocheckout::loadScripts() // use this method in the bottom of product page
Twocheckout::buyNow($price) //use this method as buyNow button product price as parameter, it can be customized using css classes
Twocheckout::store($request) //use this method to store order info sent by 2checkout, publish views & migrations to customize
Customization
- these are optional customization options can be added to .env file
#DEFAULT PRODUCT TYPE IS "DYNAMIC" only for now PRODUCT_TYPE= #DEFAULT CURRENCY "USD" CURRENCY_CODE= #DEFALT TEXT "BUY NOW" BUTTON_TEXT= #CSS CLASSES SEPARATED BY SPACE CSS_CLASSES= #CART NAME (DEFAULT 'Total Price') CART_NAME=
统计信息
- 总下载量: 41
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-09