免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2011年3月16日 星期三

Paypal sandbox example: Donation

想測試 paypal的 sandbox
必須要先登入 https://developer.paypal.com
而且之前要先設定好測試帳號( Test Account)
[可參考之前的短文 http://3hitek.blogspot.com/2011/03/developerpaypalcom.html]







Paypal sandbox example : Buy Now







如何在 developer.paypal.com 產生測試帳號

[Q] 如何在 developer.paypal.com 產生測試帳號 ?

[try]
* 用一個可以收的到信的email信箱到https://developer.paypal.com註冊,
開啟所謂的 "developer account"
* 用"developer account" 登入 https://developer.paypal.com,
產生測試帳號("test accounts")
目前的情況是"create preconfigred account" 只能先產生 Personal test account

* 用"test account" 登入 https://www.sandbox.paypal.com
再將Personal test account 升級成 "Premier test account"
還無法升級成"Business account" ?


* 可以產生多個test account (我只試到產生3個)
最好配合多機測試 (或用兩個不同的browser?)
不然測試帳號會搞混

2011年3月15日 星期二

Paypal 常見問題 - 帳戶種類與費用

//=== 帳戶種類

" ...
Personal:
Recommended for individuals who shop and pay online. We don't recommend that sellers open a Personal account to receive online payments.

Premier:
Recommended for casual sellers or non-businesses who wish to get paid online, and who also make online purchases.

Business:
Recommended for merchants who operate under a company/group name. It offers additional features such as allowing up to 200 employees limited access to your account and customer service email alias for customer issues to be routed for faster follow-ups.
" (摘錄自 https://www.paypal.com/cgi-bin/helpweb?cmd=_help)


* to use Paypal API requires business account.


//=== 費用
* no registration fee (註冊帳戶不用錢)
* charge on receiving payments/withdrawing money (收受貨款/提領存款要收手續費)
* no difference among charges on receiving payments for the 3 types of account. (how about withdrawal?)




[ref]
https://www.paypal.com/cgi-bin/helpweb?cmd=_help

[Paypal 繁體中文說明]
https://www.paypal.com/tw/cgi-bin/helpweb?cmd=_help

Paypal 的相關連結

[Help]
https://www.paypal.com/helpcenter/main.jsp
https://www.paypal.com/cgi-bin/helpweb?cmd=_help

[繁體Help]
https://www.paypal.com/tw/cgi-bin/helpweb?cmd=_help

[Paypal sandbox login]
https://developer.paypal.com
https://www.sandbox.paypal.com

* use a receivable email to open a "developer account" at https://developer.paypal.com
* log in https://developer.paypal.com to create test accounts
* log in https://www.sandbox.paypal.com using a "test account"


[Paypal buttons]
https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside

露天拍賣如何取消交易?

[Q] 露天拍賣如何取消交易?

前幾天想在露天買東西 想要用7/11取貨 以為有貨到付款
結果是純取貨;
點了馬上購買就馬上成交了 ...
而不是先選擇付款方式後 才進入真正下標的動作 ...

那就得取消交易
在露天搜尋好久 終於找到 如何取消交易的path :

買家要到我的拍賣 -> 購買清單->賣家與交易資料(查看匯款資料)裡點入->管理(提出取消交易)-> 選擇/填寫取消交易原因 -> 送出 -> 等待賣家同意 ...

我先收到「取消交易要求」已成功送出!(商品編號 1108012xxxxxxx )的email通知
隔天再收到 "拍賣交易取消成功" 的email通知

" ...
這筆拍賣交易已經成功取消。(商品編號:11080121xxxxxx)
請注意!! 您無法再評價對方,這筆交易相關的評價系統都會全部刪除。

.若在商品賣出後的14天內確認取消交易,系統將不會對賣家計收交易的成交手續費。
.若在商品賣出後的15天起才確認取消交易,賣家仍應支付已計入的成交手續費,
...
"

2011年3月13日 星期日

如何安裝Eclipse PDT (php 開發/除錯工具)?

[Q] 如何安裝Eclipse PDT (php 開發/除錯工具)?
[Q] How to install PDT(PHP development tools) for Eclipse in Ubuntu?

[try]
0. sudo apt-get install eclipse (eclipse 3.5, Galileo)
1. Open Eclipse by Applications->Programming->Eclipse
2. install PDT from Eclipse's Help menu


以下摘錄自 https://help.ubuntu.com/community/EclipsePDT

Install PHP Development Tools (PDT)

1. Open Eclipse and specify your workspace (Applications->Programming->Eclipse)
2. Help->Install New Software
3. Select the Galileo Update site
4. Select the PHP Development Tools (PDT) Feature
5. Install...



Galileo Update site : http://download.eclipse.org/releases/galileo/

[ref]
https://help.ubuntu.com/community/EclipsePDT

2011年3月11日 星期五

如何將 paypal 的“buy now” 按鈕 置於 Flex應用中?

[Q] How to place the paypal “buy now” button for html into Flex?
[Q] 如何將 paypal 的“buy now” 按鈕 置於 Flex應用中?

[try]
根據 http://blog.flexcommunity.net/?p=26 所給的例子 來嘗試 ,
該範例似乎是用Flex3的環境寫的
稍作修改如後 可在Flex4.1 順利執行




The reproduced example is placed in http://3hsite.info/flex/paypal0.html

[ref]
http://blog.flexcommunity.net/?p=26

Paypal 提供的 付費機制

許久沒看paypal的Developer link
為了試Flex Hero的購物車 再度造訪
Surprise !

Paypal developer network 已發展成獨立的網站
而且網域名稱 只有一個字母 x --> x.com

付費機制也變的多元, 針對不同應用環境
相關配套的 流程/程式庫/API/...
讓我眼花 !

瀏覽之後 覺得 Express Checkout 可能比較
適合Flex Hero的購物車範例

下載 Express Checkout 說明文件

https://www.x.com/docs/DOC-2763 (DM , 對developer 沒啥用處)


https://www.x.com/community/ppx/documentation#ec



....

2011年3月10日 星期四

How to install Flex SDK 4.5(Hero)

0. download Flex SDK Hero from
http://opensource.adobe.com/wiki/display/flexsdk/Hero

0.1. Adobe Flex SDK == Open Source Flex SDK + Adobe Add-ons
0.2. Milestone Builds

1. Extract All files from the downloaed zip file.


2. FlashBuilder -> Project -> Properties -> Flex Library compiler
-> configure Flex SDKs ...
2.1 leave the Default SDK to Flex 4.1
2.2. use a specific SDK : Flex Hero




* Hero: Flex SDK 4.5
* Burrito: Flash Builder (after flex builder 3?)

How to import fxpl/fxp in FlashBuilder?

[Q] How to import fxpl(shared lib)/fxp in FlashBuilder?

[try]
File -> import Flex Project(FXP)

or

File ->import -> FlashBuilder project


[ref]
http://help.adobe.com/en_US/flashbuilder/using/WSbde04e3d3e6474c4ef5411412477fbf920-8000.html

2011年3月9日 星期三

Reproduce "Flex Test Drive: Build an application in an hour" for php on my website hosted at bluehost

I have spent more than 10 hours to reproduce Adobe's "Flex Test Drive: Build an application in an hour" for php on my website hosted at bluehost :

http://3hsite.info/flex/TestDrive/flex1-debug/flex1.html

partially because i'm a tyro in Flex;
partially because that i try to locate Flex application/service and Zend lib different from the default configuration.

To make the change of location work , i'd got to edit amf_config.ini, gateway.php and php.ini ...
after some try-and-errors and repeated reading the instructions in the references,
finally i got it.


* amf_config.ini :
web_root
zend_path

* gateway.php:
$webroot = $_SERVER['DOCUMENT_ROOT'];
$configfile = "$dir/amf_config.ini";
$zenddir = $webroot. '/zend/library'; //shd match zend_path in amf_config.ini

* php.ini:
include_path should contain zend_path in amf_config.ini




[ref]
http://www.adobe.com/devnet/flex/testdrive/articles/1_build_a_flex_app.html

http://www.adobe.com/devnet/flex/testdrive/articles/1_build_a_flex_app2.html

http://www.adobe.com/devnet/flex/testdrive/articles/1_build_a_flex_app3.html

http://www.adobe.com/devnet/flex/testdrive/articles/1_build_a_flex_app4.html

2011年3月8日 星期二

traditional chinese input in Ubuntu

[Q] How to input traditional chinese in Ubuntu?
[Q] 如何在Ubuntu 輸入繁體中文?


[try]
"scim-chewing" is recommended although iBus is the built-in input method in Ubuntu 10.04(lucid).

0. System -> Administration -> Language Support
Click on Install/Remove Language

1. sudo apt-get install scim-chewing

2. Change the keyboard type to the desired one(e.g. HanYu Pinyin) via SCIM setup



* iBus tonepy(pinyin + 4/5 tones) will crash when browsing the candidates from the dropdown list by arrow keys
* iBus tonepy list both simplified/traditional chinese chars which make selection difficult.

[ref]
https://launchpad.net/ubuntu/lucid/i386/scim-chewing

2011年3月3日 星期四

Ubuntu的多國語言支援

//===
System -> Administration -> Language Support
Click on Install/Remove Language

keyboard input method system: none, ibus, lo-gtk, th-gtk, scim(need manually install)

personally prefer scim for traditional chinese input


//===
[Q] how to view big5 file in ubuntu?

[try]
gedit, open with proper Character Encoding

2011年3月1日 星期二

sudo and gksudo

[Q] What's the difference between sudo and gksudo?

[digest]
"gksu is a frontend to su and gksudo is a frontend to sudo. Their
primary purpose is to run graphical commands that need root without
the need to run an X terminal emulator and using su directly."


"gksudo puts up a graphical password prompt, and won't mess up GUI logons when used to run graphical apps.
sudo is basically just a terminal version of gksudo. It doesn't understand X apps ..."


still confused???

--> example
"Using sudo with a graphical application does not work 100% of the time if you open an app using Alt-F2 for example if you if you press Alt-F2 and type: ... "

*** try "sudo synaptic" and "gksu synaptic"


"
There's absolutely no difference in Ubuntu because...
oli@bert:~$ ls -l /usr/bin/gksudo
lrwxrwxrwx 1 root root 4 2010-09-27 18:23 /usr/bin/gksudo -> gksu
...
"


[ref]
http://ubuntu-ky.ubuntuforums.org/showthread.php?t=1130412
http://ubuntuforums.org/archive/index.php/t-312823.html
https://lists.ubuntu.com/archives/ubuntu-studio-users/2007-September/000472.html
http://askubuntu.com/questions/21033/what-is-the-difference-between-gksudo-and-gksu

Create a new site for Apache in Ubuntu

0. sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite
1. gksudo gedit /etc/apache2/sites-available/mysite

examples:
change the DocumentRoot to point to the new location. For example, /home/user/public_html/
change the Directory directive, replace to
change the ErrorLog and CustomLog directives ...

1.0 create folder /home/user/public_html
1.1 cp /var/www/index.html /home/user/public_html/

2. sudo a2dissite default && sudo a2ensite mysite

3. sudo /etc/init.d/apache2 restart



[ref]
https://help.ubuntu.com/community/ApacheMySQLPHP

Start/stop apache in Ubuntu

[try]
sudo /etc/init.d/apache2 stop/start/restart
or
sudo /usr/sbin/apache2ctl stop/start/restart



[Symptom]
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

[try]
create a file named "fqdn" under directory /etc/apache2/conf.d/
by, for example,
sudo nano /etc/apache2/conf.d/fqdn

add "ServerName localhost" to the above newly created file



[ref]
http://ubuntuforums.org/showthread.php?t=364242
https://help.ubuntu.com/community/ApacheMySQLPHP

How to install LAMP in Ubuntu?

[Q] How to install LAMP(Linux-Apache-Mysql-Php) in Ubuntu?

[try]
sudo apt-get install tasksel
sudo tasksel install lamp-server


or
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server


[Q] What's tasksel?

[digest]
"
Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated "task" onto your system. ...
"

tasksel --list-task





[ref]
https://help.ubuntu.com/community/ApacheMySQLPHP
https://help.ubuntu.com/community/Tasksel