plan-a23/paymob
Composer 安装命令:
composer require plan-a23/paymob
包简介
:package_description
README 文档
README
This is where your description should go. Take a look at contributing.md to see a to do list.
Installation
Via Composer
$ composer require plan-a23/paymob
Main Setup
Config
$ php artisan vendor:publish --tag=config --force
env
PAYMOB_API_KEY: xxxxxxx PAYMOB_HMAC: xxxxxxxx
Card
env
PAYMOB_CARD_INTEGRATION:xxxxx PAYMOB_CARD_IFRAME_ID:xxxxx
Payment
use PlanA23\Paymob\Classes\CardPay; $pay = new CardPay(); $pay->setItems([ [ "name"=>"ASC1515", "amount_cents"=> "500000", "description"=>"Smart Watch", "quantity"=> "1" ], [ "name"=> "ERT6565", "amount_cents"=> "200000", "description"=> "Power Bank", "quantity"=> "1" ] ]); $pay->setAmountCents(700000); $pay->setPayOrderId(2); // don't duplicate this id // can enter shipping data only or shipping and billing $pay->setShippingData( first_name: 'test', last_name:'test', email: 'test@domain.com', phone_number:'+201xxxxxxxx', country:'EG', state:'giza', city: '6 october', street: '123 elhosry' , postal_code: 34546 ); $pay->setBillingData( first_name: 'test', last_name:'test', email: 'test@domain.com', phone_number:'+201xxxxxxxx', country:'EG', state:'giza', city: '6 october', street: '123' , postal_code: 34546); return $pay->payment();
Wallet
env
PAYMOB_WALLETS_INTEGRATION:xxxxxxx
payment
use PlanA23\Paymob\Classes\WalletPay; $pay = new WalletPay(); $pay->setItems([ [ "name"=>"ASC1515", "amount_cents"=> "500000", "description"=>"Smart Watch", "quantity"=> "1" ], [ "name"=> "ERT6565", "amount_cents"=> "200000", "description"=> "Power Bank", "quantity"=> "1" ] ]); $pay->setAmountCents(700000); $pay->setPayOrderId(2); // don't duplicate this id // can enter shipping data only or shipping and billing $pay->setShippingData( first_name: 'test', last_name:'test', email: 'test@domain.com', phone_number:'+201xxxxxxxx', country:'EG', state:'giza', city: '6 october', street: '123 elhosry' , postal_code: 34546 ); $pay->setBillingData( first_name: 'test', last_name:'test', email: 'test@domain.com', phone_number:'+201xxxxxxxx', country:'EG', state:'giza', city: '6 october', street: '123 elhosry' , postal_code: 34546); $pay->setPhoneNumber('+201xxxxxxxxx'); // for wallet return $pay->payment(); //this is link for payment
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author@email.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-22