plan-a23 / paymob
:package_description
dev-main
2023-07-23 18:04 UTC
Requires
- php: ^8.1
Requires (Dev)
- orchestra/canvas: ^7.5
- orchestra/testbench: ~7
- phpunit/phpunit: ~9.0
This package is auto-updated.
Last update: 2024-09-23 20:43:41 UTC
README
这里应该放置您的描述。请查看contributing.md以了解待办事项列表。
安装
通过Composer
$ composer require plan-a23/paymob
主要设置
配置
$ php artisan vendor:publish --tag=config --force
环境变量
PAYMOB_API_KEY: xxxxxxx PAYMOB_HMAC: xxxxxxxx
卡片
环境变量
PAYMOB_CARD_INTEGRATION:xxxxx PAYMOB_CARD_IFRAME_ID:xxxxx
支付
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();
钱包
环境变量
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
变更日志
有关最近变更的更多信息,请参阅变更日志。
测试
$ composer test
贡献
有关详细信息及待办事项列表,请参阅contributing.md。
安全
如果您发现任何安全相关的问题,请发送电子邮件至author@email.com,而不是使用问题跟踪器。
鸣谢
许可证
MIT. 更多信息请参阅许可证文件。