Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What about using <code>iso_code_2</code> property of the concrete country? The <code>country</code> table is defined like:</p> <pre class="lang-sql prettyprint-override"><code>CREATE TABLE `oc_country` ( `country_id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(128) NOT NULL, `iso_code_2` varchar(2) NOT NULL, `iso_code_3` varchar(3) NOT NULL, `address_format` text NOT NULL, `postcode_required` tinyint(1) NOT NULL, `status` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`country_id`) ) </code></pre> <p>The column <code>iso_code_2</code> contains the desired 2-character ISO country code.</p> <p>In Your case when processing PayPal request You should be able to retrieve the payment address and it's country code (3-character ISO code) or ID - using this <strong>unique</strong> value (either it is <code>iso_code_3</code> or <code>country_id</code>) You should be able to find concrete country entry and obtain the desired <code>iso_code_2</code> value that You would then pass to the PayPal.</p> <p><strong>EDIT:</strong></p> <p>Should it be the states code, You can obtain that by using the known payment's address <strong><code>zone_id</code></strong>. One problem though - the codes for Australian states are not only 2 characters long:</p> <pre><code>Australian Capital Territory -&gt; ACT New South Wales -&gt; NSW Northern Territory -&gt; NT Queensland -&gt; QLD South Australia -&gt; SA Tasmania -&gt; TAS Victoria -&gt; VIC Western Australia -&gt; WA </code></pre> <p>According to <a href="http://en.wikipedia.org/wiki/States_and_territories_of_Australia#States_and_territories" rel="nofollow">Wikipedia</a>, nor the states's abbreviation nor the ISO codes are only 2 characters long thus maybe You could try to send also the 3-characters codes and let the rest on PayPal (maybe the description is just incorrect and You are able to use 3-char. codes).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload