2012-11-29 2 views
3

저는 CI-Merchant를 Codeigniter 프로젝트에 통합하여 Paypal 및 SagePay로 결제 처리를하고 있습니다.CI-Merchant & SagePay - 아무 것도 응답 할 수없는 것 같습니다.

내가 paypal_express에 대한 http://ci-merchant.org/에서 데모를 수행하고 그 일 -

Merchant_response Object 
(
[_status:protected] => failed 
[_message:protected] => Security header is not valid 
[_reference:protected] => 
[_data:protected] => 
[_redirect_url:protected] => 
[_redirect_method:protected] => GET 
[_redirect_message:protected] => 
[_redirect_data:protected] => 
) 

I (또는 내가 예제 코드를 사용할 때 적어도 나에게 적절한 오류를 준 페이팔 코드로 응답 아래 참조) Sagepay를위한 코드를 업데이트

public function index() 
{ 
    $this->load->helper('language'); 
    $this->load->library('merchant'); 
    $this->merchant->load('sagepay_direct'); 

    $settings = array (
     'vendor' => 'testvendor', 
     'test_mode' => FALSE, 
     'simulator_mode' => TRUE, 
    ); 

    $this->merchant->initialize($settings); 

    $params = array(
     'description'=>'Test purchase', 
     'currency'=>'GBP', 
     'transaction_id'=>'12345', 
     'email'=>'[email protected]', 
     'first_name'=>'Test', 
     'last_name'=>'Person', 
     'address1'=>'1 Random Avenue', 
     'address2'=>'Made Up Drive', 
     'city'=>'Notarealcity', 
     'postcode'=>'FA11 1KE', 
     'country'=>'UK', 
     'region'=>'', 
     'phone'=>'0101010101', 

     'amount'=>125.00, 
     'card_no'=>'4444444444444444', 
     'name'=> 'Mr Test', 
     'card_type' => 'VISA', 
     'exp_month'=> 11, 
     'exp_year'=> 15, 
     'csc'=> 999 
    ); 

    $response = $this->merchant->purchase($params); 

    echo '<pre>'; 
    print_r($response); 
    exit; 
} 

다음 그 코드로부터 출력

Merchant_response Object 
(
[_status:protected] => failed 
[_message:protected] => 
[_reference:protected] => 
[_data:protected] => 
[_redirect_url:protected] => 
[_redirect_method:protected] => GET 
[_redirect_message:protected] => 
[_redirect_data:protected] => 
) 
012 그대로이다 한

무엇이 잘못되었을 지에 대한 어떤 정보도 제공하지 않습니다.

유효한 공급 업체 이름을 사용하고 있으며 SagePay 시뮬레이터에 서버의 IP 주소를 입력 했으므로 요청이 오는 페이지는 https이고 요청이 오는 URL은 Sage Pay 시뮬레이터 계정에 추가됩니다 섹션.

마치 가야 좋겠지 만 지금은 붙어 있습니다. 정말 이에 대한 도움을 주시면 감사하겠습니다. 사전에

감사

제이슨 페이팔 오류는 일반적으로 당신이 그 반대의 경우도 마찬가지 테스트 모드에서 라이브 계정을 사용하려고하거나하는 의미

+0

당신이 $setting 사용중인 버전에 올바른 매개 변수를 전달하지 않습니다? 스파크 또는 최신 마스터에서 설치 했습니까? 스파크는 약간 오래된 것입니다. –

+0

https://github.com/expressodev/ci-merchant/zipball/master에서 수동으로 설치 했으므로 https://github.com/centerax/codeigniter-sage-pay-direct로 전환했습니다. 이 프로젝트에 대한 Sage Pay가 필요합니다. Sparks를 통해 잘 설치된 것입니다. –

+0

어떻게이 문제를 해결 했습니까? 솔루션을 찾았습니까? 비슷한 문제가 있습니다. – IEnumerable

답변

0

.

Sagepay가 오류를 전혀보고하지 않는 이유를 모르겠습니다. 오류 메시지를 현지화하는 lang() 함수와 관련이있을 수 있지만 확실하지 않습니다. 실제 응답이 무엇인지 확인하려면 merchant_sagepay.php에 디버깅 줄을 추가해야 할 수도 있습니다.

+0

Adrian에게 시간을내어 주셔서 감사합니다. 다시 나에게 - 아마도 하나 이상의 지불 게이트웨이를 받아 들일 필요가있을 때마다 다른 것을 제공 할 것입니다. –

0

당신은 변수

$settings = array(
      'username' => 'API Merchants user name', 
      'password' => 'API Merchants passwrd', 
      'signature' => 'API Merchants signature', 
      'test_mode' => true);// for sand box its true else false 
     $this->merchant->initialize($settings); 
관련 문제