SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Anatomy of payment
systems in Drupal 8
Oleg Natalushko http://drupal.org/u/niko
Plan
• Current status of payments in Drupal 8.
• Common developers mistakes.
• Drupal commerce 2.x payment
• Payment
• Payment offsite API
About me
• More than 100 implemented drupal projects.
• 15 years experience Backend developer
• 5 years experience Drupal developer
• Maintainer of commerce interkassa
• Maintainer of Payment platon
• Maintainer of commerce probokassa
• Maintainer of Payment offsite API
Payment types.
• Payment emulation
• On site
• Off site
Drupal payment contrib.
Drupal 7
• Drupal commerce 1.x
• Payment
• Payment Gateway API
Drupal 8
• Drupal Commerce 2.x
• Payment
• Payment offsite API
W3C PAYMENT REQUEST API
SPECIFICATION
• Payment Request API
• Basic Card Payment
• Payment Method Identifiers
https://www.w3.org/TR/payment-request/
Payment
workflow
Real payment workflow
Real payment workflow
(Drupal developer think)
Checkout Payment system IPN call* Result page
Known contrib issues
• Partitional payment not supported
• Support only one payment instance per payment module
• Not fixed result pages
• Success URL: checkout/ORDER_ID/payment/return/ORDER_PAYMENT_REDIRECT_KEY
• Fail URL: checkout/ORDER_ID/payment/back/ORDER_PAYMENT_REDIRECT_KEY
• Payment transaction created only on success
• Send order ID to payment system
• Custom result urls used
Drupal commerce 2.x plan
- The payment gateway config entity + UI
- The payment gateway plugin type
- The payment type YAML plugin
- The credit_card payment type
- The payment method content entity (for storing tokenized payment
information), which uses the payment types as bundles
- The payment content entity, which uses payment types as bundles
A payment would have a workflow:
New -> Pending -> Complete -> Cancelled | (Partially) Refunded.
https://www.drupal.org/node/2711013
Payment method configuration
Payment method configuration
Payment module
•Config, Schema and Plugin
•Implement PaymentMethodConfigurationBase
• processBuildConfigurationForm() including tabs
magic
• defaultConfiguration()
• buildConfigurationForm()
• validateConfigurationForm()
• submitConfigurationForm()
• Status Selector (5 methods)
Payment Offsite API module
•Config, Schema, Plugin
•Implement PaymentMethodConfigurationBaseOffsite
• processBuildConfigurationForm()
• validateConfigurationForm()
• submitConfigurationForm()
• defaultConfiguration()
Payment form
Payment form
Payment module requirements
•Implement Routing
•Implement Redirect form controller (with
cleanup)
•Implement Access controller
•Implement signature generator
•Implement is configured checker
•Auto submit library
• Implement Operation provider (configuration
loader) getPaymentMethodConfiguration()
• Implement payment method deriver
getDerivativeDefinitions()
Payment Offsite API module
PaymentMethod plugin
•Extend PaymentMethodBaseOffsite or
PaymentMethodOffsiteSimple
•Implement
• paymentForm()
• isConfigured()
• getSignature() (simple)
•Use $this->addPaymentFormData()
•Use $this->generateForm()
•Configure auto submit via UI
Payment result pages
Payment
system
IPN
callback
Call Result
pages callback
Success page
Pending page
Fail page
Hidden fallback call
(optional)
Payment result pages
Payment module requirements
•Implement
• Routing
• Result pages controller
• Access controller
•Fallback support (optional)
Payment Offsite API module
PaymentMethod plugin
•Implement
• getResultPages()
• get<Result>Content()
• getSignature() (simple)
•Fallback call supports per result
page using getResultPages()
Payment IPN callback
Payment
system
IPN callback
Call IPN
Access check
Call IPN
Validate
Call IPN
Execute
Set order
internal status
according to
status mapping
Payment method plugin + configuration
Payment IPN callback
Payment module require
Implement
•Routing
•IPN controller
•IPN validator
•Access controller
Payment Offsite API module
Implement in PaymentMethod plugin
•ipnExecute()
•ipnValidate()
Also you could extend PaymentMethodOffsiteSimple and use
•validateEmpty()
•validateRequiredKeys()
•validateMerchant()
•validateSignature()
•validateTransactionId()
•validateAmount()
You must implement if going to use default validators:
•getMerchantIdName()
•getTransactionIdName()
•getAmountName()
•getSignatureName()
•getRequiredKeys()
Payment offsite API Interface
interface PaymentMethodOffsiteInterface {
public function ipnExecute();
public function ipnValidate();
public function getResultPages();
public function paymentForm();
public function isConfigured();
}
Payment offsite API
Simple Interface
interface PaymentMethodOffsiteSimpleInterface extends PaymentMethodOffsiteInterface {
const SIGN_IN = 'IN';
const SIGN_OUT = 'OUT';
public function getSignature($signature_type = self::SIGN_IN);
public function getMerchantIdName();
public function getTransactionIdName();
public function getAmountName();
public function getSignatureName();
public function getRequiredKeys();
}
Payment offsite API
• Fully compatible with Payment module
• Fallback mode support
• Multiple payment instances support
• Simplify payment method creation
• IPN and result pages callbacks
• Payment form
@Todo provide integration to commerce_payment
@see https://www.drupal.org/sandbox/niko/2685859
Thank you
Oleg Natalushko
Site: http://bighameleon.com
Skype: onatalushko
Phone: +380674176171
Drupal.org: https://www.drupal.org/u/niko

Weitere ähnliche Inhalte

Andere mochten auch

Julgamento de eichmann autoria mediata e tribunal de exceção uma anålise jurí...
Julgamento de eichmann autoria mediata e tribunal de exceção uma anålise jurí...Julgamento de eichmann autoria mediata e tribunal de exceção uma anålise jurí...
Julgamento de eichmann autoria mediata e tribunal de exceção uma anålise jurí...Milena Quaresma
 
Formularios en Drupal 8
Formularios en Drupal 8Formularios en Drupal 8
Formularios en Drupal 8Atenea tech
 
Entidades en drupal 8
Entidades en drupal 8Entidades en drupal 8
Entidades en drupal 8Atenea tech
 
Open Source CMS TYPO3 at Cisco WebEx
Open Source CMS TYPO3 at Cisco WebExOpen Source CMS TYPO3 at Cisco WebEx
Open Source CMS TYPO3 at Cisco WebExAOE
 
9 - GMRC-DREWBERRY - WB_WR_Management_meeting-Sep-16
9 - GMRC-DREWBERRY - WB_WR_Management_meeting-Sep-169 - GMRC-DREWBERRY - WB_WR_Management_meeting-Sep-16
9 - GMRC-DREWBERRY - WB_WR_Management_meeting-Sep-16indiawrm
 
Open Source CMS TYPO3 at Cisco WebEx
Open Source CMS TYPO3 at Cisco WebExOpen Source CMS TYPO3 at Cisco WebEx
Open Source CMS TYPO3 at Cisco WebExAOE
 
Virgin Media Case Study - WebEx
Virgin Media Case Study - WebEx Virgin Media Case Study - WebEx
Virgin Media Case Study - WebEx Sei Mani
 
Cisco connect jabber client update
Cisco connect   jabber client updateCisco connect   jabber client update
Cisco connect jabber client updateVitor Costa
 
Tesco Case Study - WebEx
Tesco Case Study - WebEx Tesco Case Study - WebEx
Tesco Case Study - WebEx Sei Mani
 
Virtual Meeting Options - Adobe Connect Vs. Cisco WebEx - Final 1
Virtual Meeting Options - Adobe Connect Vs. Cisco WebEx - Final 1Virtual Meeting Options - Adobe Connect Vs. Cisco WebEx - Final 1
Virtual Meeting Options - Adobe Connect Vs. Cisco WebEx - Final 1Clayton Boessen
 
Gotomeeting vs Webex: Comprehensive Analysis
Gotomeeting vs Webex: Comprehensive AnalysisGotomeeting vs Webex: Comprehensive Analysis
Gotomeeting vs Webex: Comprehensive Analysisgeorgesmith_omr
 
Social Media Assessment Case Study Citrix Webex
Social Media Assessment Case Study Citrix WebexSocial Media Assessment Case Study Citrix Webex
Social Media Assessment Case Study Citrix WebexSociety3
 
Lesson 3 Sentence Expansion
Lesson 3   Sentence ExpansionLesson 3   Sentence Expansion
Lesson 3 Sentence Expansionbsimoneaux
 
Drupal 8 & Commerce 2.x insights
Drupal 8 & Commerce 2.x insightsDrupal 8 & Commerce 2.x insights
Drupal 8 & Commerce 2.x insightsNayan Velde
 
Troubleshooting Urouter Problems: WebEx Presentation
Troubleshooting Urouter Problems: WebEx PresentationTroubleshooting Urouter Problems: WebEx Presentation
Troubleshooting Urouter Problems: WebEx PresentationUniface
 
Cisco Webex Distributed Framework and Data Store Design
Cisco Webex Distributed Framework and Data Store DesignCisco Webex Distributed Framework and Data Store Design
Cisco Webex Distributed Framework and Data Store DesignPhilip Zhong
 

Andere mochten auch (20)

Julgamento de eichmann autoria mediata e tribunal de exceção uma anålise jurí...
Julgamento de eichmann autoria mediata e tribunal de exceção uma anålise jurí...Julgamento de eichmann autoria mediata e tribunal de exceção uma anålise jurí...
Julgamento de eichmann autoria mediata e tribunal de exceção uma anålise jurí...
 
Custom entities in d8
Custom entities in d8Custom entities in d8
Custom entities in d8
 
Formularios en Drupal 8
Formularios en Drupal 8Formularios en Drupal 8
Formularios en Drupal 8
 
Entidades en drupal 8
Entidades en drupal 8Entidades en drupal 8
Entidades en drupal 8
 
Open Source CMS TYPO3 at Cisco WebEx
Open Source CMS TYPO3 at Cisco WebExOpen Source CMS TYPO3 at Cisco WebEx
Open Source CMS TYPO3 at Cisco WebEx
 
9 - GMRC-DREWBERRY - WB_WR_Management_meeting-Sep-16
9 - GMRC-DREWBERRY - WB_WR_Management_meeting-Sep-169 - GMRC-DREWBERRY - WB_WR_Management_meeting-Sep-16
9 - GMRC-DREWBERRY - WB_WR_Management_meeting-Sep-16
 
Open Source CMS TYPO3 at Cisco WebEx
Open Source CMS TYPO3 at Cisco WebExOpen Source CMS TYPO3 at Cisco WebEx
Open Source CMS TYPO3 at Cisco WebEx
 
Virgin Media Case Study - WebEx
Virgin Media Case Study - WebEx Virgin Media Case Study - WebEx
Virgin Media Case Study - WebEx
 
Cisco connect jabber client update
Cisco connect   jabber client updateCisco connect   jabber client update
Cisco connect jabber client update
 
Cisco WebEx vulnerability: it’s a kind of magic
Cisco WebEx vulnerability: it’s a kind of magicCisco WebEx vulnerability: it’s a kind of magic
Cisco WebEx vulnerability: it’s a kind of magic
 
Tesco Case Study - WebEx
Tesco Case Study - WebEx Tesco Case Study - WebEx
Tesco Case Study - WebEx
 
Virtual Meeting Options - Adobe Connect Vs. Cisco WebEx - Final 1
Virtual Meeting Options - Adobe Connect Vs. Cisco WebEx - Final 1Virtual Meeting Options - Adobe Connect Vs. Cisco WebEx - Final 1
Virtual Meeting Options - Adobe Connect Vs. Cisco WebEx - Final 1
 
Gotomeeting vs Webex: Comprehensive Analysis
Gotomeeting vs Webex: Comprehensive AnalysisGotomeeting vs Webex: Comprehensive Analysis
Gotomeeting vs Webex: Comprehensive Analysis
 
Social Media Assessment Case Study Citrix Webex
Social Media Assessment Case Study Citrix WebexSocial Media Assessment Case Study Citrix Webex
Social Media Assessment Case Study Citrix Webex
 
Zoom.us Vs WebEx Vs GotoMeeting
Zoom.us Vs WebEx Vs GotoMeetingZoom.us Vs WebEx Vs GotoMeeting
Zoom.us Vs WebEx Vs GotoMeeting
 
Lesson 3 Sentence Expansion
Lesson 3   Sentence ExpansionLesson 3   Sentence Expansion
Lesson 3 Sentence Expansion
 
Drupal 8 & Commerce 2.x insights
Drupal 8 & Commerce 2.x insightsDrupal 8 & Commerce 2.x insights
Drupal 8 & Commerce 2.x insights
 
Troubleshooting Urouter Problems: WebEx Presentation
Troubleshooting Urouter Problems: WebEx PresentationTroubleshooting Urouter Problems: WebEx Presentation
Troubleshooting Urouter Problems: WebEx Presentation
 
Cisco Webex Distributed Framework and Data Store Design
Cisco Webex Distributed Framework and Data Store DesignCisco Webex Distributed Framework and Data Store Design
Cisco Webex Distributed Framework and Data Store Design
 
Expansion strategies
Expansion strategiesExpansion strategies
Expansion strategies
 

Ähnlich wie Anatomy of payment systems in Drupal 8

How to implement payment gateway integration for non-credit card on Magento2
How to implement payment gateway integration for non-credit card on Magento2How to implement payment gateway integration for non-credit card on Magento2
How to implement payment gateway integration for non-credit card on Magento2Hirokazu Nishi
 
Magento Payment & Vault framework
Magento Payment & Vault frameworkMagento Payment & Vault framework
Magento Payment & Vault frameworkYevhen Sentiabov
 
Spring batch
Spring batchSpring batch
Spring batchWayan Wira
 
Dancing with websocket
Dancing with websocketDancing with websocket
Dancing with websocketDamien Krotkine
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Mark Proctor
 
Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013
Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013
Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013Deepak Nadig
 
Payments using Stripe.com
Payments using Stripe.comPayments using Stripe.com
Payments using Stripe.comBilly Cravens
 
Client-side Auth with Ember.js
Client-side Auth with Ember.jsClient-side Auth with Ember.js
Client-side Auth with Ember.jsMatthew Beale
 
Single Page Apps with Drupal 8
Single Page Apps with Drupal 8Single Page Apps with Drupal 8
Single Page Apps with Drupal 8Chris Tankersley
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersNCCOMMS
 
ASP.NET MVC 2.0
ASP.NET MVC 2.0ASP.NET MVC 2.0
ASP.NET MVC 2.0Buu Nguyen
 
Harness SharePoint and jQuery to Make Dynamic Displays and Applications
 Harness SharePoint and jQuery to Make Dynamic Displays and Applications Harness SharePoint and jQuery to Make Dynamic Displays and Applications
Harness SharePoint and jQuery to Make Dynamic Displays and ApplicationsInnoTech
 
Asp.net mvc 6 with sql server 2014
Asp.net mvc 6 with sql server 2014Asp.net mvc 6 with sql server 2014
Asp.net mvc 6 with sql server 2014Fahim Faysal Kabir
 
Play Framework workshop: full stack java web app
Play Framework workshop: full stack java web appPlay Framework workshop: full stack java web app
Play Framework workshop: full stack java web appAndrew Skiba
 
Process Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring BootProcess Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring BootChavdar Baikov
 
IBM Licensing: Technical fundamentals for discovery
IBM Licensing: Technical fundamentals for discoveryIBM Licensing: Technical fundamentals for discovery
IBM Licensing: Technical fundamentals for discoveryMartin Thompson
 
Automating your php infrastructure with the zend server api
Automating your php infrastructure with the zend server apiAutomating your php infrastructure with the zend server api
Automating your php infrastructure with the zend server apiYonni Mendes
 

Ähnlich wie Anatomy of payment systems in Drupal 8 (20)

Show me the money
Show me the moneyShow me the money
Show me the money
 
How to implement payment gateway integration for non-credit card on Magento2
How to implement payment gateway integration for non-credit card on Magento2How to implement payment gateway integration for non-credit card on Magento2
How to implement payment gateway integration for non-credit card on Magento2
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
 
March 2015: Plugins Worth Paying For
March 2015: Plugins Worth Paying ForMarch 2015: Plugins Worth Paying For
March 2015: Plugins Worth Paying For
 
Magento Payment & Vault framework
Magento Payment & Vault frameworkMagento Payment & Vault framework
Magento Payment & Vault framework
 
Spring batch
Spring batchSpring batch
Spring batch
 
Dancing with websocket
Dancing with websocketDancing with websocket
Dancing with websocket
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)
 
Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013
Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013
Redesigning PayPal APIs for Scale and Simplicity - QCon San Francisco 2013
 
Payments using Stripe.com
Payments using Stripe.comPayments using Stripe.com
Payments using Stripe.com
 
Client-side Auth with Ember.js
Client-side Auth with Ember.jsClient-side Auth with Ember.js
Client-side Auth with Ember.js
 
Single Page Apps with Drupal 8
Single Page Apps with Drupal 8Single Page Apps with Drupal 8
Single Page Apps with Drupal 8
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event Handlers
 
ASP.NET MVC 2.0
ASP.NET MVC 2.0ASP.NET MVC 2.0
ASP.NET MVC 2.0
 
Harness SharePoint and jQuery to Make Dynamic Displays and Applications
 Harness SharePoint and jQuery to Make Dynamic Displays and Applications Harness SharePoint and jQuery to Make Dynamic Displays and Applications
Harness SharePoint and jQuery to Make Dynamic Displays and Applications
 
Asp.net mvc 6 with sql server 2014
Asp.net mvc 6 with sql server 2014Asp.net mvc 6 with sql server 2014
Asp.net mvc 6 with sql server 2014
 
Play Framework workshop: full stack java web app
Play Framework workshop: full stack java web appPlay Framework workshop: full stack java web app
Play Framework workshop: full stack java web app
 
Process Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring BootProcess Orchestration with Flowable and Spring Boot
Process Orchestration with Flowable and Spring Boot
 
IBM Licensing: Technical fundamentals for discovery
IBM Licensing: Technical fundamentals for discoveryIBM Licensing: Technical fundamentals for discovery
IBM Licensing: Technical fundamentals for discovery
 
Automating your php infrastructure with the zend server api
Automating your php infrastructure with the zend server apiAutomating your php infrastructure with the zend server api
Automating your php infrastructure with the zend server api
 

KĂźrzlich hochgeladen

All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
horny (9316020077 ) Goa Call Girls Service by VIP Call Girls in Goa
horny (9316020077 ) Goa  Call Girls Service by VIP Call Girls in Goahorny (9316020077 ) Goa  Call Girls Service by VIP Call Girls in Goa
horny (9316020077 ) Goa Call Girls Service by VIP Call Girls in Goasexy call girls service in goa
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 

KĂźrzlich hochgeladen (20)

All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
horny (9316020077 ) Goa Call Girls Service by VIP Call Girls in Goa
horny (9316020077 ) Goa  Call Girls Service by VIP Call Girls in Goahorny (9316020077 ) Goa  Call Girls Service by VIP Call Girls in Goa
horny (9316020077 ) Goa Call Girls Service by VIP Call Girls in Goa
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Noida 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Noida 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In Noida 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Noida 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 

Anatomy of payment systems in Drupal 8

  • 1. Anatomy of payment systems in Drupal 8 Oleg Natalushko http://drupal.org/u/niko
  • 2. Plan • Current status of payments in Drupal 8. • Common developers mistakes. • Drupal commerce 2.x payment • Payment • Payment offsite API
  • 3. About me • More than 100 implemented drupal projects. • 15 years experience Backend developer • 5 years experience Drupal developer • Maintainer of commerce interkassa • Maintainer of Payment platon • Maintainer of commerce probokassa • Maintainer of Payment offsite API
  • 4. Payment types. • Payment emulation • On site • Off site
  • 5. Drupal payment contrib. Drupal 7 • Drupal commerce 1.x • Payment • Payment Gateway API Drupal 8 • Drupal Commerce 2.x • Payment • Payment offsite API
  • 6. W3C PAYMENT REQUEST API SPECIFICATION • Payment Request API • Basic Card Payment • Payment Method Identifiers https://www.w3.org/TR/payment-request/
  • 9. Real payment workflow (Drupal developer think) Checkout Payment system IPN call* Result page
  • 10. Known contrib issues • Partitional payment not supported • Support only one payment instance per payment module • Not fixed result pages • Success URL: checkout/ORDER_ID/payment/return/ORDER_PAYMENT_REDIRECT_KEY • Fail URL: checkout/ORDER_ID/payment/back/ORDER_PAYMENT_REDIRECT_KEY • Payment transaction created only on success • Send order ID to payment system • Custom result urls used
  • 11. Drupal commerce 2.x plan - The payment gateway config entity + UI - The payment gateway plugin type - The payment type YAML plugin - The credit_card payment type - The payment method content entity (for storing tokenized payment information), which uses the payment types as bundles - The payment content entity, which uses payment types as bundles A payment would have a workflow: New -> Pending -> Complete -> Cancelled | (Partially) Refunded. https://www.drupal.org/node/2711013
  • 13. Payment method configuration Payment module •Config, Schema and Plugin •Implement PaymentMethodConfigurationBase • processBuildConfigurationForm() including tabs magic • defaultConfiguration() • buildConfigurationForm() • validateConfigurationForm() • submitConfigurationForm() • Status Selector (5 methods) Payment Offsite API module •Config, Schema, Plugin •Implement PaymentMethodConfigurationBaseOffsite • processBuildConfigurationForm() • validateConfigurationForm() • submitConfigurationForm() • defaultConfiguration()
  • 15. Payment form Payment module requirements •Implement Routing •Implement Redirect form controller (with cleanup) •Implement Access controller •Implement signature generator •Implement is configured checker •Auto submit library • Implement Operation provider (configuration loader) getPaymentMethodConfiguration() • Implement payment method deriver getDerivativeDefinitions() Payment Offsite API module PaymentMethod plugin •Extend PaymentMethodBaseOffsite or PaymentMethodOffsiteSimple •Implement • paymentForm() • isConfigured() • getSignature() (simple) •Use $this->addPaymentFormData() •Use $this->generateForm() •Configure auto submit via UI
  • 16. Payment result pages Payment system IPN callback Call Result pages callback Success page Pending page Fail page Hidden fallback call (optional)
  • 17. Payment result pages Payment module requirements •Implement • Routing • Result pages controller • Access controller •Fallback support (optional) Payment Offsite API module PaymentMethod plugin •Implement • getResultPages() • get<Result>Content() • getSignature() (simple) •Fallback call supports per result page using getResultPages()
  • 18. Payment IPN callback Payment system IPN callback Call IPN Access check Call IPN Validate Call IPN Execute Set order internal status according to status mapping Payment method plugin + configuration
  • 19. Payment IPN callback Payment module require Implement •Routing •IPN controller •IPN validator •Access controller Payment Offsite API module Implement in PaymentMethod plugin •ipnExecute() •ipnValidate() Also you could extend PaymentMethodOffsiteSimple and use •validateEmpty() •validateRequiredKeys() •validateMerchant() •validateSignature() •validateTransactionId() •validateAmount() You must implement if going to use default validators: •getMerchantIdName() •getTransactionIdName() •getAmountName() •getSignatureName() •getRequiredKeys()
  • 20. Payment offsite API Interface interface PaymentMethodOffsiteInterface { public function ipnExecute(); public function ipnValidate(); public function getResultPages(); public function paymentForm(); public function isConfigured(); }
  • 21. Payment offsite API Simple Interface interface PaymentMethodOffsiteSimpleInterface extends PaymentMethodOffsiteInterface { const SIGN_IN = 'IN'; const SIGN_OUT = 'OUT'; public function getSignature($signature_type = self::SIGN_IN); public function getMerchantIdName(); public function getTransactionIdName(); public function getAmountName(); public function getSignatureName(); public function getRequiredKeys(); }
  • 22. Payment offsite API • Fully compatible with Payment module • Fallback mode support • Multiple payment instances support • Simplify payment method creation • IPN and result pages callbacks • Payment form @Todo provide integration to commerce_payment @see https://www.drupal.org/sandbox/niko/2685859
  • 23. Thank you Oleg Natalushko Site: http://bighameleon.com Skype: onatalushko Phone: +380674176171 Drupal.org: https://www.drupal.org/u/niko

Hinweis der Redaktion

  1. Checkout/payment screenshot to explain what is payment type plugin
  2. All 3 routines are processed with method plugin configured with config from configuration plugin