Download the PHP package khalyomede/systempay without Composer

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

khalyomede/systempay

Generates form fields for payment and process payment notifications (IPN) for Systempay.

Packagist Version Build Status Maintainability Packagist License Packagist PHP Version Support

Summary

About

I created this package to be able to use it in my Laravel shop application.

I have seen the packages of others folks, but I either did not found every tools I need, or the tools were untested.

I hope to provide folks with a tested library so you can use it with confidence.

This package respects the Semantic versioning.

Requirements

Installation

In the root of your folder project, run this command:

Examples

1. Generating form payment hidden fields

In this example, we will only fill mandatories fields before generating the hidden HTML inputs to inject in an HTML page.

2. Processing a payment notification (IPN)

In this example, we will provide with the raw POST response from the Systempay server to proces the notification.

API

Payment::__construct

The constructor will automatically fill the following data:

Payment::getHashAlgorithm

Get the hash algorithm.

Payment::getTotalAmount

Get the total amount.

Payment::getFormTotalAmount

Get the total amount, formatted to fit Systempay requirements (e.g., no decimal separators). For example, if the amount is 199.99, the value returned by this method will be 19999.

Payment::getSiteId

Get the site id. Check the Systempay documentation to know where to find your site id.

Payment::getContextMode

Get the context mode.

Payment::getCurrencyNumericCode

Get the 3 digits numeric code of the currency.

Payment::getPaymentConfiguration

Get the payment configuration.

Payment::getTransactionDate

Get the transaction date.

Payment::getFormTransactionDate

Get the transaction date formatted for the form. It is formatted with the DateTime format "YmdHis" according to the Systempay transaction date format requirement.

Payment::getTransactionId

Get the transaction id.

Payment::getVersion

Get the payment protocol version.

Payment::getActionMode

Get the payment action mode.

Payment::getPageAction

Get the payment page paction.

Payment::getHtmlFormFields

Get the html form fields that corresponds to your payment. Each fields is an <input type="hidden" />.

Payment::getKey

Get your site key. Check the Systempay documentation to know where to find your site key.

Payment::getFormUrl

Get the form URL.

Payment::setHashAlgorithm

Set the hash algorithm between sha1 and (hmac) sha256.

throws

Payment::setTotalAmount

Set the total amount of the payment.

Payment::setSiteId

Set the site id (check the Systempay documentation to know where to find your site id).

throws

Payment::setContextMode

Set the context mode (either "TEST" or "PRODUCTION"). You can use the ContextMode class constants to avoid hard writing the mode.

throws

Payment::setCurrency

Set the currency using the alpha-3 currency code (like "EUR"). You can use the Currency class constants to avoid hard writing the currency.

throws

Payment::setPaymentConfiguration

Set the payment configuration (either "SINGLE" or "MULTI"). You can use the PaymentConfiguration class constants to avoid hard writing the configuration.

throws

Payment::setTransactionDate

Set the transaction date.

Payment::setTransactionId

Set the transaction id.

throws

Payment::setKey

Set the key, that is used to generate the signature and validating the authenticity of the request.

ContextMode::__construct

Constructor the context mode with the given mode.

`ContextMode::isAllowed

Returns true if the context mode is allowed, else returns false.

`ContextMode::getAllowedToString

Get the allowed context mode in a string, separated by a coma.

HashAlgorithm::__construct

Construct with the given algorithm.

HashAlgorithm::isSupported

Return true if the algorithm is supported by the machine running the current script, else return false.

HashAlgorithm::isAllowed

Return true if the algorithm is either SHA1 or SHA256, else returns false.

HashAlgorithm::getAllowedToString

Get the allowed algorithm as a string separated by a coma.

PaymentConfiguration::__construct

Construct with the given payment configuration.

PaymentConfiguration::isAllowed

Returns true if the payment configuration is allowed, else return false.

PaymentConfiguration::getAllowedToString

Returns the allowed payment configuration as a string separated by a coma.

PaymentNotification::construct

Constructor that takes in general the raw $_POST (or $request->all() for the Laravel users).

PaymentNotification::setKey

Set the (private) key. You can find your key in your back office.

PaymentNotification::setHashAlgorithm

Set the hash algorithm. You can pass in the value using the HashAlgorithm class if you do not want to use hard coded strings.

Run the tests

Execute this command in the root folder of this project:

Compatibility table

?: Untested

7.1 7.2 7.3 7.4 8.0
v0 pass pass pass pass ?

You can counter check these results by following this procedure:

  1. Checkout to the desired branch: git checkout v1.2.3
  2. Start the Docker containers: docker-compose up -d
  3. In the file docker-compose.yml, change the version of PHP in the build key of the php service with the one that fits your need
  4. Run the tests: docker-compose exec php composer run test

All versions of systempay with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
payum/iso4217 Version 1.*
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 khalyomede/systempay contains the following files

Loading the files please wait ....