Top Banner
WordPress, WooCommerce & IoT Alberto López Braintree_Dev. <Advocate/> https://flic.kr/p/6kFQBc
62
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: WordPress, WooCommerce e IoT

WordPress, WooCommerce & IoT

Alberto López Braintree_Dev.

<Advocate/>

https://flic.kr/p/6kFQBc

Page 2: WordPress, WooCommerce e IoT

hola@albertuslm

[email protected]

[email protected]

Page 3: WordPress, WooCommerce e IoT

we <3 hackers

@AlbertusLM@Braintree_Dev

Page 4: WordPress, WooCommerce e IoT

we <3 hacking

@AlbertusLM@Braintree_Dev

Page 5: WordPress, WooCommerce e IoT

we <3 innovation

@AlbertusLM@Braintree_Dev

Page 6: WordPress, WooCommerce e IoT

we <3

@AlbertusLM@Braintree_Dev

Page 7: WordPress, WooCommerce e IoT

My story…

@AlbertusLM@Braintree_Dev

Page 8: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

Page 9: WordPress, WooCommerce e IoT

Era of rapid prototyping

@AlbertusLM@Braintree_Dev

Page 10: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

Page 11: WordPress, WooCommerce e IoT

Internet of Things everything@AlbertusLM@Braintree_Dev

Page 12: WordPress, WooCommerce e IoT

The Hype Cicle_

@AlbertusLM@Braintree_Dev

Page 13: WordPress, WooCommerce e IoT

4.9 Billion Connected "Things" by 2015

http://www.gartner.com/newsroom/id/2905717

Gartner Symposium/ITxpo 2014, November 9-13 in Barcelona, Spain

@AlbertusLM@Braintree_Dev

Page 14: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

Page 15: WordPress, WooCommerce e IoT
Page 16: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

Get started on IoT

Page 17: WordPress, WooCommerce e IoT

Raspberry Pi

@AlbertusLM@Braintree_Dev

Page 18: WordPress, WooCommerce e IoT

Arduino Yún

@AlbertusLM@Braintree_Dev

Page 19: WordPress, WooCommerce e IoT

Intel Galileo

@AlbertusLM@Braintree_Dev

Page 20: WordPress, WooCommerce e IoT

Spark Core

@AlbertusLM@Braintree_Dev

Page 21: WordPress, WooCommerce e IoT

Everybody <3 chocolate

@AlbertusLM@Braintree_Dev

Page 22: WordPress, WooCommerce e IoT

Candy Machine!

@AlbertusLM@Braintree_Dev

Page 23: WordPress, WooCommerce e IoT

The project´s stack

@AlbertusLM@Braintree_Dev

Braintree v.zero SDK

<backend><frontend>

v1.0

Page 24: WordPress, WooCommerce e IoT

The pursuit of Empire

@AlbertusLM@Braintree_Dev

Candies for everybody!

Page 25: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

Page 26: WordPress, WooCommerce e IoT

Challenges

> Scalability

> Oprational management

> Sustainable Growth

> Stakeholders

@AlbertusLM@Braintree_Dev

Page 27: WordPress, WooCommerce e IoT

Candy Machine 2.0!

@AlbertusLM@Braintree_Dev

Page 28: WordPress, WooCommerce e IoT

> Case Study_

@AlbertusLM@Braintree_Dev

Page 29: WordPress, WooCommerce e IoT

The project´s stack

@AlbertusLM@Braintree_Dev

Braintree v.zero SDK

v2.0

Page 30: WordPress, WooCommerce e IoT

Why WordPress?

@AlbertusLM@Braintree_Dev

> Open Source

> Scalable

> Easy to manage

> Thriving ecosystem

> Mobile friendly

*critical features for the project

4.1.1

Page 31: WordPress, WooCommerce e IoT

Why WooCommerce?

@AlbertusLM@Braintree_Dev

> Free core

> Huge flexibility

> WooThemes’ support

> Professional Yet Simple

> Room For Growth

> # of plugins

*critical features for the project

2.3.7

Page 32: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

16/04/2015

goo.gl/IYy1ls

Page 33: WordPress, WooCommerce e IoT

Why Braintree v.zero SDK?

OFF

ON

ON

ON

ON

OFF

ON

ON

ON

ON

FUTURE Payment Method

C&D Cards

v.zero

@AlbertusLM@Braintree_Dev

*critical features for the project

Page 34: WordPress, WooCommerce e IoT

Why Braintree v.zero SDK?

<frontend/>

<backend/>v.zero

@AlbertusLM@Braintree_Dev

*critical features for the project

Page 35: WordPress, WooCommerce e IoT

Why Braintree v.zero SDK?

v.zero

@AlbertusLM@Braintree_Dev

*critical features for the project

> Mobile ready

> PCI compliance made easy

> Ultra Slim

> Elegant

> Invisible

Page 36: WordPress, WooCommerce e IoT

Why Spark core?

> Open Source

> Wifi ready

> Tiny size

> Multi-language

> Active community

> # of plugins

@AlbertusLM@Braintree_Dev

Page 37: WordPress, WooCommerce e IoT

Problems

> v.zero plugin not available

> not plugin Spark - WooCommerce

@AlbertusLM@Braintree_Dev

Page 38: WordPress, WooCommerce e IoT

LET’S CODE OUR MODULE

CHALLENGE ACCEPTED

Page 39: WordPress, WooCommerce e IoT

Things to consider

@AlbertusLM@Braintree_Dev

> Custom payment module from scratch

> Using WooCommerce Checkout Manager

> Prototype version

-Plugin in alpha phase

• Core files modified

• Core templates modified

-Payment module in beta phase

• Transaction ID saved

• Fully functional

Page 40: WordPress, WooCommerce e IoT

Issue

@AlbertusLM@Braintree_Dev

This button submits the whole form

Page 41: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

This drop-in payment UI form is totally created and managed by

v.zero SDK

This form is never submitted to Braintree, so we don’t have the payment nonce to finish the transaction

Impact on v.zero SDK

Page 42: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

client server BT Server

I need I client token to create the Drop-In

1. Creating the Drop-in UI form…

Please, the client Token

v.zero SDK checkout flow

Page 43: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

client server BT Server

Client Token

1. Creating the Drop-in UI form…

Client Token

v.zero SDK checkout flow

Page 44: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

client server BT Server

Create Drop In Payment form UI here

1. Creating the Drop-in UI form…

v.zero SDK checkout flow

Page 45: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

client server BT Server

User clicks on pay button, give me the payment nonce

2. Submitting form with payment information

PAY

NONCE: adas-123f-3sdq45-f34

v.zero SDK checkout flow

Page 46: WordPress, WooCommerce e IoT

@AlbertusLM@Braintree_Dev

client server BT ServerNONCE from Braintree

& rest of information

3. Finishing transaction

nonce to finish transaction

transaction ID

transaction ID

v.zero SDK checkout flow

Page 47: WordPress, WooCommerce e IoT

Solution

@AlbertusLM@Braintree_Dev

This checkbox (1) triggers a function which submits the UI form (2), stores the payment

method nonce value in a hidden field (3) and enables the general

submit button (4) (1)

(4)

(2)

(3)

Page 48: WordPress, WooCommerce e IoT

The code of the solution…

@AlbertusLM@Braintree_Dev

(1)

(2)

(1) Creating Drop UI form (2) Trigger checkbox

Page 49: WordPress, WooCommerce e IoT

The code of the solution…

@AlbertusLM@Braintree_Dev

(3)

(4)

(3) Callback function to get the nonce (4) storing the nonce within hidden

field

Page 50: WordPress, WooCommerce e IoT

Finishing the payment…

@AlbertusLM@Braintree_Dev

(1)

(2 & 3)

(4)

(1) finishing the payment using the payment method nonce

(2) completing the order (3) saving the transactionID in our

DB (4) storing the transaction id value to

show it on our “thank you page”

Page 51: WordPress, WooCommerce e IoT

Connecting to Spark Core

@AlbertusLM@Braintree_Dev

(1) configuring the access to the device

(2) calling the functions

(1)

(2)

Page 52: WordPress, WooCommerce e IoT

demBETA

@AlbertusLM@Braintree_Dev

Page 53: WordPress, WooCommerce e IoT

Plan B

@AlbertusLM@Braintree_Dev

youtu.be/7jYdduBUfVs

Page 54: WordPress, WooCommerce e IoT

> Conclusion_

@AlbertusLM@Braintree_Dev

Page 55: WordPress, WooCommerce e IoT

internet of things tendencia

Year of Internet of Things

Page 56: WordPress, WooCommerce e IoT

IoT is NOT flash in the pan

flic.kr/p/8RU8QS

Page 57: WordPress, WooCommerce e IoT

WordPress &

WooCommerce IoT

Why not?

Page 58: WordPress, WooCommerce e IoT

+ =

Page 59: WordPress, WooCommerce e IoT

+=

+

Why not?

Page 60: WordPress, WooCommerce e IoT

> Questions?_

@AlbertusLM@Braintree_Dev

Page 61: WordPress, WooCommerce e IoT

Source'photo

Page 62: WordPress, WooCommerce e IoT

Alberto López [email protected]

@AlbertusLM / @Braintree_Dev