Download the PHP package peggyforms/php-sdk without Composer

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

Peggy Pay PHP SDK

Use this SDK for easy communication with Peggy Pay.

Install

composer require peggyforms/php-sdk dev-master

Current version: 1.1.17

Basic Usage

Init

You have to start always by initialize the PeggyPay object with your API key. You can find your API key in your account

Get submission by hash

Easily get a submission by its Hash code. Every redirect of Peggy Pay sends the submission hash in the parametere: peggyHash

Easily get field submitted value:

This is the way to get the payment status of an order:

ADVANCED usage - Dynamic content

For plans with AJAX / HTTP features you can:

Choicefields

Datagrid

Validation

You can validate your form fields using the default validation tools in the editor. When you need custom valdation, you can use Javascript. Or you can setup to validate via an HTTP request. This example is for validating a field via an HTTP request.

Read more

Populate the Ajax Proxy field

The Ajax Proxy field can be very useful if you have 1 web service which provides multiple data sets. For example, if your API call returns a list of products and a list of countries, the AJAX proxy field is very useful. Only 1 HTTP request will be made and all the dependent fields will use this result as data source.

In this example we use typeless objects, but you can use any JSON-serializable object.

Populate pricefields within ajax proxy:

The POST submit action

This example reacts on the POST submit action. The hash of the submission will always be added as 'submissionHash'.

Use your custom props in your thanks page or email body by writing {POST:data.StatusMessage} in the Peggy Pay editor, in example in the [Form] => [Thanks] body: Read more

Populate the Price field

Price fields are used to collect amounts in your form in a very flexible way. With dynamic data you also can collect amounts via your webservices via an HTTP request.

Check this screenshot of the price field settings:

It is highly recommended to fill the Id parameter if possible.

To populate a Discount field, use:


All versions of php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
guzzlehttp/guzzle Version ~6.0|~7.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 peggyforms/php-sdk contains the following files

Loading the files please wait ....