} } if (is_discountable(calculate_total()) != 0 && !isset($vset)) { $discount = is_discountable(calculate_total()) / 100; $value = number_format(round($value - $value * $discount, 2), 2); } } if (sizeof($stateList) > 0 && ($name == 'state' || $name == 'ship_state')) { if ($value != '') { $value = $eshopstatelist[$value]; } } $p->add_field($name, $value); } if ($eshopoptions['status'] != 'live' && is_user_logged_in() && current_user_can('eShop_admin') || $eshopoptions['status'] == 'live') { $echoit .= $p->submit_webtopay_post(); // submit the fields to webtopay //$p->dump_fields(); // for debugging, output a table of all the fields } break; case 'webtopayipn': // webtopay server calling for paymen. confirm //- SS2 check! Calling webtopay server or not - function getCert($cert = null) { $fp = fsockopen("downloads.webtopay.com", 80, $errno, $errstr, 30); if (!$fp) { exit(__("Cert error: {$errstr} ({$errno})<br />\n", 'eshop')); } else { $out = "GET /download/" . $cert . " HTTP/1.1\r\n"; $out .= "Host: downloads.webtopay.com\r\n";