Download the PHP package memeoirs/paymill-bundle without Composer

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

paymill-bundle Build Status

Straight forward integration of Paymill payments into Symfony applications.

Features

Setup

This bundle uses functionality provided by JMSPaymentCoreBundle which allows you to add new payment backends (e.g. Paypal) with minimum changes to your code. These instructions will also guide you through the installation of that bundle.

Installation

Install with composer:

composer require memeoirs/paymill-bundle

Then register the bundles in AppKernel.php:

Include routing.yml in your routing file (for webhooks):

Configuration

JMSPaymentCoreBundle's configuration is as easy as choosing a random secret string which will be used for encrypting data. Note that if you change the secret all data encrypted with the old secret will become unreadable.

Finally, you need to specify Paymill's private and public keys. You'll need to create a Paymill account if you don't have one and retrieve it's private and public keys. Refer to Paymill's documentation for information on how to accomplish this.

Create database tables

JMSPaymentCoreBundle needs a few database tables so you'll have to create them. If you want to know more about the data model see JMSPaymentCoreBundle's documentation.

If you're using database migrations, you can create the new tables with following commands:

php app/console doctrine:migrations:diff
php app/console doctrine:migrations:migrate

Or, without migrations:

php app/console doctrine:schema:update

Usage

Rendering the form

You'll need a new route:

And a controller action to render the form:

The twig template:

paymill_initialize() renders the Resources/views/init.html.twig template. If you need to change the output of paymill_initialize you can use your own template:

Accepting the payment

When the user clicks the buy button, an Ajax request is made to paymill's servers containing the credit card information. The response to this request is a unique token. The form is then submitted through Ajax, excluding the credit card information but including the token.

You'll handle the form submission in the same controller action that renders the form:

Specifying a Client

Paymill allows you to attach each payment to a certain client. To have this bundle automatically manage clients, you can pass the client information as additional data when creating the form:

Changing how the form looks

TODO

Webhooks

A webhook is a controller action to which Paymill POSTs events. As of now, this bundle is able to automatically handle notifications for the following event types: transaction.succeeded and refund.succeeded.

The only thing you need to do is create a webhook using the provided console command (see the Console section below):

app/console paymill:webhook:create --url=https://myapp.com/paymill/hook \
    --event=transaction.succeeded --event=refund.succeeded

Everytime a successful transaction or refund happens, Paymill will post a request to the URL you provided, which maps to the routing.yml in your routing file).

Console

Currently only webhooks are supported

The console commands give you CRUD access to Paymill's API from the command line.

Webhooks

List webhooks

The paymill:webhook:list command retrieves the list of the most recent webhooks:

app/console paymill:webhook:list

You can filter and paginate the results using a set of filters formatted as a HTTP query string. See here for the list of all available filters. To retrieve the second page of results ordered chronologically:

app/console paymill:webhook:list "count=10&offset=10&order=created_at_asc"

Create a webhook

The paymill:webhook:create command creates a new URL or Email webhook. For more information about webhooks see Paymill's API documentation.

To create a URL webhook specify the --url option:

app/console paymill:webhook:create --url=https://myapp.com/some-paymil-webhook

If instead you wish to create an Email webhook specify the --email option:

app/console paymill:webhook:create [email protected]

You can specifiy the events that trigger this webhook using multiple --event options. If no --event option is used, all events will be subescribed to. See here for the list of available event types.

app/console paymill:webhook:create --url=... --event=transaction.succeeded --event=refund.succeeded

To create an inactive webhook use the --disable option:

app/console paymill:webhook:create --url=... --disable

Delete a webhook

The paymill:webhook:delete command deletes webhooks. It takes a series of space-separated webhook ids as arguments:

app/console paymill:webhook:delete hook_c945c39154ab3b3e1ef6 hook_b4ae6600de00b9f69afa

License

MIT


All versions of paymill-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
symfony/framework-bundle Version ~2.0
jms/payment-core-bundle Version ~1.0
paymill/paymill Version 3.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 memeoirs/paymill-bundle contains the following files

Loading the files please wait ....