Top Banner
Good morning!
48
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Good morning!

Page 2: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

My name is Bart

Page 3: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Among other things, I am a Drupal developer.

Page 4: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

I have worked on Drupal 7 & 8.

Page 5: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

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

Page 6: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

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

Page 7: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Today is your first date with Payment for Drupal 8

Page 8: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Why? Чому? Waarom?

Page 9: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

The benefits of a reusable platform

Page 10: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

DRY

Page 11: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

More knowledge and time for remaining code

Page 12: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Higher quality and more integration

Page 13: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Reusability++

Page 14: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Bridge modules are OKAY!

Page 15: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

How it started

Page 16: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

7.x-1.x opened in December 2011

Page 17: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

7.x-1.0 released in October 2012

Page 18: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

8.x-2.x opened in June 2013

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

Page 19: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

7.x-1.12 released in October 2014

Page 20: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

~3000 sites now report they use Payment

Page 21: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

The early stages of Payment 2

Page 22: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

What do we need?

Page 23: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Pluggability

Page 24: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

OOP

Page 25: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Improved amount formatting

Page 26: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

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

Page 27: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

OOP & PSR-4

Page 28: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Plugin system

Page 29: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Unit testing

Page 30: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Entity API & Views

Page 31: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

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

& currency exchange.

Page 32: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

This is the good stuff

Page 33: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Plugin types• Payment method *

• Payment method configuration

• Line item

• Payment status *

• Payment method selector

• Payment type *

Page 34: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Entity types

• Payment *

• Payment method *

• Payment status

• Payment schedule (work in progress)

Page 35: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

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)

Page 36: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Payment method plugins

• Process payments

• One instance for every payment entity

Page 37: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Payment method configuration plugins

• Contain form elements to configure payment method configuration entities

• One instance per payment method configuration entity

Page 38: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Payment type plugins

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

• One instance for every payment entity

Page 39: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Payment status plugins

• Describe payment’s current and previous statuses

• Multiple instances for every payment entity

Page 40: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Payment line item plugins

• Describe the charged amount

• One instance for every payment entity

Page 41: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Payment method selector plugins

• Allow users to select payment methods for payments

Page 42: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

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.

Page 43: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

We’re not there yet!

Page 44: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Scheduled/recurring payments

Page 45: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Views/Token/Rules integration

Page 46: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

Evaluation

Page 47: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

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.

Page 48: Payment processing in drupal 8 (DrupalCamp Ghent 2014)

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.