Paypal Inconsistent Ipn

Can somebody explain me these github instructions?

http://forum.cs-cart.com/tracker/issue-6489-436-inconsistent-ipn/

https://gist.github.com/torunar/1113834bdf44ca72183d18b93a87aa01

Cannot understand second step, to fit code below

			}
	
			}
	

}

but there are at least few places with such part of code.. Does this git indicate what line to start from ?

Can somebody explain me these github instructions?

http://forum.cs-cart.com/tracker/issue-6489-436-inconsistent-ipn/

https://gist.github.com/torunar/1113834bdf44ca72183d18b93a87aa01

Cannot understand second step, to fit code below

} }

}

but there are at least few places with such part of code.. Does this git indicate what line to start from ?

the red means DELETE or REMOVE these lines, green is new changes dude.

Simple to follow :-)

e.g.

app/addons/paypal/controllers/common/payment_notification.post.php

-            unset($_REQUEST['dispatch']);
-            
-            $result = '';
-            $_REQUEST['cmd'] = '_notify-validate';
-            $data = array_merge(array('cmd' => '_notify-validate'), $_REQUEST);
-            //the txn_type variable absent in case of refund
-            if (isset($data['txn_type']) && in_array($data['txn_type'], array('cart', 'express_checkout', 'web_accept')) || !isset($data['txn_type'])) {
-                $order_ids = fn_pp_get_ipn_order_ids($data);
-                $mode = fn_pp_get_mode(reset($order_ids));
-                $url = ($mode == 'test') ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';
-                $result = Http::post($url, $data);
-            }
  •        list($result, $order_ids, $data) = fn_pp_validate_ipn_payload($_REQUEST);
    

The - means delete. If you grab the code from this page you'll not be adding the + or - in your code. Just the code like this:

 if ($_SERVER['REQUEST_METHOD'] == 'POST') {
     if ($mode == 'paypal_ipn') {
         if (!empty($_REQUEST['custom'])) {
        list($result, $order_ids, $data) = fn_pp_validate_ipn_payload($_REQUEST);

         if ($result == 'VERIFIED') {
             fn_define('ORDER_MANAGEMENT', true);
             foreach($order_ids as $order_id) {
                 fn_process_paypal_ipn($order_id, $data);
                // unlock order after processing IPN
                fn_pp_set_orders_lock($order_id, false);
             }
         }
     }

Makes sense?

but there are at least few places with such part of code.. Does this git indicate what line to start from ?

@@ -20,23 +20,15 @@

This part indicates the line and deletion points.

My question is not about gits in general but about /app/addons/paypal/func.php

Original func.php does not even have 1078 lines..

My question is not about gits in general but about /app/addons/paypal/func.php

Original func.php does not even have 1078 lines..

im also unable to find that function fn_paypal_user_init

My question is not about gits in general but about /app/addons/paypal/func.php

Original func.php does not even have 1078 lines..

Try to add all the new functions (all in green) to your file at the end of the func.php on your file. It should work but not 100% tested here yet myself.

As per instruction indications are to add below

         }
     }
}

not end..

in revision file its changed not to below but to add

+         }
+     }
+ }

but what does it close then?

In bugtracker its said fixed in 4.5.1 CS-Cart (Development) but according to

http://forum.cs-cart.com/tracker/issue-6489-436-inconsistent-ipn/

instructions are for 44x

As per instruction indications are to add below

         }
     }
}

not end..

in revision file its changed not to below but to add

+         }
+     }
+ }

but what does it close then?

In bugtracker its said fixed in 4.5.1 CS-Cart (Development) but according to

http://forum.cs-cart.com/tracker/issue-6489-436-inconsistent-ipn/

instructions are for 44x

Some code is not the same as their example in my core installation so I'd ask in the gist page for more info.