• 25-11-2020, 21:05:44
    #1
    merhaba arkadaşlar,

    aşağıda weepay in api ile bağlamaya çalıştım. bayiliğim apim herşeyim var. ama kendi kartımla deneme yapıyorum aşşağıdaki yerleri manüel doldurup
    <?php
    $weepayArray['Auth'] = array(
        'bayiId' => "xxxx",
        'apiKey' => "xxxx",
        'secretKey' => "xxx"
    );
    $weepayArray['Data'] = array(  
      "orderId" => 1,  
      "currency" => "TL",     
    "locale" => "tr",    "paidPrice" => "0.15",  
       "ipAddress" => "192.168.1.1",   
      "cardHolderName" => "isim soy isim",  
      "cardNumber" => 1234567891234654546, // Kart Numarası  
      "expireMonth" => 04, // Son Kullanım Ay   
     "expireYear" => 20, // Son Kullanım Yıl 
       "cvcNumber" => 852,// Kart CVC   
     "installmentNumber" => 1, // Uygulanacak Taksit Sayısı  
      "description" => "Açıkalama", // Açıklama
        "callBackUrl" => "https://localhost/kartservis/post-calback.php"// Response URL
    );$weepayArray['Customer'] = array(   
     "customerId" => "2", // alıcı müşteri Id
         "customerName" => "isim", //alıcı ismi 
        "customerSurname" => "soyisim", // alıcı Soyismi  
      "gsmNumber" => "5005005050",// alıcı cep telefonu  
      "email" => "info@gmail.com", // alıcı mail  
      "identityNumber" => "11111111111", // alıcı TC kimlik numarası
         "city" => "istanbul",// alıcı  şehir   
      "country" => "Turkey" // alıcı ülke
    );
    $weepayArray['BillingAddress'] = array( 
           "contactName" => "isim soyisim",    
        "address" => "Abdurrahman Nafiz Gürman,Mh, G. Ali Rıza Gürcan Cd. No:27", 
           "city" => "istanbul",    
        "country" => "turkey",    
        "zipCode" => 34164
    );
    $weepayArray['ShippingAddress'] = array(   
     "contactName" => "isim soyisim",
        "address" => "Abdurrahman Nafiz Gürman,Mh, G. Ali Rıza Gürcan Cd. No:27",  
      "city" => "istanbul",  
      "country" => "turkey",  
      "zipCode" => 34164);$weepayArray['Products'][0] = array( 
       'productId' => 1, 
       'name' => "başka bir ürün",  
      'productPrice' => 1.0,  
      'itemTypee' => "VIRTUAL"
    );
    $endPointUrl = "https://api.weepay.co/Payment/PaymentRequestThreeD";
    
    
    $payload = json_encode($weepayArray);
    $ch = curl_init($endPointUrl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLINFO_HEADER_OUT, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($payload)));
    $response = json_decode(curl_exec($ch), true);
    curl_close($ch);
    if ($response["status"] == "Success") {    print_r($response);
    }else{
        print_r($response);}
    karşıma şöyle bir hata çıkartıyor neden acaba ?

    Array (    [status] => failure    [message] => Gönderdiğiniz bilgilerin doğruluğunu kontrol edin.    [errorCode] => 1001 )
  • 25-11-2020, 21:19:56
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    https://github.com/weepay/weepay-php
    Bunu kullanırsan daha sağlıklı sonuç alırsın.
  • 25-11-2020, 21:20:54
    #3
    burakyildizk adlı üyeden alıntı: mesajı görüntüle
    https://github.com/weepay/weepay-php
    Bunu kullanırsan daha sağlıklı sonuç alırsın.
    hocam buda çalışmıyor onuda denedim.