2012-03-25 12 views
-1

Codeigniter http://codeigniter.com/wiki/Curl_libraryのcurlライブラリを使用してマーチャントに接続する機能を実装しました。私は実装を完了し、すべてが完璧に働いた。しかし、アプリケーションをローカルサーバーに移しました。新規インストール: のUbuntu Serverの11.10 のPHP 3.5.6 MySQLの5.1 のApache 2サーバー変更後にCodeigniter Curlライブラリが機能しない

私は静的IP設定を使用していると私は、インターネットに接続することができます。 端末の使用私はgoogle、yahooなどのようなサイトをpingすることができますが、Ping www.veripayment.comは使用できません。私は同じネットワーク内の他のコンピュータからウェブサイトを開くことができます。しかし私のubuntuサーバーは傾けません。

弊社のサーバーではこの機能にご注意ください。

<?php 
    $post_str = "action=payment&business=" 
    .urlencode($this->input->post('business')) 
    ."&vericode=".urlencode($this->input->post('vericode')) 
    ."&item_name=".urlencode($this->input->post('item_name')) 
    ."&item_code=".urlencode($this->input->post('item_code')) 
    ."&quantity=".urlencode($this->input->post('quantity')) 
    ."&amount=".urlencode($this->input->post('amount')) 
    ."&cc_type=".urlencode($this->input->post('cc_type')) 
    ."&cc_number=".urlencode($this->input->post('cc_number')) 
    ."&cc_expdate=".urlencode($this->input->post('cc_expdate_year')).urlencode($this->input->post('cc_expdate_month')) 
    ."&cc_security_code=".urlencode($this->input->post('cc_security_code')) 
    ."&shipment=".urlencode($this->input->post('shipment')) 
    ."&first_name=".urlencode($this->input->post('first_name')) 
    ."&last_name=".urlencode($this->input->post('last_name')) 
    ."&address=".urlencode($this->input->post('address')) 
    ."&city=".urlencode($this->input->post('city')) 
    ."&state_or_province=".urlencode($this->input->post('state_or_province')) 
    ."&zip_or_postal_code=".urlencode($this->input->post('zip_or_postal_code')) 
    ."&country=".urlencode($this->input->post('country')) 
    ."&shipping_address=".urlencode($this->input->post('shipping_address')) 
    ."&shipping_city=".urlencode($this->input->post('shipping_city')) 
    ."&shipping_state_or_province=".urlencode($this->input->post('shipping_state_or_province')) 
    ."&shipping_zip_or_postal_code=".urlencode($this->input->post('shipping_zip_or_postal_code')) 
    ."&shipping_country=".urlencode($this->input->post('shipping_country')) 
    ."&phone=".urlencode($this->input->post('phone')) 
    ."&email=".urlencode($this->input->post('email')) 
    ."&ip_address=".urlencode($this->input->post('ip_address')) 
    ."&website_unique_id=".urlencode($this->input->post('website_unique_id')); 

    // Send URL string via CURL 
    $backendUrl = "https://www.veripayment.com/integration/index.php"; 
    $this->curl->create($backendUrl); 
    $this->curl->post($post_str); 
    $return = $this->curl->execute(); 

    $result = array(); 
    // Explode array where blanks are found 
    $resparray = explode(' ', $return); 

    if ($resparray) 
    { 
     // save results into an array 
     foreach ($resparray as $resp) { 
      $keyvalue = explode('=', $resp); 
      if(isset($keyvalue[1])){ 
       $result[$keyvalue[0]] = str_replace('"', '', $keyvalue[1]); 
      } 
     } 
    } 
    return $result; 
?> 
+0

何が問題なのですか? –

+0

ありがとう、@hakre。 – Will

答えて

0

ping応答コードとは何ですか?

ローカールをそうしてみてください。 エラーログで可能な解決策を確認してください。