Call PHP from Ruby and get response -


i've got open source charity website built in ruby on rails , we're trying integrate payment validation system , 1 exists in php - trying find if there way these 2 play nice together?

can call php script ruby , have ruby read echo'd response etc?

yes can done using system calls such

def your_method(path,file)   system("cd #{path} && #{file} ") end 

btw, know there io class input/output , 1 of fundamental method command is

def popen(cmd)         open3.popen3(cmd) {|stdin, stdout, stderr, wait_thr|           exit_status = wait_thr.value           if (exit_status !=0)             raise commanderror, "something went wrong" // supposing customize class //command < standarderror ; end           end         }       end 

on antoher side, if both codes runs on different codes, of course possible "apize" rails app, in order fetch , pull data


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -