Joomla Common Payments API - Joomla World Conference 2012

Post on 28-Jan-2015

114 Views

Category:

Technology

5 Downloads

Preview:

Click to see full reader

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

Techjoomla Presents

Common Payments API

V1.1 Joomla Day India 2013V1.0 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

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

Tekdi Web Solutions @tekdinet

tekdi.net

IOS Apps

CRM

Magento

E Learning Ecommerce

Joomla

Custom Apps

Android

CMS

HTML5

Social Networks

Lets Get Started !

Pay by Check

LinkPoint

Pay By Purchase Order

PayPal Pro

Authorize.net PayPal

HDFC

2Checkout

JomSocialPointsPayUalphauserpoints

CCAvenue

PaseGuro

Lets Innovate. Not Duplicate

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.

100s & 1000s of Gateways in the world

Do you want to integrate them all yourself ?

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

err.. did i mention boring ?

And thats just the tip of the IceBerg

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

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

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

Super Quick To Integrate !Super Quick To Integrate !

Steps to Payments !

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

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..

Example Code

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

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

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

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

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

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

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

Next Steps ?

JPaymentlibraries

2. Merging the plugins into the Joomla Platform

1. Increasing adoption & developing more plugins

What else do we have to share ?

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

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

Thank You !

● Have an idea which we can work together on ?

● Want to Improve on this ?● Anything else ?

● Drop us an email ! contact@techjoomla.com ● Twitter @techjoomla | @parthlawate

top related