Makai Studio
Imi ‘Ike - Seeker Of Knowledge
Imi-?ike

ASP.Net and Paypal buy now button: Offer discount at checkout in code behind

November 19, 2009 08:17 by jdelpay

This is a very simple way to offer a discount at chckout for customers. It is more secure than the javascript way of doing it because the code is “hidding”. Following my previous tutorial called: “ASP.Net: adding a Paypal Buy Now in code behind.

Solution
On your default.aspx page add a button from the toolbox. Then under the button add a textbox with an id of couponCodeTXT.
Double click the button you just added to open the default.aspx.cs page (code Behind)
Add and customize the code below.

 

   1: using System;
   2: using System.Collections;
   3: using System.Configuration;
   4: using System.Data;
   5: using System.Linq;
   6: using System.Web;
   7: using System.Web.Security;
   8: using System.Web.UI;
   9: using System.Web.UI.HtmlControls;
  10: using System.Web.UI.WebControls;
  11: using System.Web.UI.WebControls.WebParts;
  12: using System.Xml.Linq;
  13:  
  14: public partial class cc_Default : System.Web.UI.Page
  15:  
  16: {
  17:  
  18: protected void Page_Load(object sender, EventArgs e)
  19:  
  20:     {         
  21:  
  22:    }   
  23:  
  24:  protected void Button1_Click(object sender, EventArgs e) 
  25:  
  26:    {    
  27:  
  28:    const string Server_URL = "https://www.paypal.com/cgi-bin/webscr?";
  29:    const string return_URL = "http://www.macarteverte.com/default.aspx";
  30:    const string cancelreturn_URL ="http://www.macarteverte.com/fail.aspx";
  31:    string cmd = "_xclick";
  32:    string business ="PCZNNK7K5A6MS";
  33:  
  34:    string item_name = "Loterie pour la carte verte";
  35:    double baseamt = 49.00;
  36:    int add = 1;        
  37:  
  38: //Simple way to add 10% discount coupon code
  39:  
  40:        string coupon = "mcv1756"; 
  41:        string couponCode = couponCodeTXT.Text; 
  42:        double amount;
  43:  
  44:        if (couponCode == coupon)
  45:  
  46:         {   
  47:  
  48:          amount = 49.00 - (49.00 * 10.00) / 100.00;
  49:  
  50:     } 
  51:  
  52:        else
  53:  
  54:        {
  55:  
  56:     amount = 49.00;
  57:  
  58:     } 
  59:  
  60:        //End coupon
  61:  
  62:        double shipping = 0.00 ;
  63:        double handling = 0.00;
  64:        int no_shipping = 1;
  65:        int no_note= 1;
  66:        string currency_code = "EUR";
  67:        string lc = "FR";
  68:        string bn = "PP-BuyNowBF";
  69:        string basedes = "ILCV 49.00" ;
  70:        string custom = User.Identity.Name;
  71:        string redirect="";
  72:        redirect+= Server_URL;
  73:        redirect += "cmd=" + cmd;
  74:        redirect += "&business=" + business;
  75:        redirect += "&item_name=" + item_name; 
  76:        redirect += "&baseamt=" + baseamt;
  77:        redirect += "&add=" + add; 
  78:        redirect += "&amount=" + amount;
  79:        redirect += "&shipping=" + shipping;
  80:        redirect += "&handling=" + handling;
  81:        redirect += "&no_shipping=" + no_shipping;
  82:        redirect += "&no_note=" + no_note;
  83:        redirect += "&currency_code=" + currency_code;
  84:        redirect += "&lc=" + lc;
  85:        redirect += "&bn=" + bn;
  86:        redirect += "&basedes=" + basedes;
  87:        redirect += "&return=" + return_URL;
  88:        redirect += "&cancel_return" + cancelreturn_URL;
  89:  
  90:        //Redirect to the payment page 
  91:  
  92:        Response.Redirect(redirect); 
  93:    }
  94: }
  95:  
  96:  

Visit:Makai Studio

AddThis Social Bookmark Button

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Web 2.0 Mobile Takeover in near future

October 23, 2009 03:06 by jdelpay

San Francisco - The web 2.0 Summit , which wraps here yesterday, has attracted some of the biggest in the industry including, Microsoft, Google, Yahoo, Twitter, Facebook, Adobe along with media companies like General electric, comcast etc...

Mobile, Mobile, Mobile.

The last few year have seen dramatic change as we shifted our lives to the Internet, but now it's all about mobile. If you don't have one yet, you will soon. Smartphone technology is ramping faster than any other technology. More and More people are switching to smart phone devices and it is all happening in a recession. Talking about recession hum, Apple just reported record revenue and sales. Google said its revenue rose to 7% year to year, and Microsoft just launch windows 7 which will dramatically increase sales.

New ways to pay

Is it possible to say that innovations as young as the ATM are already becoming obsolete? That's what Scott Thompson president of Ebay's electronic payment service, paypal thinks. He came to announce the opening of Paypal to outside developers, as Apple did with the iphone, so they will be new way to send money believe me. Developer can build things as simple as payment apps for social networkking web sites, or payroll for foreign country. You can pay for items from your phone in your living room.

TV

Cable TV wants to open up too. the old way Subscribe and get access is slowly but surely dying. The new way Subscribe, and watch any show in the lineup on the internetat anytime, whenever whatever is coming. Comcast CEO Brian Roberts announced that a web 2.0 for its 24 million subscriber via its fancast website. They would have access by the end of the year.

Search

Microsoft 's Bing search engine which is hopping to give rigorous search competition to Google for the first time in years, announced non exclusive deals with both twitter and facebook to provide search results At Bing.com/twitter the conversation can be viewed and searched. Additionally, tweets will be part of the search results. Microsoft showed an example of a search on Singer John Legend, showing a pictureof the performer followed by two of his recent Twitter to include its updates in Bing search results.

In a near future, maybe we won't need a remote control for the TV, keys for your car, ATM cards to carry around, Access card for work, Web cam on your Pc etc...all you will have to do is grab your phone.


Visit:Makai Studio

AddThis Social Bookmark Button

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

ASP. Net : Adding a Paypal Buy Now in code behind

August 31, 2009 03:58 by jdelpay

Problem:

You can't have HTML form tags inside aspx form tags. The problem is that ASP.NET pages are forms themselves, surrounded by a single <form Runat="Server"> tag that automatically posts back to itself. Therefore, you cannot embed an HTML form inside this server form.
Shown below is typical code for a PayPal "BuyNow" button.

 

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="dradams@dradamsweb.com">
<input type="hidden" name="item_name" value="ASP.NET 2.0 Tutorial">
<input type="hidden" name="item_number" value="WDS03">
<input type="hidden" name="amount" value="52.00">
<input type="hidden" name="return" 
  value="http://www.dradamsweb.com/default.aspx">
<input type="hidden" name="cancel_return" 
  value="http://www.dradamsweb.com/default.aspx">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="image" border="0" name="submit"
  src="https://www.paypal.com/en_US/i/btn/x-click-but01.gif" 
  alt="Make payments with PayPal - it's fast, free and secure!">
</form>


Solution

On your default.aspx page add a button from the toolbox
Double click the button you just added to open the default.aspx.cs page (code Behind)
Add and customize the code below

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq; 


public partial class cc_Default : System.Web.UI.Page
{

protected void Page_Load(object sender, EventArgs e)
{

}

protected void Button1_Click(object sender, EventArgs e)
{
const string Server_URL = "https://www.paypal.com/cgi-bin/webscr?";
const string return_URL = "http://www.PageWhenOk/default.aspx";
const string cancelreturn_URL = "http://www.PageWhenCancel.com/cc.fail.aspx"; 


string cmd = "_xclick";
string business ="your business email";
string item_name = "Name of the item";
double baseamt = 49.00;//amount
int add = 1;
double amount = 49.00 ;
double shipping = 0.00 ;
double handling = 0.00;
int no_shipping = 1;
int no_note= 1;
string currency_code = "EUR"; //Replace with country Currency code
string lc = "FR";
string bn = "PP-BuyNowBF";
string basedes = "ILCV 49.00" ;

string redirect="";
redirect+= Server_URL;
redirect += "cmd=" + cmd;
redirect += "&business=" + business;
redirect += "&item_name=" + item_name;
redirect += "&baseamt=" + baseamt;
redirect += "&add=" + add;
redirect += "&amount=" + amount;
redirect += "&shipping=" + shipping;
redirect += "&handling=" + handling;
redirect += "&no_shipping=" + no_shipping;
redirect += "&no_note=" + no_note;
redirect += "&currency_code=" + currency_code;
redirect += "&lc=" + lc;
redirect += "&bn=" + bn;
redirect += "&basedes=" + basedes;
redirect += "&return=" + return_URL;
redirect += "&cancel_return" + cancelreturn_URL;
//Redirect to the payment page
Response.Redirect(redirect);

}
}



Voila!


Visit:Makai Studio

AddThis Social Bookmark Button

Currently rated 5.0 by 4 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Medion Akoya “The Touch” X9613 touchscreen all-in-one

August 28, 2009 12:59 by jdelpay


Medion have unveiled a new all-in-one PC, the oddly named Akoya “The Touch” X9613. Based around a 24-inch multitouch-capable touchscreen, rather than stuff the X9613 full of nettop components Medion have taken the far more sensible route and used Intel’s 2.0GHz Core 2 Quad Q9000 CPU with 4GB of RAM, NVIDIA’s GeForce GT 240M graphics card and a Blu-ray drive.

That combination is good for 1920 x 1080 full High Definition, and Medion throw in both an HDMI input and output, SCART and VGA inputs, and three TV tuners (DVB-T, DVB-S and analog). There’s also a 1TB hard-drive, eSATA, S/PDIF, WiFi b/g/n, gigabit ethernet and Bluetooth 2.1, together with a webcam and stereo speakers plus subwoofer.

Underneath, in the control bar, there’s a separate SideShow display which can be used to show Windows 7 widgets. All in all, there’s plenty of entertainment PC on offer here, hence the considerable price: two models will be on offer (no word on what differentiates them), at €1,499 ($2,152) and €1,900 ($2,727) respectively.


Visit:Makai Studio

AddThis Social Bookmark Button

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Creative Zii Egg Nests

August 28, 2009 12:45 by jdelpay

Android is a venerable Operating System, whether you prefer to use it or not, and it’s popping up on all sorts of peripherals. One of the good ones coming down the pipe line, is Creative’s Zii Egg. We’re still excited about this thing, even if there isn’t even the faintest of words about an official, consumer-based release for the device yet. But, if you’re a developer, then you can start to get excited, because Creative is starting to release its first shipment.

If you haven’t been keeping up with this thing, then we’ll get you caught up to speed. The Zii Egg is Creative’s first touchscreen device, and it comes packed with 10-point multi-touch. The screen is of the 3.5-inch variety, with a 480×320 resolution. It supports Bluetooth, WiFi, GPS, and has two VGA cameras. Even better, the Zii Egg offers HDMI out at a resolution of 1080p high definition. And it’s running on the Android platform.

From the initial tests, the display is apparently “shockingly bright”, and the colors are described as being, “vibrant and alive.” The speakers are said to be akin to the Zen X-Fi’s, the audio output via headphones is apparently the best Creative has ever produced. The worst part is that Creative has said no plans regarding a public release of the Zii Egg, which is truthfully very disconcerting. We want this thing.

Plaszma Platform

    * Open Development Program
    * 100% Market Ready and Designed for Manufacturability
    * Create Customized Applications & Devices
    * Supports both Plaszma OS and Android OS


Zii EGG

    * World's 1st Handheld StemCell Computer
    * Low Cost, Energy Efficient
    * High Definition 1080p Output
    * 3.5” 320x480
      (16 million colors) LCD
    * Capacitive 10-Point Multi-Gesture Touchscreen Display
    * Text-to-Speech Engine
    * SD slot

    *  3D Hardware Graphics Acceleration for OpenGL ES
    * 32GB Internal Memory
    * 256MB Mobile DDR RAM
    * X-Fi Audio Processing
    * Wi-Fi 802.11 b/g
    * GPS Receiver
    * Bluetooth 2.1 + EDR
    * 3-axis Accelerometer
    * Starting from US$199* for Zero GB version in bulk


Visit:Makai Studio

AddThis Social Bookmark Button

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Nokia N900

August 28, 2009 12:44 by jdelpay

The N900 will be the first Nokia mobile phone to run Maemo, which is Linux derived. The N900 is the first Nokia handset that I have found particularly appealing in a long time.  I will run down some of the specs for you. The device will have 32GB of storage upgradable to 48GB with a microSD card. The camera has 5MP resolution and Carl Zeiss optics. The CPU inside the sexy device is an ARM Cortex-A8 processor and the phone has a slide out QWERTY keyboard.

Nokia has said that the device is expected to ship this October at a price of about €500. If you live in Germany you can pre-order the device right now directly from Nokia for €599,00. Italian N900 hopefuls can also grab a pre-order today at the same price. There is no word on availability or pre-orders in other countries at this time.


Visit:Makai Studio

AddThis Social Bookmark Button

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Case Study - Aqualitec

July 23, 2009 04:59 by jdelpay

Company : Aqualitec Corp
Website: http://www.aqualitec.com

About Aqualitec

Aqualitec is a national distributor of state of the art wastewater treatment equipment for municipal and industrial applications. Aqualitec’s products are supplied by Eau Claire, a leader in the manufacturing of wastewater treatment equipment in Europe since 1996. Aqualitec 's mission is to share Eau Claire's proven wastewater treatment solutions with the U.S customers.

  

First contact

Aqualitec approached Makai Studio with an idea for a site, a budget and a short timeline.

The site had to be easy to navigate, current,  fresh and online quickly. They also needed brochures, letterhead and envelop. They had already previously contracted several web design companies and all had failed to deliver a completed product. 

Needs

  • Create a site that was fresh and appealing
  • Easy and intuitive navigation
  • Fast loading  
  • Brochures matching the look and feel of their web site
  • Branding
  • Hosting and email services
  • Search Engine Optimized

Solutions 

Makai Studio created several mockups and implemented the design for this site to showcase:

 

  • Company products
  • Flash video gallery
  • Photo gallery
  • Company information
  • Secured web forms (contact and feedback)
  • Search Engine Optimized
  • Submitted site to search engines
  • Tested
  Brochure and Branding

 

  • Created design for brochures based on the look and feel of the website
  • Created company letterhead
  • Business cards

Technology XHTML, ASP.Net, JavaScript, Flash

Goals Achieved

  • The web site has received very good reviews
  • Web Site has current content
  • Their online presence matches showcase the high quality of their product


Visit:Makai Studio

AddThis Social Bookmark Button

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Microsoft Bing: Much better than expected

June 2, 2009 01:50 by jdelpay

Microsoft on Thursday took the wraps off Bing, the rebranded and rebuilt search engine formerly code-named Kumo, designed to replace Live Search. It's a solid improvement over the previous search product, and it beats Google in important areas. It will help Microsoft gain share in the search business. It's surprisingly competitive with Google.

In search presentation, Bing wins. It uses technology from Powerset (a search technology company Microsoft acquired) to display refined versions of your query down the left side of the page. For example, I searched for the game "Fallout 3" on Google and Bing. While Google gave me good results, Bing gave me a menu of "related searches," that included Walkthrough, News, and so on. 

I planned to write this story with the headline, "Bing isn't Better," but the new engine won me over. 

The new game in search is parsing information and displaying it in the engine itself (see Wolfram Alpha for the extreme example of this). Both Google and Bing, and other search products, have areas where they will collate and format information for you, instead of just linking you to external pages where the data reside. Bing does an extremely good job at this in several popular areas -- like product reviews, movie listings, weather, travel, and stock prices. 

While the service doesn't reveal all its riches at once, it rewards exploration and yields pleasant surprises to users who poke around. 

Google keeps improving in the area of in-search collation and display as well, but Bing makes Google look complacent, and that's not good for Google. For the moment, Bing's on top in this game. Try this search engine. I do not think you will regret it.

 Related Links

http://blogs.zdnet.com/microsoft/?p=2929

 


Visit:Makai Studio

AddThis Social Bookmark Button

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Verizon Hub Officially Unveiled

April 13, 2009 05:32 by jdelpay

We've been on the trail of the Verizon Hub since way back when it was called the Verizon One, in fact, but it's just been officially announced, and there are plenty of details to report now. The system boasts a 7-inch touchscreen display, and will work with Verizon wireless subscribers handset(s) to eliminate the need for a landline (people still have those!?) The idea here is that the hub can sync to your calendar, contacts, maps, traffic and weather reports via broadband. It can also send and receive text messages, and do all kinds of cute little tasks like send driving directions to your phone. Subscribers have to live in an E911-capable area, and will be able to bring any phone number with them if they want to sign up for new service. The hardware's going to cost $200 (after a $50 mail-in rebate) with a subscription fee of $35 per month -- which comes with unlimited minutes and texts to and from the device. It'll be available starting February 1st. Get ready.

In the CE world, success is all about timing. Verizon debuted its Verizon One gadget years ago, but that was before the widget craze, before FiOS was a household word, and before streaming radio and digital photo frames raised the profile of non-computer, Internet-connected devices.

In its latest form, the Verizon One is now called the Verizon Hub, and we got a chance to see it during our recent visit to Verizon HQ. I love this thing. In brief, it’s a cordless-phone-plus-widget-station that lets you make calls, get news, weather and traffic, share photos and control your FiOS TV (Motorola) set-tops. There are plenty of things it doesn’t do, like let you surf the Web, but that’s what your computer is for. And with the Verizon Hub you won’t get distracted by all of the unread emails in your inbox when you just want to check traffic.

The Verizon Hub has a gorgeous display, a POTS connection (no VoIP), Wi-Fi and an Ethernet port. I’m drooling over the device, but ultimately I think its success will depend on cost. This is a whole new gadget category and it will take a reasonable price point to get the unwashed masses to try it out. That said, if there was ever a time when the Verizon Hub could be successful, it’s now. Lots of people use widgets and RSS feeds, and lots of people like to show off photo slideshows. This isn’t a complete paradigm shift anymore.

 


Visit:Makai Studio

AddThis Social Bookmark Button

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Facebook employees know what profiles you look at

February 24, 2009 08:58 by jdelpay
"My friend got a call from her friend at Facebook, asking why she kept looking at his profile," says a privacy-conscious source at a major tech company. Turns out Facebook employees can (and do) check out anyone's profile. Not only that, but they also see which profiles a user has viewed — a major privacy violation. If you've been obsessed with a workmate or classmate, Facebook employees know. If Barack Obama's intern has been using the campaign account to troll for hotties, Facebook employees know. Within the company, it's considered a job perk, and employees check this data for fun.

Facebook has a history of protecting profiles from outsiders. The site once sent cease-and-desist letters to two of Valleywag's sister blogs for publishing certain student profiles.

The site does not allow regular users to see which profiles other users have seen. While one third-party application lets users voluntarily make their profile-visiting known, no application allows one to "spy" on the activity of an unknowing user.

Checking who's viewed a profile may be how Facebook found the tipster who violated their terms of service by sending Valleywag Steve Ballmer's profile. But were they violating their own terms?

Well, Facebook's privacy policy doesn't explicitly reserve or waive employees' right to check out your profile for any reason. Of course, the practice still reeks of skunkery — it's one thing to check profiles in the course of business, but these people are looking up records for kicks. This is a company with $150 million in projected revenues this year and a gigantic ad deal with Microsoft, not a corner video store. The privacy of millions is at stake. Google clearly promises not to crawl through mail or search records with anything but a computer program, and even AOL apologized for releasing semi-anonymous search data and violating its privacy policy.

We have no idea what else employees can see. Do they look at your messages? Your private gifts? Who knows? (Really, who knows? Email me or the tipline. Unlike some, we'll protect your identity.)


Visit:Makai Studio

AddThis Social Bookmark Button

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5