plan-a23/paymob is a Laravel package for :package_description.
It currently has 0 GitHub stars and 6 downloads on Packagist.
Install it with composer require plan-a23/paymob.
Discover more Laravel packages by plan-a23
or browse all Laravel packages to compare alternatives.
Last updated
This is where your description should go. Take a look at contributing.md to see a to do list.
Via 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: '[email protected]',
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: '[email protected]',
phone_number:'+201xxxxxxxx',
country:'EG',
state:'giza',
city: '6 october',
street: '123' ,
postal_code: 34546);
return $pay->payment();
PAYMOB_WALLETS_INTEGRATION:xxxxxxx
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: '[email protected]',
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: '[email protected]',
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
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
MIT. Please see the license file for more information.