使用EU Vat处理的微支付支付处理器

时间:2014-10-27 07:23:20

标签: paypal payment-gateway mobile-application payment-processing

目前,我正在使用PayPal IPN处理带有本地托管网站商店的移动应用程序的小额付款(1欧元到7欧元)。这些超出应用程序商店销售额产生的金额不是很高,但它是我的客户的服务。从2015年1月1日开始,新法律根据每个当地欧洲国家的增值税税率强制进行增值税计算和支付。

现在我正在寻找处理增值税收费的支付处理商。我已经检查了Digitalriver产品和Fastspring,但两者都有最低的交易费用,这大大降低了销售价格。

是否有其他支付增值税的付款处理商更适合微支付?

此致

1 个答案:

答案 0 :(得分:1)

如果它对您或其他人有帮助,这里有一些PHP代码,您可以根据其IP地址计算访问者的欧盟成员国增值税税率

显然,使用风险自负。增值税税率在发布时是正确的,但将来可能会发生变化。在有争议的情况下,立法要求两个证据证明正确的国家。您可以使用下面的代码作为一个证据,但您可能需要另一个。

function getIPAddress()
{
    $ret = "";
    if (isset($_SERVER['HTTP_CLIENT_IP']))
        $ret = $_SERVER['HTTP_CLIENT_IP'];

    if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
        $ret = $_SERVER['HTTP_X_FORWARDED_FOR'];
    else
        $ret = $_SERVER['REMOTE_ADDR'];
    return $ret;
}

function getVatRateFromIpCountryCode()
{
    // Work out IP address and country code
    $remote_addr = getIPAddress();
    $xml = simplexml_load_file("http://www.geoplugin.net/xml.gp?ip=".$remote_addr); // don't do more than 120 lookups in a minute or you'll get blacklisted for an hour
    $countryCode = $xml->geoplugin_countryCode;
    //$countryCode = "LU";  // test force contryCode

    // see http://ec.europa.eu/taxation_customs/resources/documents/taxation/vat/how_vat_works/rates/vat_rates_en.pdf for current EU VAT rates
    $vat_percentage = 0;
    switch ( $countryCode )
    {
    case "EU":      $vat_percentage = 20;   break;  // unknown EU country
    case "BE":      $vat_percentage = 21;   break;  // Belgium
    case "BG":      $vat_percentage = 20;   break;  // Bulgaria
    case "CZ":      $vat_percentage = 21;   break;  // Czech Republic
    case "DK":      $vat_percentage = 25;   break;  // Denmark
    case "DE":      $vat_percentage = 19;   break;  // Germany
    case "EE":      $vat_percentage = 20;   break;  // Estonia
    case "EL":
    case "GR":      $vat_percentage = 23;   break;  // Greece
    case "ES":      $vat_percentage = 21;   break;  // Spain
    case "FR":      $vat_percentage = 20;   break;  // France
    case "HR":      $vat_percentage = 25;   break;  // Croatia
    case "IE":      $vat_percentage = 23;   break;  // Ireland
    case "IT":      $vat_percentage = 22;   break;  // Italy
    case "CY":      $vat_percentage = 19;   break;  // Cyprus
    case "LV":      $vat_percentage = 21;   break;  // Latvia
    case "LT":      $vat_percentage = 21;   break;  // Lithuania
    case "LU":      $vat_percentage = 15;   break;  // Luxembourg
    case "HU":      $vat_percentage = 27;   break;  // Hungary
    case "MT":      $vat_percentage = 18;   break;  // Malta
    case "NL":      $vat_percentage = 21;   break;  // Netherlands
    case "AT":      $vat_percentage = 20;   break;  // Austria
    case "PL":      $vat_percentage = 23;   break;  // Poland
    case "PT":      $vat_percentage = 23;   break;  // Portugal
    case "RO":      $vat_percentage = 24;   break;  // Romania
    case "SI":      $vat_percentage = 22;   break;  // Solvenia
    case "SK":      $vat_percentage = 20;   break;  // Slovakia
    case "FI":      $vat_percentage = 24;   break;  // Finland
    case "SE":      $vat_percentage = 25;   break;  // Sweden
    case "UK":
    case "GB":      $vat_percentage = 20;   break;  // United Kingdom
    default:        break;
    }
    //echo "countryCode = '$countryCode', vat_percentage = $vat_percentage<BR>";    // debugging
    return $vat_percentage/100;
}