Tuesday, November 29, 2011

ftp Based Banking API Integrations

Lots of financial organizations use ftp as the mean of money transferring gateway to reduce remittance cost. Usually they have a ftp server to which their clients have different user credential to get access. At least two different directories remain as default in every user's ftp directory named as "In" and "Out". Some of these money transferring agencies have their own format of text for getting order of financial activity, some of them doesn't have any, but they usually make contact with their client for understanding each other. For executing a money transfer or any other financial activity client should get access to the ftp directory and add a text order file in ftp "In" directory. Companies simultaneously checks every client's ftp "In" directories for checking new orders manually or automatically and if they find any new file, then they starts to execute the order.

Every text order file has a portion where it saves the current status of the execution of the order. For a new order client keep the status as "Pending" or "0:Pending". When the financial organization, to which this order came, receives the order and starts to execute they changes the status as "Processing" or something like that. After the completion of the order, they copy the file and saves it to ftp "Out" directory with status changed to "Successfully transferred" or something like that.

The client also simultaneously checks the ftp "Out" directory for knowing if the order is completed. They check files manually or by their server's CRON job of script which automatically checks the ftp directory. When they find a new text file at "Out" directory, they checks relevant order text files name to check which order is completed. Ordered organization usually keeps the name same to the text "order" file when they completes the specific order and save a completion text file to "Out" folder.

Please See Also:


1. How to create Text File using PHP
2. How to upload a file to ftp directory using PHP

This is the rough procedure of ftp based banking. I will share some codes that is needed to configure a ftp based banking API integration to a client's system next.

No comments:

Post a Comment