00001
00002
00003
00004 #include "tclink.h"
00005
00006 #include <stdio.h>
00007 #include <stdlib.h>
00008 #include <string.h>
00009 #include <ctype.h>
00010
00011
00012
00013
00014 #define CUSTID "585200"
00015 #define PASSWORD "7glegCat"
00016
00017 int main()
00018 {
00019 char buf[1024];
00020
00021 TCLinkHandle handle = TCLinkCreate();
00022
00023 printf("Using TCLink version %s\n", TCLinkGetVersion(buf));
00024
00025 TCLinkPushParam(handle, "custid", CUSTID);
00026 TCLinkPushParam(handle, "password", PASSWORD);
00027 TCLinkPushParam(handle, "action", "sale");
00028 TCLinkPushParam(handle, "amount", "100");
00029 TCLinkPushParam(handle, "cc", "4111111111111111");
00030 TCLinkPushParam(handle, "exp", "0404");
00031
00032 TCLinkSend(handle);
00033
00034 printf("%s", TCLinkGetEntireResponse(handle, buf, sizeof(buf)));
00035
00036 return 0;
00037 }
00038