joomla common payments api - joomla world conference 2012

28
Techjoomla Presents Common Payments API V1.1 Joomla Day India 2013 V1.0 Joomla World Conference 2012

Upload: parth-lawate

Post on 28-Jan-2015

115 views

Category:

Technology


5 download

DESCRIPTION

Every other project executed in Joomla needs some kind of Payment integration. Techjoomla's Common Joomla Payments API evolved due to the need to reduce development time on Payment systems & also to reduce the code base & thus bugs. This API & common payment plugins are being used regularly by our services company Tekdi in several Joomla service projects. Techjoomla's own products SocialAds, JTicketing, Quick2Cart have been using this API for the past 3 months. Soon, JomGive will also be ported to this. The use of this API which currently provides support for 10+ Payment plugins ( We are adding to this every month) , standard payment processes including recurring billing where supported can greatly reduce your development & testing time. Our Lightening talk today will take you through a Quick look at its features & a short walk through of how you can implement this in your own Products. Gateways Supported Paypal , Paypal Pro, Authorize.net, 2Checkout,LinkPoint, PayU, CCAvenue, JomSocial Points ,Alpha User Points. Pay by PO,Pay By Check, HDFC More more Coming Soon ...

TRANSCRIPT

Page 1: Joomla Common Payments API - Joomla World Conference 2012

Techjoomla Presents

Common Payments API

V1.1 Joomla Day India 2013V1.0 Joomla World Conference 2012

Page 2: Joomla Common Payments API - Joomla World Conference 2012

Parth LawateCEO, Techjoomla,Director, Tekdi Web Solutions@parthlawate, @techjoomla

www.techjoomla.com

Cook

Bookworm Gardener

JUG Pune

Joomla Freak

Trekking

Entrepreneur

Joomla Day India

Open Source

Software Architecht

Marketing

Content Strategy

Hiking

Page 3: Joomla Common Payments API - Joomla World Conference 2012

Techjoomla. For All things Joomla @techjoomla

techjoomla.com

jGive

People Suggest

jomLikeJTicketing

J!Bolo

Broadcast

Invitex

Email Beautifier

SocialAds

J!MailAlerts

REST APIPayments API

Social API

Quick2Cart

Page 4: Joomla Common Payments API - Joomla World Conference 2012

Tekdi Web Solutions @tekdinet

tekdi.net

IOS Apps

CRM

Magento

E Learning Ecommerce

Joomla

Custom Apps

Android

CMS

HTML5

Social Networks

Page 5: Joomla Common Payments API - Joomla World Conference 2012

Lets Get Started !

Pay by Check

LinkPoint

Pay By Purchase Order

PayPal Pro

Authorize.net PayPal

HDFC

2Checkout

JomSocialPointsPayUalphauserpoints

CCAvenue

PaseGuro

Page 6: Joomla Common Payments API - Joomla World Conference 2012

Lets Innovate. Not Duplicate

Page 7: Joomla Common Payments API - Joomla World Conference 2012

Application Areas

Shops

Donations

Event Tickets

Advertising

Membership Systems

Subscriptions

Basic Payment forms

Extension Examples

● Virtuemart

● RedShop

● Hikashop

● Akeeba Subs

● PayPlans

● SocialAds

● JGive

● JTicketing

● Quick2Cart

Why a Common API ?

Lots & lots of Applications use online Payments.

Page 8: Joomla Common Payments API - Joomla World Conference 2012

100s & 1000s of Gateways in the world

Do you want to integrate them all yourself ?

Page 9: Joomla Common Payments API - Joomla World Conference 2012

Payment integration is- complex - needs extensive testing - is extremely time consuming

err.. did i mention boring ?

Page 10: Joomla Common Payments API - Joomla World Conference 2012

And thats just the tip of the IceBerg

if you have integrated a Gateway from scratch... you'll know what i mean here !

Page 11: Joomla Common Payments API - Joomla World Conference 2012

Advantages

● Code Reuse● Minimize testing● One Payment plugin

works everywhere● Scalable● Flexible

● Supports 10+ Gateways

● Easy API to add more● Just 3 steps to add

payments in your extensions

● Proven – 4 varied extensions using it

Page 12: Joomla Common Payments API - Joomla World Conference 2012

Supported Gateways

● Paypal● Paypal Pro● Authorize.net● 2Checkout● LinkPoint● PayU● CCAvenue

● JomSocial Points● Alpha User Points● Pay by PO● Pay By Check● HDFC● Amazon● Paseguro

Page 13: Joomla Common Payments API - Joomla World Conference 2012

Super Quick To Integrate !Super Quick To Integrate !

Page 14: Joomla Common Payments API - Joomla World Conference 2012

Steps to Payments !

Page 15: Joomla Common Payments API - Joomla World Conference 2012

I. Construct the Gateway list

II. Render Payment Form onsite/offsite

III. Add onProcess trigger in your notify URL

Here's How

1 2 3

Page 16: Joomla Common Payments API - Joomla World Conference 2012

1. List the Gateway Options

Trigger onTP_GetInfo($config)

It returns an array...

The $config lets you pass which plugins to show from your extension config

You can render it as a Drop Down list or Radio list as you like..

Page 17: Joomla Common Payments API - Joomla World Conference 2012

Example Code

$dispatcher=JDispatcher::getInstance();JPluginHelper::importPlugin('payment'); $gateways=$dispatcher->trigger('onTP_GetInfo',array((array)$this->gateways));$this->assignRef('gateways',$gateways);

Page 18: Joomla Common Payments API - Joomla World Conference 2012

2. Render the Form

You can render the form on a new page or via Ajax. Trigger onTP_GetHTML($vars) for loading the form.

$html=$dispatcher->trigger('onTP_GetHTML',array($vars));

return $html;

$vars are the various variables you need to pass to the gateway

This is purely representative. The form could be onsite for something like Auth.net while for paypal, it will be simply a Paypal Button

Page 19: Joomla Common Payments API - Joomla World Conference 2012

The VariablesThis is the data that has to be passed on the payment processor

$vars->order_id = Unique Order ID$vars->user_firstname = First Name$vars->user_id = User ID if available$vars->user_email – The user's email$vars->item_name – Item Name or title$vars->return – Return URL to get to after transaction$vars->cancel_return – URL t come to in case of cancellations$vars->notify_url – URL where the status should be returned$vars->currency_code – Currency code$vars->amount – Final amount

You can extend the variables to send as needed. This is just an example

Page 20: Joomla Common Payments API - Joomla World Conference 2012

3. Process

● In your Notify URL, trigger onTP_Processpayment

$data=$dispatcher->trigger('onTP_Processpayment',array($post));

● $data['status'] will have the translated status● Do your post processing based on standard

Statuses returned

Page 21: Joomla Common Payments API - Joomla World Conference 2012

SchematicPlugin functioningonTP_GetHTML($vars)

onTP_Processpayment ($_REQUEST[])

Paypal

Compose Request

CURL Request

GetResponse

TranslateResponse

This is the NotifyURL

Auth.net

Post Processing

Every extension tells the plugin passes the plugin its return url via the $vars

Page 22: Joomla Common Payments API - Joomla World Conference 2012

Where is it being used ?

In Products

● JTicketing – Event Tickets● jGive Donations● SocialAds – Joomla Advertising● Quick2Cart – Ecommerce

In Services

● Custom Exibition Booth booking app● Custom Member Signup payments

Page 23: Joomla Common Payments API - Joomla World Conference 2012

Get Started !

Get the CodeCurrently Paypal & Auth.net plugins are available on Github. The rest will be there very soon

https://github.com/techjoomla/joomla-payments

Page 24: Joomla Common Payments API - Joomla World Conference 2012

Next Steps ?

JPaymentlibraries

2. Merging the plugins into the Joomla Platform

1. Increasing adoption & developing more plugins

Page 25: Joomla Common Payments API - Joomla World Conference 2012

What else do we have to share ?

Page 26: Joomla Common Payments API - Joomla World Conference 2012

Techjoomla Social API plugins

Plugins available● LinkedIn● Gmail● Hotmail● Yahoo● Facebook● Orkut● Twitter

Used in● Invitex● Broadcast● Profile Import

Methods Currently Available● OAuth Authentication● Get Profile Data● GetStatus● Get Friends● Send Message

Page 27: Joomla Common Payments API - Joomla World Conference 2012

Techjoomla REST APIs

Methods Available ● Authentication● Create/Update/List/Delete ● Create/Update/List/Delete Jomsocial groups● Create content● List categories

Next Steps

Prepare POC for pull request for APIs in CMS

Page 28: Joomla Common Payments API - Joomla World Conference 2012

Thank You !

● Have an idea which we can work together on ?

● Want to Improve on this ?● Anything else ?

● Drop us an email ! [email protected] ● Twitter @techjoomla | @parthlawate