| 1 |
Write a script or program, for example using PERL, PHP or Visual Basic, that will
create text consisting of two lines in the following format:
HISTORY<TAB><holding_number><TAB><passphrase><TAB><reference_number>
<currency_code><TAB><display_date_from><TAB><display_date_to><TAB><memo_contains>
where:
- HISTORY = the name of the service being requested (HISTORY indicates a Holding history);
- <currency_code> = the currency (metal) that you want to obtain a history for -
use 0 (zero) for goldgrams or 1000 for silver ounces;
- <display_date_from> = the start date from when you want to obtain the history;
- <display_date_to> = the end date until when you want to obtain the history;
- <memo_contains> = any text based on which you want to filter the history (optional);
- <TAB> = the TAB character (ASCII 0x09).
|
| 2 |
Programmatically submit the text, as an HTML form field using the HTTP POST method,
to the following URL:
https://secure.goldmoney.com/user/auto.php
Prior to submission, you must also explicitly set/override the Content-Type field
in the HTTP header to application/x-www-form-urlencoded. Various libraries exist
that enable you to programmatically send HTTP messages and override HTTP headers, for
example cURL (Linux) and MSINET (Microsoft). Depending on which library you use, you
may need to explicitly construct the entire HTTP message header in your program
(you do not need to do this when using cURL or MSINET).
Furthermore, the name of the HTML form field that contains the populated template must
be set to either GM_AUTO or to gm_auto.
|
| 3 |
Interpret the result that is returned by the GoldMoney system. Your script
or program should be written so that it can identify errors as follows:
If the response does not contain a set of <pre> </pre> tags,
then a serious error occurred such as an HTTP timeout or an authentication error.
Alternatively, if the response contains a set of <pre> </pre> tags,
then an error will be indicated by an [ERROR] tag. A description of the error will follow the [ERROR] tag.
The GoldMoney system will attempt to execute each payment contained in the request (regardless of whether a previous payment
failed, if any). The response will indicate, for each payment, whether it was successful or not.
|
|