/    Sign up×
Community /Pin to ProfileBookmark

running an executable file using php

Hi,

I am integrating my website with HSBC payment transaction system. I did my test transaction manually and it was succesful. I am trying to replicate this live but I am having problems. The step I need help with, is How can I run an executable file using php?

here are the details of what I am trying to achieve:

1) I have a script that submits values to a file called TestHash.e which takes these values and generate an order hash.

Here is my script (the file is called testme):

[code=php]
./TestHash.e “IYQTxxxxxxxxxxxxxxxxxxxxxxxxxxxx” “UKxxxxxxxxGBP” “1184609452210” “./confirm2.php” “./confirm2.php” “3409423743” “testorderm” “3499” “826” “Auth” “some data” “T” “Testuser10” “Jo” “Blog” “22 Clifton Road” “Here” “Glasgow” “G11 2NP” “826” “[email protected]” “Jo” “Blog” “22 Clifton Road” “Here” “Glasgow” “G11 2NP” “826”[/code]

2) For testing I ran this file from the linux shell.

[code=php]bash testme[/code]

This generates an order hash value for this user which I take and submit in an html form along with the other data (the store ID, customer name, address etc. all the values that i included in the testme file). The form posts the values to HSBC payment system for payment, validation etc.

NOW, I would like to go live and HSBC have not being helpful. I am stuck on how to submit the user values as well as the HSBC values (store id, etc) to the testme file (which runs testhash.e) using php. OR, may be directly submitting the values and running the Testhash.e from within my code without having to use the testme file.

I would really appreciate your help.

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@ellisglJul 31.2007 — See passthru()

This will execute a command and return the output of the executed script.

You will have to parse the output thou.
×

Success!

Help @meme spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...