OpenGamePanel / Module-Simple-billing

2 stars 5 forks source link

robokassa #12

Closed geepis closed 7 months ago

geepis commented 4 years ago

The client enters the amount of replenishment of the account it throws to the ROBOKASSA service the Client chooses a convenient payment method and pays for it. On my email comes a notification of receipt of funds to my account also receive money Surprised the client does not see his money in his account and the server is not installed

Zorrototo commented 4 years ago

As far as I know nobody supports this module. It is an old legacy module. Very little chance to see any change to this module to fix the potential issues. Maybe I'm wrong but you better use the WHMCS mod for OGP, this one is more recent, but needs the external WHMCS billing platform.

Also I'm not sure what your issue is.. Maybe make sure what you wrote really says what you mean, maybe get some help because it seems like a google translation.

geepis commented 4 years ago

robokassa-ipn_errors.log

[02-Oct-2019 18:22:02 Europe/Moscow] PHP Notice: Undefined variable: cart_id in /var/www/html/modules/simple-billing/robokassa-ipn.php on line 88 [02-Oct-2019 18:22:02 Europe/Moscow] PHP Notice: Undefined variable: cart_id in /var/www/html/modules/simple-billing/robokassa-ipn.php on line 92 [02-Oct-2019 18:22:02 Europe/Moscow] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/modules/simple-billing/robokassa-ipn.php on line 94 [02-Oct-2019 18:22:02 Europe/Moscow] PHP Notice: Trying to get property of non-object in /var/www/html/includes/functions.php on line 358 [02-Oct-2019 18:22:02 Europe/Moscow] PHP Warning: mb_strlen(): Unknown encoding "" in /var/www/html/includes/PHPMailer/class.phpmailer.php on line 2833 [02-Oct-2019 18:22:02 Europe/Moscow] PHP Warning: mb_strlen(): Unknown encoding "" in /var/www/html/includes/PHPMailer/class.phpmailer.php on line 2868 [02-Oct-2019 18:22:02 Europe/Moscow] PHP Warning: mb_strlen(): Unknown encoding "" in /var/www/html/includes/PHPMailer/class.phpmailer.php on line 2833 [02-Oct-2019 18:22:02 Europe/Moscow] PHP Warning: mb_strlen(): Unknown encoding "" in /var/www/html/includes/PHPMailer/class.phpmailer.php on line 2868

geepis commented 4 years ago

I did not change anything in the code, only in the settings of the panel itself . robokassa-ipn.php . .

  1. // Here you can do whatever you want with the variables, for instance inserting or updating data 81. into your Database
  2. $user_homes = $db->resultQuery( "SELECT *
  3. FROM OGP_DB_PREFIXbilling_carts AS cart
  4. JOIN
  5. OGP_DB_PREFIXbilling_orders AS orders
  6. ON
  7. orders.cart_id=cart.cart_id
  8. WHERE cart.cart_id=".$db->realEscapeSingle($cart_id));
  9. $query = "UPDATE " . $table_prefix . "billing_carts
  10. SET paid=1
  11. WHERE cart_id=".$db->realEscapeSingle($cart_id);
  12. foreach($user_homes as $user_home)
  13. {
  14. if($user_home['home_id'] != 0)
  15. { . . functions.php . .
  16. foreach ( $email_addresses as $address )
  17. {
  18. $mail->AddAddress($address);
  19. }
  20. $mail->SetFrom($panel_email,$panel_name);
  21. $mail->AddReplyTo($panel_email,$panel_name);
  22. } . . class.phpmailer.php . . .
  23. public function hasMultiBytes($str)
  24. {
  25. if (function_exists('mb_strlen')) {
  26. return (strlen($str) > mb_strlen($str, $this->CharSet));
  27. } else { // Assume no multibytes (we can't handle without mbstring functions anyway)
  28. return false;
  29. }
  30. } . . .
  31. $start = '=?' . $this->CharSet . '?B?';
  32. $end = '?=';
  33. $encoded = '';
  34. if ($linebreak === null) {
  35. $linebreak = $this->LE;
  36. }
  37. $mb_length = mb_strlen($str, $this->CharSet);
  38. // Each line must have length <= 75, including $start and $end
  39. $length = 75 - strlen($start) - strlen($end);
  40. // Average multi-byte ratio
  41. $ratio = $mb_length / strlen($str);
  42. // Base64 has a 4:3 ratio
  43. $avgLength = floor($length $ratio .75); . . . I will be glad of any help , I just started to learn php and it is difficult for me to understand what needs to be corrected here . debian 9 php version 7.0.33. I will be glad of any help
own3mall commented 7 months ago

Agreed, I fixed some minor issues recently, but this module really probably shouldn't be used, and I have no idea if it works properly.