Joomla Common Payments API - Joomla World Conference 2012
-
Upload
parth-lawate -
Category
Technology
-
view
114 -
download
5
description
Transcript of Joomla Common Payments API - Joomla World Conference 2012
![Page 1: Joomla Common Payments API - Joomla World Conference 2012](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/1.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/2.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/3.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/4.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/5.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/6.jpg)
Lets Innovate. Not Duplicate
![Page 7: Joomla Common Payments API - Joomla World Conference 2012](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/7.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/8.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/9.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/10.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/11.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/12.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/13.jpg)
Super Quick To Integrate !Super Quick To Integrate !
![Page 14: Joomla Common Payments API - Joomla World Conference 2012](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/14.jpg)
Steps to Payments !
![Page 15: Joomla Common Payments API - Joomla World Conference 2012](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/15.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/16.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/17.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/18.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/19.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/20.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/21.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/22.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/23.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/24.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/25.jpg)
What else do we have to share ?
![Page 26: Joomla Common Payments API - Joomla World Conference 2012](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/26.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/27.jpg)
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](https://reader030.fdocuments.us/reader030/viewer/2022020105/54c850ca4a7959af638b45f0/html5/thumbnails/28.jpg)
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