"ericmuigai/pesapal": "2.*@dev"to your composer.json and then
composer updatethis will install the package Once the package is installed add
'Ericmuigai\Pesapal\PesapalServiceProvider',to the providers. after this publish the config file by
php artisan config:publish ericmuigai/pesapalthen migrate the package table by using
php artisan migrate --package=ericmuigai/pesapalGo to your pesapal account and in the ipn url enter
yoursite.com/listenipnor or the url to your public path/listenipn
You should now find the config.php in the
app/packages/ericmuigai/pesapalNow you should be able to call the
Pesapal::Iframe($array)from any view you would like the iframe to appear. The array should have this info in the
$array
/** * generates the iframe from the given details * @param array $values this array should contain the fields required by pesapal * description - description of the item or service * currency - if set will override the config settings you have of currency * user -which should be your client user id if you have a system of users * first_name- the first name of the user that is paying * last_name - the last name of the user that is paying * email - this should be a valid email or pesapal will throw an error * phone_number -which is optional if you have the email * amount - the total amount to be posted to pesapal * reference Please Make sure this is a unique key to the transaction. An example is the id of the item or something * type - default is MERCHANT * frame_height- this is the height of the iframe please provide integers as in 900 without the px * */'