How does donation API deal with international billing addresses?

Options

I am using the Donate API and I don't see anything obvious about donors with international addresses. It seems like address, city, state and zip are required. Those fields as we now are specific to US addresses. Anyone else gotten around this?

Tagged:

Comments

  • Address, City, and ZIP/Postal Code should be present in any address. For State, Convio forms present an option of "None" for international donors. I recently tackled this problem on a form using the API with a little jQuery function that onchange sets State to None for any country which should have no value for state, and hides the State dropdown from the donor (and also sets State for those countries that really only have one possible value).



    function donAPIFormSetState(){
    var donorCountry=$('#donAPIForm-country').val();
    var countriesWithStates=new Array('','American Samoa','Micronesia','Guam (USA)','Marshall Islands','Northern Mariana Islands','Puerto Rico','Palau','Virgin Islands (British)','Virgin Islands (USA)','United States','Canada');
    if($.inArray(donorCountry,countriesWithStates)!=-1){
    $('#donAPIForm-donorInfo-state').css({visibility:'visible'});
    if($('#donAPIForm-state').val()=='None')
    $('#donAPIForm-state').val('');
    if(donorCountry=='American Samoa')
    $('#donAPIForm-state').val('AS');
    else if(donorCountry=='Micronesia')
    $('#donAPIForm-state').val('FM');
    else if(donorCountry=='Guam (USA)')
    $('#donAPIForm-state').val('GU');
    else if(donorCountry=='Marshall Islands')
    $('#donAPIForm-state').val('MH');
    else if(donorCountry=='Northern Mariana Islands')
    $('#donAPIForm-state').val('MP');
    else if(donorCountry=='Puerto Rico')
    $('#donAPIForm-state').val('PR');
    else if(donorCountry=='Palau')
    $('#donAPIForm-state').val('PW');
    else if(donorCountry.indexOf('Virgin Islands')!=-1)
    $('#donAPIForm-state').val('VI');
    }
    else{
    $('#donAPIForm-state').val('None');
    $('#donAPIForm-donorInfo-state').css({visibility:'hidden'});
    }
    }

Categories