From: | Trurl McByte <trurl(at)anything3d(dot)com> |
---|---|
To: | Keary Suska <hierophant(at)pcisys(dot)net> |
Cc: | PgSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: PgSendMail, PgLinkPoint, PgMCK (CyberCash) joins |
Date: | 2001-10-25 09:22:00 |
Message-ID: | Pine.LNX.4.20.0110251155080.23575-100000@trurl.anything3d.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-announce pgsql-general |
On Wed, 24 Oct 2001 (Yesterday), Keary Suska wrote:
KS> Is there any documentation on PgMCK and how to use it? There appears to be
KS> nothing informative in the tarball or on SourceForge.
I'm don't have time for it...
usage: mck( OrderID, amount, pan, name, addr, city, state, zip, country, exp )
All fields is varchar.
Look some examples:
==========================================
SELECT mck(date_part('epoch',now()) || '12345', 'usd 34.95', '5555444455554442', 'Bill Clinton',
'1600 Pennsylvania Avenue', 'Washington', 'DC', '20500', 'USA', '12/02', 'mauthcapture');
==========================================
Advanced usage (really used for marketing):
==========================================
create view ccardv as select id, "card-number" as number, "card-name" as
name, "card-address" as address,
"card-city" as city, "card-state"::varchar as state, "card-zip" as zip,
"card-country" as country,
to_char("card-exp",'YY/MM')::varchar as exp from ccard where login = CURRENT_USER;
grant select on ccardv to group "Customer";
grant update on ccardpay_seq to group "Customer";
create function mck_pay(numeric(16,2),name) returns boolean as '
declare
IN_sum alias for $1;
IN_login alias for $2;
CCard record;
MCKorder varchar;
begin
if IN_sum <= 0 then
return ''t'';
end if;
MCKorder := nextval(''ccardpay_seq'');
for CCard in select * from ccardv2 where login = IN_login LOOP
if mck( MCKorder, (''usd '' || IN_sum::float8)::varchar,
CCard.number, CCard.name, CCard.address, CCard.city,
CCard.state, CCard.zip, CCard.country, CCard.exp,
''mauthcapture''::varchar) then
insert into credit_history values ((select id from "User" where
login = IN_login), now(),
(''Auto pile up a balance. MCK order #''::text ||
MCKorder::text), ''P'', IN_sum, ''AutoPilot Goga'');
return ''t'';
end if;
end loop;
return ''f'';
end;
' language 'plpgsql';
==========================================
KS>
KS> Keary Suska
KS> Esoteritech, Inc.
KS> "Leveraging Open Source for a better Internet"
KS>
KS> > From: Trurl McByte <trurl(at)anything3d(dot)com>
KS> > Reply-To: trurl(at)realtor3d(dot)odessa(dot)ua
KS> > Date: Wed, 24 Oct 2001 14:37:20 +0300 (EEST)
KS> > To: PgSQL General <pgsql-general(at)postgresql(dot)org>,
KS> > pgsql-announce(at)postgresql(dot)org
KS> > Subject: [GENERAL] PgSendMail, PgLinkPoint, PgMCK (CyberCash) joins
KS> > SourceForge...
KS> >
KS> >
KS> > PgSendMail, PgLinkPoint, PgMCK (CyberCash) joins SourceForge and avaible
KS> > such as subtasks of project CommBinder.
KS> > (http://sourceforge.net/projects/commbinder)
KS> >
KS> > You can download here from
KS> > http://sourceforge.net/project/showfiles.php?group_id=35804
KS> >
KS> > Bugs, patches, features requests ready welcome.
KS> >
--
Trurl McByte, Capt. of StasisCruiser "Prince"
[Team romantic *000*] [InterNIC: AR3200] [RIPE: AR1627-RIPE]
[Fingerprint16: 98 C3 78 8E 90 E3 01 35 87 1F 3F EF FD 6D 84 B3]
From | Date | Subject | |
---|---|---|---|
Next Message | Marc G. Fournier | 2001-11-01 14:56:17 | Server going down for several hours ... |
Previous Message | Keary Suska | 2001-10-24 15:46:59 | Re: PgSendMail, PgLinkPoint, PgMCK (CyberCash) joins |
From | Date | Subject | |
---|---|---|---|
Next Message | Johnny Predicto | 2001-10-25 10:33:15 | PostgreSQL & JDBC newbie question |
Previous Message | Arian Prins | 2001-10-25 08:40:30 | Re: Using PostgreSQL and Access? |