48
Good morning!

Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Embed Size (px)

Citation preview

Good morning!

My name is Bart

Among other things, I am a Drupal developer.

I have worked on Drupal 7 & 8.

I have developed for Drupal 5, 6, 7, & 8.

I have organized regional, national, and international Drupal events since 2008.

Today is your first date with Payment for Drupal 8

Why? Чому? Waarom?

The benefits of a reusable platform

DRY

More knowledge and time for remaining code

Higher quality and more integration

Reusability++

Bridge modules are OKAY!

How it started

7.x-1.x opened in December 2011

7.x-1.0 released in October 2012

8.x-2.x opened in June 2013

700 sites reported they used 7.x-1.x

7.x-1.12 released in October 2014

~3000 sites now report they use Payment

The early stages of Payment 2

What do we need?

Pluggability

OOP

Improved amount formatting

Payment 7.x-2.x Payment 8.x-2.x

OOP & PSR-4

Plugin system

Unit testing

Entity API & Views

Currency 8.x-3.xParsing user input, formatting amounts,

& currency exchange.

This is the good stuff

Plugin types• Payment method *

• Payment method configuration

• Line item

• Payment status *

• Payment method selector

• Payment type *

Entity types

• Payment *

• Payment method *

• Payment status

• Payment schedule (work in progress)

New features/improvements

• Create custom payment statuses through the UI

• Payments have bundles

• Refund & postponed capture support

• No unnecessary opening of new windows

• Scheduled/recurring payments (work in progress)

Payment method plugins

• Process payments

• One instance for every payment entity

Payment method configuration plugins

• Contain form elements to configure payment method configuration entities

• One instance per payment method configuration entity

Payment type plugins

• Contain metadata and provide functionality for the payment’s type/bundle

• One instance for every payment entity

Payment status plugins

• Describe payment’s current and previous statuses

• Multiple instances for every payment entity

Payment line item plugins

• Describe the charged amount

• One instance for every payment entity

Payment method selector plugins

• Allow users to select payment methods for payments

From payment method configuration to payment method

• Write a payment method configuration plugin.

• Write a payment method that takes the payment method configuration plugin’s configuration as its definition.

• Write a plugin deriver to provide payment method definitions based on the configuration in payment method configuration entities.

We’re not there yet!

Scheduled/recurring payments

Views/Token/Rules integration

Evaluation

What have you learned?

• How Payment helps development.

• The differences between Payment 7.x-1.x and 8.x-2.x.

• 6 plugin types and 4 entity types.

• How to create your own payment method.

Q&A

• http://twitter.com/BartFeenstra

• Xano on drupal.org and IRC

• Questions may also be asked on Twitter or http://drupal.org/project/issues/payment.