Download the PHP package berzel/paynow-php without Composer

On this page you can find all versions of the php package berzel/paynow-php. 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 paynow-php

Paynow-Php

A simple Paynow library (implementation using PHP) which provides an expressive and fluent interface to the Paynow payments

gateway. It handles pretty much all of the boilerplate code you dreading writing.

Installation

Install the package through Composer.

Run the Composer require command from the Terminal:

composer require berzel/paynow-php

If you're using Laravel 5.5 or later, this is all there is to do.

Should you still be on version 5.4 of Laravel, the final steps for you are to add the service provider of the package and

alias the package. To do this open your config/app.php file.

Add a new line to the providers array:

Berzel\Paynow\PaynowServiceProvider::class

And optionally add a new line to the aliases array:

'Paynow' => Berzel\Paynow\Facades\Paynow::class,

Now you're ready to start using the library in your application. Please note that this is not an official liabrary from

Paynow.

Overview

Look at one of the following topics to learn more about this library

Usage

This library gives you the following methods to use:

Paynow::getInstance()

Getting/Creating an instance of the paynow class is really simple, you just use the getInstance() method, which accepts

two parameters. In its most basic form you just specify the id and key of your paynow integration. You can retrieve your Paynow

app id and app key from the Paynow control panel.

The getInstance() method will return a Berzel\Paynow\Paynow instance.

Paynow::initiateTransaction()

Paynow expects you to supply a certain number of values when initiating a transaction. These values are

- returnurl => the url (on your website) that the user will be redirected to after completing a transaction on paynow
- resulturl => the url (on your website) that paynow will post order updates to
- amount => the amount that you wish to charge the user 
- reference => the order reference number/string
- info => additional information about the order
- status => the status of the order
- email => the email address to associate with this order

The initiateTransaction() method will attempt to initiate a transaction on the paynow platform, and it accepts a

PaynowOrder instance which you can create using the createOrder() method (documented below). The initiateTransaction()

method will throw an Exception if the attempt to initiate a transaction fails. If the request was successful the full Paynow

response array will be returned from the method. The array will contain a 'browserurl' key value which you can use to

redirect the user to Paynow to complete the payment. The 'pollurl' key value contains the url on paynow that you can use in

future to get status updates about the order (You should save this to you local storage engine for future use). Other keys

that are contained in the result array are the 'status', 'hash', etc, of which you are encouraged to also save to your local

storage for future use.

If an error occurs you can catch the exception and use the getMessage() method to get information about why the

transaction failed to initiate.

Paynow::createOrder()

To create a paynow order instance use the createOrder() method, which retains an instance of the PaynowOrder class which

is to be passed as an argument to the initiateTransaction() method. The method accepts an array as an argument which

should contain the details of your order. This array should contain these keys resulturl, returnurl, amount, reference, info,

status, and email. All fields are required and if any of the keys is not found the method will throw an exception.

Paynow::returnFromPaynow and Paynow::updateFromPaynow

When you are returning from paynow after the user has completed payment. You can call the returnFromPaynow() or

updateFromPaynow() method. This method throws an exception if anything unexpected happens when requesting the Paynow

platform for updates. If everything goes well it will return the current/latest status(Paid, Cancelled, Awaiting Delivery,

etc) of the order on paynow. Both methods accept an argument which is the poll url returned earlier when trying to initiate

a transaction.

Example

Initiating a transaction on paynow

When returning from paynow

When just getting an update from paynow

For now that will be all.


All versions of paynow-php 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 berzel/paynow-php contains the following files

Loading the files please wait ....