Buying ci-merchant () does not work

Im using the ci-merchant library in my PyroCMS module locally on my development WAMP server. (all work fine)

When I boot to my Linux test server, the purchase() function called does not work.

When it starts the pools for 5 minutes, I get the answer "I can’t connect to the host."

Php

 $params = array( 'amount' => 20, 'currency' => 'USD', 'return_url' => 'http://someurl.com/return/' 'cancel_url' => 'http://someurl.com/cancel/' ); $settings = array( 'test_mode' => TRUE, 'username' => 'PAYPAL_TEST_USERNAME' 'password' => 'MY_PAPAL_TEST_PASS' 'signature' => 'MY_PAYPAL_TEST_SIG' ); $this->load->library('merchant'); $this->merchant->load('paypal_express'); $this->merchant->initialize($settings); //this is where Im having the issue $response = $this->merchant->purchase($params); $message = $response->message(); 

When I echo $ message

 echo $message; //Outputs: couldn't connect to host" 

CURL - server settings

The following is a list of the differences in the CURL settings on the servers. Perhaps this is the problem. I do not think that these settings can be changed without compiling the curl, but I'm not sure.

Development server (WAMP server - status: operational)

 AsynchDNS : Yes CurlInfo : 7.21.7 GSS Neg : Yes IDN : No SSPI : Yes libSSH : libssh2/1.2.7 

Testing server (Linuxserver - status: does not work)

 AsynchDNS : No CurlInfo : 7.24.0 GSS Neg : No IDN : Yes SSPI : No libSSH : <<not listed>> 
+4
source share
1 answer

After much trial and error and some advice from friends, I found this to be the missing libSSH module.

Since then, I have moved my site from a public hosting company to a more reliable VPS hosting.

I installed the appropriate libraries and everything works fine.

I would recommend everyone who posted their sites to get away from any "shared" hosting companies. I just met very delayed support, and VPS Hosting is actually not much more than what I paid for VPS.

But you will need to know how to manage the server before you do this.

+2
source

Source: https://habr.com/ru/post/1498890/


All Articles