From the category archives:

General

Localized Paypal payment requests

by Roberto on May 2, 2010

in General

Paypal website

If you work with customers outside your country and not speaking your mother tongue, it is necessary to send them a payment request in their own language in Paypal, because the default language of Paypal payment requests is the language of the country where you have registered your account.

Paypal request money feature doesn’t permit to select the language and/or country of the receiver of the request.
Nonetheless you can easily build a link to send to your customer by email that will present a payment request in her own language.

You can append different parameters on the url to control the appearance on the payment request page.
Here there are some examples :

  1. Simple payment request with no language/ country specification
    http://www.paypal.com/webscr?cmd=_xclick
    &business=[YOUR_PAYPAL_EMAIL]
    &item_name=[PAYMENT_DESCRIPTION]
    &amount=[AMOUNT]
    &currency_code=[CURRENCY_CODE]
  2. Specify the country of the recipient
    http://www.paypal.com/webscr?cmd=_xclick
    &business=[YOUR_PAYPAL_EMAIL]
    &item_name=[PAYMENT_DESCRIPTION]
    &amount=[AMOUNT]
    &currency_code=[CURRENCY_CODE]
    &country=[COUNTRY_CODE]
  3. Specify the language of the recipient
    http://www.paypal.com/webscr?cmd=_xclick
    &business=[YOUR_PAYPAL_EMAIL]
    &item_name=[PAYMENT_DESCRIPTION]
    &amount=[AMOUNT]
    &currency_code=[CURRENCY_CODE]
    &lc=[LANGUAGE_CODE]
  4. Specify the country and the language of the recipient
    http://www.paypal.com/webscr?cmd=_xclick
    &business=[YOUR_PAYPAL_EMAIL]
    &item_name=[PAYMENT_DESCRIPTION]
    &amount=[AMOUNT]
    &currency_code=[CURRENCY_CODE]
    &country=[COUNTRY_CODE]
    &lc=[LANGUAGE_CODE]

Parameters explanation :

  • [YOUR_PAYPAL_EMAIL] : the email you used to register your Paypal account
  • [PAYMENT_DESCRIPTION] : the description of the payment request, ex : Invoice 123.
    Substitute spaces here with the characters : %20, so : Invoice%20123
  • [AMOUNT] : the amount requested
  • [CURRENCY_CODE] : the code of the currency of the specified amount, ex : EUR, USD, CAD, GBP
  • [COUNTRY_CODE] : the code of the country of the recipient, ex : USA, IT, CA, GB
  • [LANGUAGE_CODE] : the code of the language of the recipient, ex : en, it, fr, de

{ 0 comments }

Database in Javascript : Taffy DB

by Roberto on April 17, 2010

in General

If you need to implement a database on client side in Javascript I suggest to consider Taffy DB.
Taffy DB is a small library that can simplify the work a lot when you have to deal with many data structure in Javascript :

Taffy DB is a free and opensource JavaScript library that acts as thin data layer inside Web 2.0 and Ajax applications.

What makes it cool:

  • 10K file size!
  • Simple, JavaScript Centric Syntax
  • Fast
  • Easy to include in any web application
  • Compatible with major Ajax libraries: YUI, JQuery, Dojo, Prototype, EXT, etc
  • CRUD Interface (Create, Read, Update, Delete)
  • Sorting
  • Looping
  • Advanced Queries

Think of it as a SQL database in your web browser.

Example of use :

// Create a table
var friends = new TAFFY([]);
 
//Insert records in the table
friends.insert(
	{name:"Brian",
	gender:"M",
	married:"No",
	age:52,
	state:"FL",
	favorite_foods:["fruit","steak"]
	});
 
//Update records matching a condition
friends.update(
	{
	state:"CA",
	married:"Yes"
	},
	friends.find(
		{name:"Joyce"}
		)
	);
 
//Remove 
friends.remove({name:"Brian"});
 
//Order the records
friends.orderBy(["age",{"name":"desc"}]);

See the getting started guide for documentation and more examples.
I’m using this library in a new Google Gadget I’m writing.
This gadget uses the user’s contacts and I needed an easy way to manage the contacts list on client side using Javascript. Taffy DB is very useful for me in this scenario.

{ 1 comment }

How to translate the WordPress Thesis Theme

August 16, 2009
Thumbnail image for How to translate the WordPress Thesis Theme

WordPress Thesis Theme is shipped in English language only, but it provides also the strings to translate in a file in PO (GNU Gettext Portable Object) format. The file is thesis.po and is located in the directory wp-content/themes/thesis of your WordPress installation. The file thesis.mo that you’ll find in the same directory is the same [...]

Read the full article →

Debugging a CodeIgniter application with FirePHP

May 10, 2009
Thumbnail image for Debugging a CodeIgniter application with FirePHP

FirePHP is an addon for FireBug extension for Firefox browser. FirePHP extends FireBug functionalities to show log or error messages coming from your PHP application. These messages won’t be printed on the application interface but instead on the FireBug console. What do you need to integrate this debugging feature in your application : Firefox browser [...]

Read the full article →

Kohana PHP framework

April 26, 2009
Thumbnail image for Kohana PHP framework

Kohana is a PHP framework that implements the MVC paradigm originally based on CodeIgniter to build web applications. It is a community driven project and it is under very active development. Features : Kohana requires PHP 5 and isn’t compatible with PHP 4 : this is necessary to take advantage of OOP paradigm available in [...]

Read the full article →

ExpressionEngine 2.0 Preview

April 24, 2009
Thumbnail image for ExpressionEngine 2.0 Preview

ExpressionEngine is a flexible, feature-rich content management system that empowers thousands of individuals, organizations, and companies around the world to easily manage their website. The current available version of ExpressionEngine is 1.6.7 and you can download the free core version at this page, but EllisLab is working on the next release : 2.0. Here there [...]

Read the full article →