Download the PHP package yves/mopay without Composer

On this page you can find all versions of the php package yves/mopay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mopay

Laravel Mopay

Package which can simplify developers work on their app which requires MTN Mobile Money payments in Rwanda, within the laravel application

Installation

To get the latest version, simply require the project using Composer.

Once installed, if you are not using automatic package discovery, then you need to register the Yves\Mopay\Providers\MopayServiceProvider service provider in your config/app.php.

Configurations

Mopay requires connection configuration.

To get started, you'll need to publish all vendor assets:

This will create a config\mopay.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

There are six config options:

MOPAY_API_URL

This by default there is mopay api v1 Ishema Api.And it is where payment requests will pass through as gateway.

MOPAY_API_TOKEN

Make sure you set this for the token you get from Ishema Web Dashboard dashboard on profile part.

MOPAY_WEBHOOK

This is the postback url or known as webhook for your project which will receive the result of the payments that you requested. so put real url, by default there is http://app_url:port/mopay/payments/webhook".

MAIL_USERNAME

We did not forget those who wants to notify users view email for when there is status changes in their payments. To access it set your gmail or any email of your choosing here but also make sure that you configured mail, I mean like passwords and drivers of smtp. In development we used gmail and it did work great.

APP_NAME_ON_EMAILS

If you are using emails this values will be the one on emails as the sender.

USE_NEW_EMAIL_IN_CONTEXT_MODEL

Set this to true if you want to send emails from updated state in your current model, or false just to use the email that was used during the creation of payment. default is false

config\mopay.php

Initiate database table for payments

After installing publishables you need to migrate only one migrating of payments

Usage

This package can be used as a library.

Example: using the library

Initialize model for payable

if you wish to use it on your models just make sure that you have these columns:

  1. phone.
  2. email (OPTIONAL) only if you wish to send them emails.
  3. name this will be taken as client name.

Include Yves\Mopay\Traits\MopayTrait trait in your model. like down below:

Access model in controller and initiate payments

Actually this is straight forward cause you just only need to call your model and call pay function. like in this example we are going to initiate payment for 1,000Rwf in our controller for the passengers.

Note: Payments requires that you have queue worker or listener in background, so before you start call this command in project directory:

Or you could show web interface to your clients for payment

For now only phoneNumber is capable of being changed on front view by


All versions of mopay with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yves/mopay contains the following files

Loading the files please wait ....