Download the PHP package hypercharge/hypercharge-php without Composer

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

hypercharge-php

PHP SDK for the Hypercharge payment gateway.

Latest Stable Version Build Status

tested with PHP > 5.3 on OSX/Linux

Matches hypercharge-API-doc version 2.24 2014/09/16

Installation

Do not download the Hypercharge PHP SKD files manually. The php package manger composer takes care of that.

Let's say MY_PROJECT/ is your project root folder.

Do the following three steps:

1) Download composer.phar to MY_PROJECT/composer.phar

2) With your text editor create a MY_PROJECT/composer.json containing

This will tell composer to install the most recent Hypercharge PHP SDK version.

3) in the shell (DOS console or terminal) go to MY_PROJECT/ and run the command

This downloads and installs Hypercharge PHP SDK and its dependencies into MY_PROJECT/vendor/.

Show what has been installed

nice.

Notice: Later, when deploying your project to your server, upload the complete MY_PROJECT/vendor/ directory as well. MY_PROJECT/vendor/ contains the installed packages and autoload files.

Configuration

To get started, add one of the following snippets to your global configuration file.

Sandbox (for testing)

Hypercharge support creates a test-account and sends you login and password. For development and testing. No real money is transfered.

Live

When your Hypercharge boarding is complete our support team will send you your live login and password. Real money transactions here!

If there is no MY_PROJECT/vendor/autoload.php in your project follow the installation instructions.

Credit Card sale Transaction

Submit 77.00 USD as a credit card sale to hypercharge channel.

Note: You have to be PCI compliant to handle Credit Card data. Most likely you are not PCI compliant, in that case you use our Mobile Payment.

To see local validation errors wrap the Hypercharge\Transaction::sale call in a try catch.

Web Payment Form (WPF) session

The following example is more complex.

The WPF is displayed in English by default ('en'). If you want a German WPF simply change the redirection line to:

WPF PaymentNotification

With a PaymentNotification Hypercharge notifies your server about a Payment status change e.g. when a Payment was successfull (status approved) or has failed in some way. A PaymentNotification is a server to server request in the background. Neither webbrowser nor user interaction is involved.

You place the php script under the url you specify as notification_url (https://your-server.com/hypercharge-wpf-notifications.php in the "Web Payment Form (WPF) session" example abough)

A scelleton:

See PaymentNotification class definition for how to use $notification or $payment.

An example with symbolic busineslogic as pseudocode:

Create Mobile Payment Session

Mobile Payments are quite similar to WPF Payments. The Session creation has slightly different data. The Notification code is the same as WPF Notification abough.

your_server -> POST XML -> hypercharge

Submit Mobile Payment from mobile device

Example Mobile Submit XML your mobile application posts to $payment->submit_url to process the payment.

If you're concerned of POSTing cc data via internet: The $payment->submit_url will look something like https://testpayment.hypercharge.net/mobile/submit/eabcb7a41044e764746b0c7e32c1e9d1 so the xml will be transmitted encrypted.

Tests

Running tests for hypercharge-php itself has to be done outside of MY_PROJECT. Clone hypercharge-php into its own directory

step into the directory

install composer (here 1.0.0-alpha7 feel free to use a more recent one)

install dev dependecies

Unit Tests

Run the unit tests

You might wonder what the output means:

Simply read the next chapter.

Remote Tests

The remote tests make https calls to the hypercharge sandbox (testing gateway).

At first you have to setup your login and channel tokens:

Copy test/credentials.json.example to test/credentials.json. You received credentials when hypercharge created your test-acount. Add the credentials to test/credentials.json. See values marked with TODO.

Run the remote tests

this will take about a minute.

You can use environment variables:

Note:

Warranty

This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.


All versions of hypercharge-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
ext-curl Version *
ext-hash Version *
ext-simplexml Version *
ext-dom Version *
hypercharge/hypercharge-schema Version *
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 hypercharge/hypercharge-php contains the following files

Loading the files please wait ....