Guest User

Untitled

a guest
Oct 15th, 2022
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. <?php
  2.  
  3. $netahsilatAyarlari = get_option("woocommerce_netahsilat_settings");
  4.  
  5. if (substr(getenv("HTTP_HOST"), 0, 4) == "www.") {$domainadi = substr(getenv("HTTP_HOST"), 4);}else{$domainadi = getenv("HTTP_HOST");}$lisanskodu = md5($domainadi."Voww_n_eTahh_banks");$lisanskodu = base64_encode($lisanskodu);$lisanskodu = sha1($lisanskodu);$lisanskodu = base64_encode($lisanskodu);$lisanskodu = strtoupper(sha1($lisanskodu));if( $lisanskodu != $netahsilatAyarlari["lisanskodu"] ) {
  6.  
  7. $ErrorMessage = "Lisans kodu hatalı";
  8. $form = '<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">';
  9. $form .= '<ul class="woocommerce-error message-wrapper" role="alert">';
  10. $form .= '<li>';
  11. $form .= '<span class="message-icon icon-close"></span>';
  12. $form .= 'Hata: <strong>'.$ErrorMessage.'</strong>';
  13. $form .= '</li>';
  14. $form .= '</ul>';
  15. $form .= '</div>';
  16. echo $form;
  17. die();
  18.  
  19.  
  20. }
  21.  
  22. function TutarFormat($tutar){
  23. return number_format($tutar,2,".","");
  24. }
  25. function TutarYazdir($tutar){
  26. return number_format($tutar,2);
  27. }
  28.  
  29.  
  30. $binNumber = $_POST['binNumber'];
  31. $binNumber = substr($binNumber,0,6);
  32.  
  33. $orderid = $_POST['orderid'];
  34. $order = new WC_Order($orderid);
  35.  
  36. $Tutar = $order->get_total();
  37. $birim = "TL";
  38.  
  39. $client = new SoapClient($netahsilatAyarlari["ClientURL"]."/PWS/PaymentWebService.svc?singleWsdl");
  40. $AuthenticationInfo = new stdClass();
  41. $AuthenticationInfo->UserName = $netahsilatAyarlari["UserName"];
  42. $AuthenticationInfo->Password = $netahsilatAyarlari["Password"];
  43.  
  44. //$result = $client->GetPaymentSetList(array("authInfo"=>$AuthenticationInfo))->GetPaymentSetListResult;
  45. $result = $client->GetPaymentSetListBinNumber(array("authInfo"=>$AuthenticationInfo,"binNumber"=>$binNumber))->GetPaymentSetListBinNumberResult;
  46. $result = json_decode(json_encode($result), true);
  47.  
  48. // echo "<pre>";print_r($result);echo "</pre>";
  49.  
  50. $ErrorCode = $result["ErrorCode"];
  51. $ErrorMessage = $result["ErrorMessage"];
  52. ...............................................................
  53. .......................................
  54. ................
Add Comment
Please, Sign In to add comment