Download the PHP package morningtrain/wp-nets-easy without Composer

On this page you can find all versions of the php package morningtrain/wp-nets-easy. 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 wp-nets-easy

Morningtrain\WpNetsEasy

A Morningtrain package to simple handle NETS Easy payments.

Table of Contents

Introduction

Getting Started

To get started install the package as described below in Installation.

To use the tool have a look at Usage

Installation

Install with composer

Dependencies

Usage

Initializing package

Initialize \Morningtrain\WpNetsEasy\NetsEasy with NETS Easy test or live secret key.

Running migrations

This needs to be done before using the package, or after updating the package.
You can run all new migrations like so:

Using wp cli:

Using php:

Create payment

Auto charge payment

If your product allows you to auto charge payment. You can tell Nets Easy to charge the payment automatically before you persist the payment.

Handle existing payment

When a payment requrest has been created, the payment reference will be saved to the database.

Get payment

Payment is a model implementet with Eloquent. To get payments you can use all methods from Eloquent (see documentation).

You can use the custom method

Terminate payment

To terminate payment, the customer must not have finished checkout. You can use it on the cancel callback to avoid double payments later.

Check if payment is reserved

Check if payment is charged

Charge payment

NOTE: Partly charges is not implementet yet

Refund payment

NOTE: Refund and partly refund is not implementet yet

Create subscription

NOTE: Subscriptions is not implementet yet

Handle existing subscription

NOTE: Subscriptions is not implementet yet

Handle webhoks

The implementation handle webhooks and sets the payment status automatically.

If you need to do something on a specific webhook, you can do that throug actions and filters.

List of implemented webhooks

Name Descritpion
payment.created A payment has been created.
payment.reservation.created The amount of the payment has been reserved.
payment.reservation.failed A reservation attempt has failed.
payment.checkout.completed The customer has completed the checkout.
payment.charge.created.v2 The customer has successfully been charged, partially or fully.
payment.charge.failed A charge attempt has failed.
payment.refund.initiated.v2 A refund has been initiated.
payment.refund.failed A refund attempt has failed.
payment.refund.completed A refund has successfully been completed.
payment.cancel.created A reservation has been canceled.
payment.cancel.failed A cancellation has failed.

Actions

Hook Name Description
morningtrain/nets-easy/webhook/{$webhookName} Do something on the webhook (before the implementet handling but after we have checked for previous handling)

Filters

Hook Name Filtered value Extra parameters Description
morningtrain/nets-easy/webhook/{$webhookName}/bypass false none Return something to bypass all webhook handling logic
morningtrain/nets-easy/webhook/{$webhookName}/after-handle false or value from handle function $webhook - The Webhook object with data Do something after default handling. Return something to bypass setting the webhook as handled and return status 200
morningtrain/nets-easy/webhook/{$webhookName}/response WP_REST_Response with default values (status 200) $webhook - The Webhook object with data Filter the response after webhook fully handled

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of wp-nets-easy with dependencies

PHP Build Version
Package Version
Requires morningtrain/wp-route Version ^0.6
morningtrain/wp-database Version ^0.3
morningtrain/php-loader Version ^0.3
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 morningtrain/wp-nets-easy contains the following files

Loading the files please wait ....