Committer: nnikulochkina
LJSUP-13345: Error when run worker pay-blockingU trunk/cgi-bin/LJ/Pay/Payment.pm
Modified: trunk/cgi-bin/LJ/Pay/Payment.pm =================================================================== --- trunk/cgi-bin/LJ/Pay/Payment.pm 2012-08-20 08:25:44 UTC (rev 12495) +++ trunk/cgi-bin/LJ/Pay/Payment.pm 2012-08-20 10:11:40 UTC (rev 12496) @@ -541,8 +541,12 @@ ) or return undef; - $cartobj->payvar_append("creator_ip", LJ::get_remote_ip()); + # local IP 127.0.0.1 indicates that cart was created in non-web context + # (for example, from worker) + my $creator_ip = LJ::get_remote_ip() || '127.0.0.1'; + $cartobj->payvar_append("creator_ip", $creator_ip); + return $cartobj; }