Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 523597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:28:44+00:00 2026-05-13T08:28:44+00:00

I had to take over a project where someone quit and need help understanding

  • 0

I had to take over a project where someone quit and need help understanding about how a type of gateway might work. It would be easy if I knew what gateway was used, but unfortunately we are unaware of what the plan was.

Can someone help me figure out how this actually communicates with a gateway? It seems to me like the code is sending itself the request?? Does this mean that the server is configured to handle the gateway request? With other gateways, like paypal, I’m used to just sending an HTTP request to their servers directly.

Are there types of gateways that reside on the host machine? Really confused here.

$payClientIP = "127.0.0.1";
$payClientPort = "9050";
$payClientSocket = -1;
$payClientTimeout = 5;

$payClientSocket = fsockopen($payClientIP, $payClientPort, $errno, $errstr, $payClientTimeout);        

function sendCommand($payClientSocket, $command) {

            global $payClientTimeout;
            socket_set_timeout($payClientSocket, $payClientTimeout);

            $buf = $command . "\n";
            $response = fputs($payClientSocket, $buf) == strlen($buf);    


        }

 sendCommand($payClientSocket, "7,CardSecurityCode,$cscValue");
 sendCommand($payClientSocket, "7,CardNum,$cardNumber");
 sendCommand($payClientSocket, "7,CardExp,$cardExpiry");
 sendCommand($payClientSocket,"6,$orderInfo,$merchantID,$amount,$locale");

What I’m trying to locate is the command to physically send the request, but I cannot find one. The code actually works and debits the card.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:28:44+00:00Added an answer on May 13, 2026 at 8:28 am

    You should probably check for a service application running with a listener on the local machine that’s actually doing the real work behind the scenes. There was a particular application that my team worked with once that required a similar setup, and we introduced a web service that turned around and fired the credit info to the vendor’s service.

    However, I wouldn’t see the advantage of this setup in the case of the service being hosted on the same machine as the calling web page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We had a discussion here at work regarding why fread() and fwrite() take a
I'd like the community's take on some thoughts I've had about Linq to Sql
I recently had to take a quick look at Adobe InDesign server. In this
Had an interesting discussion with some colleagues about the best scheduling strategies for realtime
I had been happily coding along on a decent sized solution (just over 13k
I had to delete all the rows from a log table that contained about
I'm relatively new to Flex however needed to take over maintenance and development of
Had a coworker ask me this, and in my brain befuddled state I didn't
I had used Server Explorer and related tools for graphical database development with Microsoft
I had a discussion with some colleagues mentioning that there are not too many

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.