Download the PHP package mothership-ec/cog-mothership-ecommerce without Composer

On this page you can find all versions of the php package mothership-ec/cog-mothership-ecommerce. 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 cog-mothership-ecommerce

Mothership Ecommerce

Configuration

Dispatch

Payment

Gateways

Payment gateways allow you to process payments through an external service.

There are two components to a gateway within mothership; an implementation of Gateway\GatewayInterface to communicate with the external service, and controllers to handle purchase and refund requests.

Default gateways

ZeroPayment

The zero payment gateway is the most basic implementation, it simply completes the order and redirects straight to the success url.

LocalPayment

The local payment gateway is an extension of zero payment.

Extending with new gateway providers

To add a new gateway provider you'll need to create a new adapter that implements Gateway\GatewayInterface and append it to the gateway.collection service.

Secondly you'll need to implement the Controllers\Gateway\PurchaseControllerInterface and Controllers\Gateway\RefundControllerInterface. If your new gateway does not support refunds then the refund() method should just return $this->createNotFoundException().

Of course your gateway and controller(s) can use additional methods for handling the specific functionality and process flow for the new provider, such as callbacks from the external service.

Purchases

A purchase process is a system which sends a payment request to a gateway and creates / modifies an object on a success response and reacts accordingly to cancelled and failed purchases. For example, the standard checkout process which on success saves the order to the database and records the payment against it.

When writing a new purchase process the 'continue to payment' action should forward the request to the current gateway's purchase controller reference using $this->get('gateway')->getPurchaseControllerReference().

This forward request should pass the instance of PayableInterface that is being purchased and the stages configuration.

The purchase process requires a controller that implements Controllers\Gateway\CompleteControllerInterface. This should implement the success, cancel and failure methods.

The success() method should turn the payable into a saved instance of the object it represents, e.g. an order, store any payments as necessary and return a success url in a JsonResponse. This completion process should be called by the gateway purchase controller when confirming the purchase with the external provider.

Refunds

A refund process works in the same way as a purchase purchase, except you forward the request to $this->get('gateway')->getRefundControllerReference() and pass an additional reference parameter. The cancel stage is not required for refunds.


All versions of cog-mothership-ecommerce with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
mothership-ec/cog Version ~4.10
mothership-ec/cog-mothership-user Version ~4.0
mothership-ec/cog-mothership-cp Version ~3.0
mothership-ec/cog-mothership-commerce Version ~5.17
mothership-ec/cog-mothership-cms Version ~4.13
omnipay/common Version ~2.0
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 mothership-ec/cog-mothership-ecommerce contains the following files

Loading the files please wait ....