Saturday, January 12, 2013

php cybersource payment gateway integration

This PHP class can be used to process credit card payments via Cybersource.

It can send HTTP requests to Cybersource SOAP Web services API server to  perform several types
of operations to process credit card payments.

Currently it can request a payment authorization, capture the result of a  payment request and
request the reversal of a previous payment request.

This class would require php_soap and php_openssl extensions.

Code Example: Download Example

index.php
<?php
/**
 * Test script to show how the EPS_CYBERSOURCE class can be used.
 */
 
 require 'class.eps_cybersource.php';
 
/**
 * These should go in a config file somewhere on the box.
 */
 $trans_key = 'your SOAP transaction key';
 $merchant_id = 'your merchant id';
 $url = 'https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.53.wsdl';
 
/**
 * These are sent from some GUI and assembled into the applicable arrays.
 */
 $bill_array = array('firstName'=>'John','lastName'=>'Doe','street1'=>'1295 Charleston Road',
                     'city'=>'Mountain View','state'=>'CA','postalCode' => '94043','country'=>'US',
                     'email'=> 'null@cybersource.com','ipaddress'=>'10.7.111.111');
 $card_array = array('accountNumber'=>'4111111111111111','expirationMonth'=>'12',
                     'expirationYear'=>'2020','cvNumber'=>'123');
 $item_array = array(
 array('unitPrice'=>'.50','quantity'=>2,'productName'=>'product one'),
 array('unitPrice'=>'2.5','quantity'=>1,'productName'=>'product two'));
 $custom_array = array('one','two','three','four');
 
/**
 * Authorize a transaction.
 */
 try
 {
 $soap = new EPS_CYBERSOURCE($url, $merchant_id,$trans_key);
 $soap->setMerchantDefinedData($custom_array);
 $soap->setReferenceCode(array('CSTEST','YYYY','J','-','RNDM'));
 $soap->setCCRequest($bill_array,$card_array,$item_array);
 $soap->ccAuthorize();
 }
 catch (SoapFault $e)
 {
 exit($e->getMessage());
 }
 
 print_r($soap->reply);
 
/**
 * Capture the successful authorization.
 * A single ccCapture() could have been done instead of a ccAuthorize() followed by a ccCapture().
 */
 if ($soap->success) $soap->ccCapture();
 
/**
 * These return values would be stored locally.
 */
 $tok = $soap->reply->requestToken;
 $id = $soap->reply->requestID;
 $rc = $soap->reply->merchantReferenceCode;
 $amount = $soap->reply->amount;
 $currency = $soap->reply->currency;
 
 print_r($soap->reply);
 
 $trans_array = array('requestToken'=>$tok,
 'requestID'=>$id,
 'referenceCode'=>$rc,
 'amount'=>$amount,
 'currency'=>$currency);
 
/**
 * Reverse the capture or authorization.
 */
 if ($soap->success)
 {
 unset($soap);
 try
 {
 $soap = new EPS_CYBERSOURCE($url, $merchant_id,$trans_key);
 $soap->setCCReversalRequest($tok,$id,$rc,$amount);
 $soap->ccReverse('c');
 }
 catch (SoapFault $e)
 {
 exit($e->getMessage());
 }
 }
 
 print_r($soap->reply);   
 
/**
 * Credit the account.
 */
 if ($soap->success)
 {
 unset($soap);
 try
 {
 $soap = new EPS_CYBERSOURCE($url, $merchant_id,$trans_key);
 $soap->setCCCreditRequest($bill_array,$card_array);
 $soap->setReferenceCode(array('CR','YYYY','J','-',array('RNDM',5,5)));
 $soap->ccCredit('2.53');
 }
 catch (SoapFault $e)
 {
 exit($e->getMessage());
 }
 }
 
 print_r($soap->reply);   
 
/**
 * Get some help on the XML schema.
 */
 print_r($soap->getHelp());
 
 echo "current version: " . $soap->getHelpVersion() . "\n";
 
 print_r($soap->getHelp('item'));
 
 unset($soap);
 
?>

KissMetrics tracking integration with php

API Specifications

To be unobtrusive to your end-users, we’ll respond with a 200 OK status, even if some of these parameters are “incorrect”. The response will be a 1x1 GIF image (to power our ”Beacon API”).

Recording an Event

Method URL:
  • http://trk.kissmetrics.com/e
  • https://trk.kissmetrics.com/e
Parameters (GET)
ParametersFormatNecessary?Description
_kstringYesYour API key
_p255 char stringYesPerson doing the event
_nURL-encoded stringYesName of the event
_tintegeroptionalTimestamp in seconds after UTC Unix epoch
_d0 or 1optionalSet to 1 if you’re manually passing us the timestamp. It’s used when logging events that occurred in the past.
(Anything)URL-encoded stringoptionalSet an arbitrary value to an arbitrary user property
Example
http://trk.kissmetrics.com/e?_k=api-key&_p=bob&_n=Signed+Up&gender=male&_t=1262304000&_d=1
This records that the user bob did the event Signed Up and his gender was male and this all happened on midnight of January 1, 2010 UTC.
Please be aware of how our processing servers detect duplicate events.

Setting Properties

Method URL:
  • http://trk.kissmetrics.com/s
  • https://trk.kissmetrics.com/s
Parameters (GET)
ParametersFormatNecessary?Description
_kstringYesYour API key
_p255 char stringYesPerson doing the event
(Anything)URL-encoded stringoptionalSet an arbitrary value to an arbitrary user property
_tintegeroptionalTimestamp in seconds after UTC Unix epoch
_d0 or 1optionalSet to 1 if you’re manually passing us the timestamp. It’s used when logging events that occurred in the past.
Example
http://trk.kissmetrics.com/s?_k=api-key&_p=bob&gender=male&_t=1262304000&_d=1
This records that the user bob got the property gender with the value set to male and this happened on midnight of January 1, 2010 UTC.
Please be aware of how our processing servers detect duplicate properties.

Aliasing Users

Method URL:
  • http://trk.kissmetrics.com/a
  • https://trk.kissmetrics.com/a
Parameters (GET)
ParametersFormatNecessary?Description
_kstringYesYour API key
_p255 char stringYesOne of the person’s identities
_n255 char stringYesAnother of the person’s identities
Example
http://trk.kissmetrics.com/a?_k=api-key&_p=bob&_n=bob%40bob.com
This tells us to treat bob and bob@bob.com as the same person. If you log events or properties to either ID, they all refer back to the same one person. (bob@bob.com is passed as bob%40bob.com because the @ needs to be URL-encoded.)
You most frequently use this to connect a person’s ID when they are anonymous with the same person’s ID when they are known (that is, to connect a randomly generated ID with their username, an email address, Facebook ID, whatever).
It’s OK to call this more than once with the same pair of identities. It’s also OK if a person has more than one alias.

Filed under APIs

how to access mysql database remote

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';


GRANT ALL PRIVILEGES ON demo . * TO bikash@localhost IDENTIFIED BY '123456'


remote access- for IP bind


GRANT ALL PRIVILEGES ON *.* TO 'season'@'%' IDENTIFIED BY '111111@12345';

FLUSH PRIVILEGES;

Friday, January 11, 2013

Welcome to the PHP Developer Center

Welcome to the PHP Developer Center

Yahoo! Language centers have been deprecated. If you have any concerns or questions, please don't hesitate to contact us in General Discussion at YDN forum.
From simple scripts to enterprise-class Web applications, PHP is one of the most popular programming languages in the world. This site is your source for information about using PHP with Yahoo! Web Services APIs. Here you'll find:
  • Tutorial that shows you how to use PHP to make REST requests and parse XML responses.
  • HOWTO Articles to help you understand our technologies and how you can use them better with PHP.
  • Code Samples you can play with. Use them as a starting point for your own applications or study them for subtle nuances.
  • OAuth Authorization to let Yahoo! users authorize applications.
  • Other Resources out on the Web to help you use PHP and the Yahoo! APIs to their fullest.
  • Community Resources where you can join our mailing list and discuss the Yahoo! APIs with us and with other PHP developers.

HOWTO Articles

There are many ways probably too many ways to use PHP to access, parse, and cache Yahoo! Web Service requests. In these articles, we give you our recommendations and suggestions for thoughtful and efficient PHP usage. Both PHP4 and PHP5 are covered.
HOWTO: Make Yahoo! Web Service REST Calls with PHP: Should you use curl, fsockopen, or something else? Here are some thoughts on the subject.
HOWTO: Parse Yahoo! Web Service REST Calls with PHP: Yahoo! Web Services return XML. Some can also return JSON and Serialized PHP. We recommend techniques for parsing and accessing all of these data types.
HOWTO: Cache Yahoo! Web Service REST Calls with PHP: Caching is essential for performance and reliability. There are many ways to cache data and we offer up a couple of them.

Code Samples

Sometimes it's easiest to learn by looking at what other people have done. In this section we've included code samples written by us and others to help you get up to speed with Yahoo! Web Services.
Unless otherwise noted, all the folllowing code samples are provided under the terms of the Yahoo! SDK Software License Agreement.

Codes Samples Used by our HOWTOs

Cut to the chase and drill down to what matters. These working code samples, which are used in our HOWTO's above, can get you started quickly.
  • cacheAPC - APC caching for Web services
  • cacheSWAP - file swap caching for Web services
  • parseDOMPHP5 - parsing XML using PHP 5's DOM extension
  • parseDOMXML - parsing XML using PHP 4's DOM XML extension
  • parseJSON - parsing JSON using JSON-PHP and PHP-JSON
  • parsePHP - parsing serialized PHP
  • parseSIMPLEXML - parsing XML using PHP5's SimpleXML extension
  • requestCURLGET - Web services HTTP GET requests using the curl extension
  • requestCURLPOST - Web services HTTP POST requests using the curl extension
  • requestFILEGC - Web services HTTP GET requests using file_get_contents

Other Code Samples

  • Geocool, Rasmus Lerdorf steps you through Yahoo!'s Geocoder API.
  • A fun mash-up map of pottery studio locations by Roy Shroeder.
  • Chris Neale's YahooBattle; Search terms battle it out for top ranking using Yahoo! Search.
  • Examples of making Yahoo! Web Services requests using fsockopen for both GETs and POSTs.

Libraries

PEAR: PHP Extension and Application Repository. A vast set of libraries designed for PHP programmers. Many useful libraries including ones for SOAP and XML manipulation.
PHP Classes Repository : A library of PHP classes. Great for object-oriented programming projects.
PHP Extension Community Library (PECL) : A large repository of PHP extensions.

OAuth Authorization

Code samples using OAuth Authorization:

OAuth Libraries

  • Yahoo! Social SDK for PHP - Uses OAuth to make calls to the Yahoo! Social APIs.
  • OAuth Libraries - Lists OAuth libraries for many languages, including PHP.
  • Other Resources

    In this section you'll find links to external sites and articles that may be useful as you work with Yahoo! APIs and Web Services with PHP.

    General Information Links

    www.php.net : Sector Zero-Zero of PHP  — the place to find definitive PHP documentation and news.
    PHP Builder : A popular site with many PHP tutorials and code samples.
    Sitepoint : Makers of fine books and tutorials on PHP and other Web development tools.
    O'Reilly and Associates : Publishers of many of the best books on PHP as well as offers compelling tutorials and news on their Web site.
    Zend Developer Zone : Tutorials and code samples from some of PHP's core developers.
    Planet PHP : PHP News aggregator with up-to-date news about PHP from blogs and other sources.
    PHP Resource Index: Hundreds of links to PHP scripts and resources.

    Specific PHP Topics

    Top 7 PHP Security Blunders : An overview of common PHP security mistakes that programmers make.
    Toughen Forms' Security with an Image : One approach to implementing CAPTCHA using PHP.
    PHP5 SOAP Extension : An overview of PHP5's SOAP extension by the extension's author.
    Using XML: A PHP Developer's Primer: A series of articles discussing XML manipulation using PHP.

    Community Resources

    Discuss how to work with the Yahoo! Web Services and other APIs using PHP on the ydn-php mailing list. Please note that this is not a general PHP programming questions list; try to keep your questions focused to discussion about the Yahoo! APIs.

Build a Simple Yahoo! Answers API Webapp with PHP

Build a Simple Yahoo! Answers API Webapp with PHP

The open Yahoo! API is a great resource to work with. There is plenty of documentation for web developers, along with live demos and examples. What makes the application so interesting is how Yahoo! manages so many different online services. Along with their search engine there is also Yahoo! news, maps, weather, and so much more.
For this tutorial I’d like to focus on the Yahoo! Answers API. We will be creating a simple webapp that pulls all recently answered questions from a select few categories. The API delivers results via XML or JSON, so we have the option to build with any backend programming language. Although for this guide I’ll stick to PHP since it’s the most commonly understood backend language.
Simple Yahoo! Answers API tutorial with PHP
Live DemoDownload Source Code

Register a New Application

To get going we first need a new developer API key. This is required so that Yahoo! can manage requests onto the network. Also so that developers can’t just make anonymous requests pulling massive amounts of bandwidth.
You’ll need to visit this new projects page and sign into your Yahoo! account. From there you will be asked some very basic questions about your application – doesn’t matter what you fill in as long as it makes sense. After completion you’ll be presented with an API ID that we’ll need on the backend PHP server-side.

Building the Document

Start out by creating a new page index.html which will hold our core page structure. I’ve included a reference to the most recent jQuery library along with an external script.js file. This will hold our Ajax calls once the document is finished.
Below is my exact code from the index file. You’ll notice that I’m including a few sample categories with IDs related to their Yahoo! ID.
<!doctype html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Yahoo! Answers Webapp - Popular Questions</title>
  <meta name="author" content="Jake Rocheleau">
  <link rel="stylesheet" type="text/css" href="style.css">
  <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lemon">
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
  <script type="text/javascript" src="script.js"></script>
<!--[if lt IE 9]>
  <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>

<body>
  <div id="w">
    <h1>Select a Y! Answers Category</h1>
  
    <nav>
      <a href="#" id="396545444">Politics & Government</a>
      <a href="#" id="396545660">Computers & Internet</a>
      <a href="#" id="396545013">Business & Finance</a>
      <a href="#" id="396545122">Science & Mathematics</a>
      <a href="#" id="396545015">Education & Reference</a>
    </nav>
  
    <div id="content"></div>
  </div>
</body>
</html>
To gather some different IDs just hit the browse categories page and click on some of the different topics. In the new URL you’ll notice a variable appended to the end like ?sid=whatever. That long string of numbers is the unique ID for that category, and we can use that with the API to pull questions recently answered by users.

The PHP Backend

Before we connect into the Ajax/JavaScript let’s create the API data inside a PHP file named ajax.php. The top portion of my script contains a set of static variables which we need for specific API functionality.
$theid = $_POST['catid'];
$cats = array();
$cats['politics']  = "396545444";
$cats['internet']  = "396545660";
$cats['business']  = "396545013";
$cats['science']   = "396545122";
$cats['education'] = "396545015";

$appid = "YOURAPIKEYHERE";
$url = "http://answers.yahooapis.com/AnswersService/V1/getByCategory?appid=".$appid;
 
$apiurl = $url."&category_id=".$theid."&type=resolved&output=json&results=15";
The first variable $theid will be passed into the script from Ajax. This will be a unique category ID which is passed whenever the user clicks on a new category link. Then I’ve also setup an array of these categories so we know which ID number correlates to which category.
Now inside $appid you should replace that string with your own API key. It should be a very long sequence of numbers, letters, and possibly some dashes or other miscellaneous punctuation. The url contains the first piece to our API call along with this key appended onto the string. $apiurl concatenates this along with some new data based on the unique category ID passed in via Ajax.
You can change some of these attributes if you’d like to mess around with different results. However the response type should always be JSON because it’s much easier to manage than XML or direct PHP code.

Looping through Response Data

For the Ajax response to work properly with PHP we need to output all this data into plain HTML format and append this onto the page. You should notice in my index.html file there is a div with the ID #content that is totally empty. This will be our container for all the new data.
$i = 0;
 
// setup our data array
$dataobject = json_decode(file_get_contents($apiurl));
We first create a counter variable $i set to 0. This should be a unique integer which increases every time we loop through a new row of results. This helps us determine odd/even rows so we can apply alternating colors.
Also I’m using the PHP function json_decode() for updating this string of JSON data into an object collection. You’ll notice inside I’m also calling a function file_get_contents() – this is necessary to read the original JSON response from Yahoo!’s remote server. There are other libraries with this same functionality but I find PHP’s default method to be quicker & easier.
// begin output loop
foreach($dataobject->all->questions as $question) {
  $timestamp = $question->Timestamp;
  $dd = date("F d, Y", $timestamp);
  
  echo '<div class="qbox'.(($i = !$i)? ' odd':'').'">'."\r\n";
  echo '<h2><a href="'.$question->Link.'" target="_blank">'.$question->Subject.'</a></h2>'."\r\n";
  echo '<p>Posted '.$dd.' - Total answers: '.$question->NumAnswers.'</p>'."\r\n";
  echo '<p>Link URL: <a href="'.$question->Link.'" target="_blank">'.$question->Link.'</a></p>'."\r\n";
  echo '</div>'."\n\n\n";
 
  $i++;
}

die();
I’m using a really simple foreach() loop to go through the question object and output similar HTML. Each question is contained inside a div with the class .qbox and possibly an alternating class of .odd. The rows are colored with different backgrounds so you can scroll through results much easier. The final die() function is helpful to let Ajax know our script has finished running. It will save response times when calling the same script hundreds of times daily.

Connecting into jQuery/Ajax

Even if you don’t totally follow the PHP code don’t worry! API results are difficult to jump right into, but the concepts are still easy enough if you have time for research. For now let’s examine the final piece to this puzzle which is connecting into JavaScript calls.
$(document).ready(function(){
 
  $("nav a").on("click", function(e){
    e.preventDefault();
  
    var clickid = $(this).attr("id");
    var content = "#content";
I’m first placing an event handler whenever a user clicks any anchor links inside the nav element. We first stop the default href value from loading, then setup a couple variables which point to specific containers on the page.
    if($(this).hasClass("sel")) {
      // do nothing since we already have this selected
    } else {
      // change to display a new content container
      $("a.sel").removeClass("sel");
      $(this).addClass("sel");
   
      $(content).html("<center><img src=\"images/loader.gif\" alt=\"loading...\"></center>");
   
      $.ajax({
        type: "POST",
        url: "ajax.php",
        data: "catid="+clickid,
        dataType: "html",
        success: function(html) {
          $(content).html(html);
        }
      });
    }
  }); // end .on() click event handler
}); // end DOM ready()
If the current link has a class of .sel then we know it’s already been clicked and loaded, so we do nothing. Otherwise the user has clicked a new link and we need to pull new Ajax results.
The selector for $(“a.sel”) will target any other anchor links on the page with a class of .sel. We want to remove these first so that we aren’t running into problems trying to setup this new link as currently being selected. You’ll also notice I’m adding a small loader gif into the content area before we start the Ajax call. This is a small frontend UI piece to update the user and let them know we are, in fact, loading new results.
The final $.ajax() call is fairly straightforward if you’ve ever seen the syntax before. We’re targeting our ajax.php file and passing in the category ID with the variable name used earlier. If the call is successful we get a whole bunch of HTML data returned, and then display this data into the content container. Super simple and nothing too confusing even for beginners!
Simple Yahoo! Answers API tutorial with PHP
Live DemoDownload Source Code

Final Thoughts

I hope this tutorial has been educational and also a fun learning experience. You can understand a lot of programming concepts by just playing around with online APIs. Tools and resources you would have never thought about become very helpful in managing web applications.
Feel free to download a copy of my source code and implement something similar on your own website. Yahoo! provides very quick response times and their API is one of the best resources online. The online Y! Answers documentation is plenty helpful for getting yourself started on the path of API development.

TOP Payment Gateway India – New Column on 10 things in no ranking order

TOP 10 Payment Gateway India – New Column on 10 things in no ranking order

After being on horizon with long posts which offered detailed explanations etc had been trying ways to look at daily blogging which wouldnt take much time and will also ensure twitter reader friendly posts :)
These posts shouldnt require much time and can be pieces of information which were there in mind but just needed penning down or something have been researching.
The first post will be on my favourite space ” Payment Gateways available for your sites in India ” and my 2 cents on same
1 .ICICI Bank Payseal Payment Gateway
Wouldnt recommend to anyone just on the pure customer service and lack of understanding on sensitivity required or processes companies utilizing payment gateway have. Detailed post available
2. Citibank Payment Gateway
Mix Reaction to their services as offline merchants are not the happy lot but online customers do complain about the time interface provided.
3. HDFC Payment Gateway
Traditional bank looking at adding traditional merchant clients – looks like not a core-service for them
4. AXIS (UTI Bank) Payment Gateway
After long time enjoying great customer service as their platform partner is good with technology and bank is very active on customer net turnover less than 5 crores through payment gateway
5. ABCPayments
No feedback available but its an Inter mesh corporation the company behind Indiamart.com
6. CC Avenues
Inability to accept Master card and higher transaction fees charges to customer is a detterent.Too many complains to even add on a post though very small merchants <1L Rs every year are very happy.
7. Paypal
International payment gateway not ideal for indian merchants due to lot of charges or fees paid in getting money into own account and loss due to currency fluctuation.
8. Transecute
No feedback available
9. EBS
Reseller model similar to CCAvenues but better they deal with banks and provide easy to use interface for SME’s
10. Had no one worth mentioning so self promotion as one stop consultant for payment gateway solutions

11.Intuit Payment Gateway

The given PHP Class helps you to make a Credit Card Sale Transaction with ECHO/Intuite Payment
Gateway.
Code Example: Download Example

10 Excellent web Payment gateway

10 Excellent web Payment gateway


In this article, we’ll be reviewing my top 10 online payment systems for accepting payments on the Web. While many of the companies on this list have been available to online merchants for years, many are also now getting into new areas of online payments such as social commerce and in-store online card reader systems.

A Quick Primer on Online Payment Systems

Before getting started, here are just a few things to know about online payment systems.
  • ACH payments are electronic credit and debit transfers, allowing customers to make payments from their bank accounts for utilities, mortgage loans, and other types of bills. ACH stands for Automated Clearing House and most payment processors offer ACH payment options to their customers, especially for monthly- and subscription-based transactions. Most payment solutions use ACH to send money (minus fees) to their customers.
  • A merchant account is a bank account that allows a customer to receive payments through credit or debit cards. Merchant providers are required to obey regulations established by card associations. Many processors (such as the ones listed below) act as both the merchant account as well as the payment gateway.
  • A payment gateway allows merchants to securely pass credit card information between the customer and the merchant and also between merchant and the payment processor. The payment gateway is the middleman between the merchant and their sponsoring bank.
  • A payment processor is the company that a merchant uses to handle credit card transactions. Payment processors implement anti-fraud measures to ensure that both the front-facing customer and the merchant are protected.
  • PCI compliance is when a merchant or payment gateway sets their payment environment up in a way that meets the Payment Card Industry Data Security Standard (PCI DSS). The PCI DSS standard was created by the Payment Card Industry Security Standards Council to increase security of cardholder data and to reduce fraud.
What follows are 10 excellent online payment systems.

1. Authorize.Net

Authorize.Net
Authorize.Net is the Internet’s most widely used payment gateway. With a user base of over 300,000 merchants, Authorize.Net has been the go-to method for e-commerce sites that need a gateway to accepting payments. Widely used e-commerce platforms such as Magento, Volusion and X-Cart are designed to accept payments using Authorize.Net easier.
Pricing: Authorize.Net has a $99 setup fee, costs $20 per month and takes a $0.10 per-transaction fee. Source: Authorize.Net pricing

2. PayPal

PayPal
PayPal is the world’s most widely used payment acquirer, processing over $4 billion in payments in 2011. PayPal payments are made using a user’s existing account or with a credit card. Money can be sent directly to an email address, thus prompting the users to sign up for a new PayPal account. In addition to taking payments, PayPal also allows its users to send money through the service, which is a feature that only a few payment solutions provide.
Pricing: PayPal takes 2.9% + $0.30 per transaction and has no setup or monthly fees. Source: PayPal merchant fees

3. Google Checkout

Google Checkout
Google Checkout is Google’s answer to PayPal. Google Checkout allows users to pay for goods and services through an account connected to their Google profile. The major benefit that Google Checkout has over the competition is that millions of Internet users use Google for other services, making a purchase through Checkout a simpler process.
Pricing: Google Checkout fees start at 2.9% + $0.30 per transaction for sales less than $3,000. The percentage they take goes down depending on monthly sales volume. Source: Google Checkout fees

4. Amazon Payments

Amazon Payments
Amazon Payments allows its users to receive money using its API (and to send money out via ACH). Popular crowdfunding site Kickstarter uses Amazon Payments.
Pricing: Amazon Payments fees start at 2.9% + $0.30 per transaction for payments over $10 (the percentage they take is less for larger transactions). For payments under $10, the fee is 5.0% + $0.05 per transaction. Source: Amazon Payments fees

5. Dwolla

Dwolla
Dwolla is a direct competitor to PayPal. One of the newcomers in the third-party payments space, the company is processing over $1 million per day. Setting up Dwolla payments is similar to PayPal, although Dwolla doesn’t have the same name recognition as their competition.
Pricing: There are no fees for transactions less than $10. For transactions over $10, Dwolla charges $0.25 per transaction. Source: Dwolla fees

6. Stripe

Stripe
Stripe provides an excellent payment solution for web developers who would like to integrate a payment system into their projects using Stripe’s robust API. By bypassing the traditional sign up process, Stripe acts as a merchant account for its providers, handling all PCI compliance and merchant approvals.
Pricing: Stripe charges 2.9% + $0.30 per transaction with no setup or monthly fees. Source: Stripe: pricing

7. Braintree

Braintree
Braintree is an online payment gateway and merchant account solution known for working with popular tech startups such as Airbnb and LivingSocial.
Pricing: Braintree has a $35 monthly fee (with a $75 monthly minimum). Transaction fees start at 2.29% + $0.30 per transaction for qualified cards. Source: Pricing – Braintree

8. Samurai by FeeFighters

Samurai by FeeFighters
Samurai is a payment gateway and merchant account solution. The company’s main product, FeeFighters, is a tool to help merchants compare rates for merchant accounts. Samurai was developed as a direct competitor to Braintree and other gateway/merchant solutions and offers customers a payment gateway or a gateway/merchant account package.
Pricing: For their gateway/merchant solution, Samurai takes 2.3% of all sales volume, costs $25 per month and charges a $0.30 fee per transaction. Source: Samurai by FeeFighters pricing

9. WePay

WePay
WePay is a payment processor that allows Internet merchants to accept credit cards and bank account payments online. WePay seems to be focused on the individual user, and has recently added e-store pages to their service to help their customers conveniently take in payments (e.g. event tickets, products, donations and so forth) through their service.
Pricing: WePay charges a 3.5% transaction fee (with a $0.50 minimum) for credit card transactions and $0.50 for bank payments, with no setup or monthly costs. Source: WePay fees

10. 2Checkout

2Checkout
2Checkout is another payment processor that combines a merchant account and payment gateway into one, allowing customers to receive credit card payments as well as PayPal payments. The company offers international payments, shopping cart stores as well as a recurring billing feature.
Pricing: 3.99% (if you apply by May 1, 2012), a $0.45 transaction fee and $10.99 monthly service fee.
Pricing and fees – 2Checkout

11.DP DirecPay





  • One Gateway for Various Payments : DirecPay is a payment gateway solution that enables you to accept customer payments from credit cards, debit cards and net banking, all under one roof
  • Multiple Access Modes : DirecPay gives you the facility to integrate with its payment gateway securely over Internet and IVRS
  • Savings on Infrastructure : You do not have to invest in infrastructure, security and IT for a payment gateway of your own, to accept payments on your website
  • Payment Alerts : You receive alerts via email for every transaction conducted on your website
  • Merchant Account Not Mandatory: You need not open any additional bank account for being a DirecPay merchant
  • T+2 Fund Settlement : A T+2 settlement cycle gives you the assurance that transactions are processed and payments are made to your account within 2 working days
  • Overnight Integration : The integration of DirecPay is an uncomplicated process that can even be completed within one single day
  • Dropped Transaction Tracking : Recapturing all transactions which have been abandoned by customers either intentionally or due to technical errors

 

Other Noteworthy Payment Systems

Here are other online payment systems I think you should also check out:

What about Payments through Mobile Devices?

These two payment services allow merchants to accept credit card payments directly through their mobile devices, making it possible for devices such as the iPhone, the iPad and Android smartphones to act as a mobile point of sale (POS) checkout system.

Conclusion

There are plenty of online payment systems out there that you can use to conduct e-commerce activities. Choose one that’s in line with your business objectives.
This isn’t an exhaustive list of online payment systems. If your favorite online payment system isn’t on the list, please share it with us in the comments and discuss why you choose it over other online payment systems.

Related Content

YouTube Data API via PHP: Displaying and uploading videos

YouTube Data API via PHP: Displaying and uploading videos


Getting Started

The PHP client library is part of the open-source Zend Framework and is available for dowload at framework.zend.com.

Further documentation for using the PHP Client Library with the YouTube API

The complete PHP Developer's Guide is available at code.google.com: http://code.google.com/apis/youtube/developers_guide_php.html
Please note that the Developer's Guide does not document some of the helper methods that are used in the demo application and listed in this article.
Please use the download provided for 'Powered by YouTube' — http://sites.google.com/site/poweredbyyoutube

Requirements

- PHP 5.2+ required extensions: ctype, dom, libxml, openssl*, spl, standard
* openssl is only required if you want to do signed AuthSub authentication
- A developer key (required to write to the API) from http://code.google.com/apis/youtube/dashboard

Installation

- Extract the files to a folder with appropriate permissions and point the include_path to the folder in your php.ini file
- Run the verification script provided at http://sites.google.com/site/poweredbyyoutube

Running the demo application

  1. Copy files from /demo/YouTubeVideoApp to a location on your server.
  2. Make sure that permissions are set correctly and that your server is configured for PHP
  3. Navigate to the index.php page
  The demo application allows you to perform the following unauthenticated requests:

- retrieve various standard feeds
- search for public videos
- retrieve videos from a particular user

When you authenticate to the YouTube API and pass in your developer key, you can perform write requests. The demo application uses the AuthSub authentication mechanism. Once your application is authorized, you can perform the following actions with the demo application:

- upload videos to my account
- delete videos from my account
- add new playlists to my account
- update existing playlist in my account



PHP Client Library shortcuts

Required includes

The Zend/Loader.php class must be included for each .php script. It can then be used to load various YouTube API related classes:
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_YouTube'); // an example of loading a class

Using the Zend_Gdata_YouTube service object without authentication

All read-only requests can be be performed without authentication:
$yt = new Zend_Gdata_YouTube();
$topRatedFeed = $yt->getTopRatedVideoFeed();

Iterating through Zend_Gdata_YouTube_VideoFeed objects

Most requests will return some type of Feed object. Most of these will be Zend_Gdata_YouTube_VideoFeed's, but there are also _CommentFeed objects, etc.
foreach($topRatedFeed as $videoEntry) {
  print $videoEntry->getVideoTitle() . "\n";
}

Accessing VideoEntry properties

There are helper methods available in the Zend_Gdata_YouTube_VideoEntry class for all of the meta-data. Some of the most commony used ones are:
getVideoDescription(), getFlashPlayerUrl(), getVideoId(), getVideoThumnails()

Uploading Videos

If you have an authenticated Zend_Gdata_YouTube service object, you can upload videos either directly (sending both video and meta-data in one request) or with browser based upload. A direct upload would look like this:
// Assuming that $yt refers to our authenticated service object
$newEntry = new Zend_Gdata_YouTube_VideoEntry();
$filesource = $yt->newMediaFileSource('myfile.mov');
$filesource->setContentType('video/quicktime');
$filesource->setSlug('myfile.mov');
$newEntry->setMediaSource($filesource);

$newEntry->setVideoTitle('My Test Movie');
$newEntry->setVideoDescription('A test movie');
$newEntry->setVideoCategory('Comedy'); // this must be a valid category
$newEntry->setVideoTags('cars, funny');

// Perform upload. Make sure you add error handling ! 
$updatedEntry = $yt->insertEntry($newEntry,
  'http://uploads.gdata.youtube.com/feeds/users/default/uploads',
  'Zend_Gdata_YouTube_VideoEntry');