ePages 6.11.0 - DE_EPAGES/AvaTax/API/AvaTax.pm

Package DE_EPAGES::AvaTax::API::AvaTax

public API for AvaTax

Base
Exporter

Functions

IsAuthorized
NotifyShopOwner
Ping
UpdateTax
UseAvaTax
Validate

IsAuthorized

Tests Authorization for AvaTax Webservice

Syntax
IsAuthorized( $Service, $Account, $LicenseKey );
Input
$Service (string)
Webservice, one of AddressService, TaxService
$Account (string)
Account
$LicenseKey (string)
License Key
Return
$Result (object)
webservice result

NotifyShopOwner

Notfies shop owner of a problem

Syntax
NotifyShopOwner( $ErrorCode );
Input
$Shop (object)
Shop
$ErrorCode (string)
Error code

Ping

Tests Ping for AvaTax Webservice

Syntax
Ping( $Service, $Account, $LicenseKey );
Input
$Service (string)
Webservice, one of AddressService, TaxService
$Account (string)
Account
$LicenseKey (string)
License Key
Return
$Result (object)
webservice result

UpdateTax

calls GetTax for a lineitemcontainer and updates lineitemtax entries

Syntax
UpdateTax( $LineItemContainer );
Input
$LineItemContainer (object)
lineitem container

UseAvaTax

Check if we will use AvaTax for this order.

Syntax
UseAvaTax( $Shop, $hAddressInfo );
Input
$Shop (object)
shop
$hAddressInfo (ref.hash)
Address hash. used keys
  • CountryID - ISO CountryID
Return
$UseAvaTax (integer)
use code. Only use AvaTax if this is 1.
1 if AvaTax should be used.
-1 if LineItemClass does not match
-2 If TaxMethod does not match
-3 if Address Country does not match

Validate

Validates an address with AvaTax Address service The actual input values are taken from the Form element, if provided.

Syntax
Validate( $Address );
Input
$Shop (object)
Shop
$Address (object)
Address object
$Form (object)
form
Return
$Result (object)
Validation Result