Day: February 22, 2009

  • Format date in merge field

    Formating date correctly is one of the troublesome work in all computer languages because remembering how to format is difficult.

    In Microsoft Word, the formatting process is –

    1. Press Alt+F9 to show the merge field code
    2. Add the format string to {MERGEFIELD mydate }
    3. The code looks like {MERGEFIELD mydate \@ “dd/MM/yyyy” }
  • I can’t find a way to assign two handlers to a script

    这可能是一个不可能实现的任务。

    Actinic 的动态部分是 perl 写的,我不想触及 perl,陆陆续续做了很多 extensions,都是 php 写的。Actinic perl 有很多漏洞,其中一个就是会把我的 php 源码暴露。可能 Actinic 的目标用户都是 htmler,根本没指望 phper 会给它写 extensions(我也是没办法,早就不想干了)。我能做的,就是尽可能地调整 php 的代码方式,做到即使源码暴露了,也不包含机要信息。

    我也不打算在 Actinic 浪费时间去研究怎么修改漏洞,只是最近把 apache module 研究了一遍,突然想重提这个历史遗留问题是否可以从 apache 方面给予弥补。漏洞的源头是 Actinic perl 读入我的 php script,当成 html 直接输出。如果能把 handler 再交给 php-cgi,那么 php tag 之间的内容就可以得到解析。

    可是 apache 是以后缀推定 handler 的,那么某个后缀怎么可以有两个 cgi handlers?

  • PSP hidden fees

    我们公司用着 PayPal。PayPal 问题很多,但我认为它仍不失为最好的 PSP (或者说最适合的)。

    我老板不这么认为,他认为 PayPal 给顾客付款带来很多障碍(主要是限制已注册信用卡单独付款)。我认为这种限制是必要的,PayPal 不只是 PSP 产品,它要做 Express Checkout,它要给 seller protection (同时也给buyer protection),它必须改变常规信用卡付款的逻辑过程。

    很多顾客不认可这种逻辑,也有顾客根本就反感 PayPal (总有些人在 PayPal 或 ebay 上有过失望或绝望的体验),导致我们最终决定换一个 PSP。如果当初走上 PayPal 算是我积极推荐的话,这次选择新的 PSP 我不想过多参与了。

    最后选了个 Protx,因为它的收费太诱人了,每季度1000笔交易以下月费£20,以上10p每笔(似乎Protx的定价模型有问题,交易越多单笔交易反而更贵?不过我不去深究 Protx)。网上对 Protx 的评论都是正面的,我主要关心是否有 hidden fees,没见 Protx 负面报导。

    于是老板着手落实。很快他就发现还有一个 IMA (internet merchant account) 费用没在 Protx 计算在内。这是一个灰色地带,因为我了解的 PSP 除了 PayPal 就是 WorldPay,它们都不牵涉 IMA(或者说它们本身就是 IMA),所以我是第一次听说从 PSP withdraw money to bank account,不一定是全额入帐。

    PayPal 和 WorldPay settlement 都是全额入帐(小金额除外),Protx 就不是,中途还要扣掉按笔次数或金额百分比交易费。因为 settlement fees 不是 Protx 赚去,所以也不能说 Protx 有 hidden fees。PayPal 和 WorldPay 都是要收 transaction fees 的,Protx 不收 transaction fees 并不意味着它就是最便宜的 PSP。当初我初识 Protx 时觉得它异常便宜,一直想不通 Protx how to cover credit card fees charged by credit card companies,如今想通了,该交的是逃不掉的。

  • I can’t find a way to group releted transactions in PayPal history download

    I have tried all formats of PayPal Download History, and found “Comma Delimited – All Activity” is the most comprehensive one. I send it as an attachment for your review. My problem with this history is – every transaction has a different Transaction ID, it is not give me enough information to group related transactions. Basically, it is missing a column Parent Transation ID (or call it Related Transaction ID, whatever).

    Some virtual terminal transactions have an update transaction, some don’t (depends on whether AVS matches). I can’t use any ID number to trace a update transaction back to its parent transaction ID, so I might calculate one transaction twice.

    PayPal should improve its data download format. At least, it should provide an extra column of “Parent Transaction ID” (indicate its parent transaction if any), or “Unique Tranaction ID” (all related transactions have a unique transaction ID) for me to group related transactions.