developer:soap-1.6:methods:getsupportedcurrencies

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:soap-1.6:methods:getsupportedcurrencies [2012/08/04 11:26] (current)
tem created
Line 1: Line 1:
 +<embed ..:​contents/>​====== getSupportedCurrencies ======
  
 +Retrieves an array of currencies supported by a merchant account.
 +
 +===== Description =====
 +
 +Depending on the merchant account configuration,​ different currencies are available for multi-currency processing. This method will return an array containing the currencies that are supported by the merchant account.
 +
 +If multi-currency processing is not supported, the array will be empty.
 +
 +To view the account details for a particular merchant account, including whether or not the account supports multi-currency processing, use the [[getAccountDetails]] method.
 +
 +Each currency type is assigned a three digit numeric code (ie: USD=840, Japanese yen=392). You must enter the three digit code for both the original currency and the converted currency in a conversion. The [[developer/​currencycode|Currency Code]] list provides all of the three digit codes and their corresponding currencies for international currency conversion.
 +
 +If you would like to add support for multi-currency transactions to a merchant account please contact the merchant'​s service provider or customer service.
 +
 +See also [[currencyConversion]],​ [[bulkCurrencyConversion]],​ [[getAccountDetails]] ​
 +
 +===== Syntax =====
 +
 +[[..:​objects:​CurrencyObject]] **getSupportedCurrencies** ( [[..:​objects:​ueSecurityToken]] Token ) 
 +
 +
 +===== Arguments =====
 +
 +^Type     ​^Name ​    ​^Description ​   ^
 +|[[..:​objects:​ueSecurityToken]] |Token |Merchant security token: used to identify merchant and validate transaction. |
 +
 +
 +===== Return Value =====
 +
 +|[[..:​objects:​CurrencyObject]] |Returns an array of currencies supported by the merchant account for use with multi-currency processing. |
 +
 +===== Examples =====
 +
 +
 +
 +==== PHP ====
 +
 +For directions on how to set up the WSDL link and create "​$token"​ and "​$client,"​ see the [[..:​howto:​php|PHP Soap guide]]. ​
 +
 +<code php>
 +<?​php ​
 +
 +try { 
 +
 +  $currencies = $client->​getSupportedCurrencies($token); ​
 +  print_r($currencies); ​                            
 +  } 
 +
 +catch(SoapFault $e) { 
 +  die("​soap fault: " .$e->​getMessage(). "​\n\nRequest:​ " .   
 +  $this->​client->​__getLastResponse()); ​        
 +
 +
 +?>     
 +</​code>​
 +
 +==== PHP Pear::SOAP ====
 +For directions on how to set up the WSDL link and create "​$token"​ and "​$client,"​ see the [[developer:​soap:​howto:​pearsoap|PHP Pear Soap guide]]. ​
 +
 +**NOTE:** A bug in PEAR::Soap version 0.11.0 causes the first two currencies to be dropped. ​ To correctly use getSupportedCurrencies you must remove the comment on line 786 of SOAP/​Base.php. ​
 +
 +
 +<code php>
 +<?php
 +
 +$params=array("​Token"​=>​$token);​
 +
 +$currencies=$client->​call('​getSupportedCurrencies',​ $params);
 +
 +print_r($currencies);​
 +
 +?>
 +</​code>​
 +
 +==== visual Basic (.NET) ====
 +<code vb>
 +Dim response() As usaepay.CurrencyObject
 +
 +
 +        response = client.getSupportedCurrencies(token)
 +        MsgBox(response.Length)
 +</​code>​
 +
 +==== .NET C# ====
 +<code c>
 +try
 +            {
 +                usaepay.CurrencyObject[] currency = client.getSupportedCurrencies(token);​
 +                MessageBox.Show(string.Concat(currency.Length));​
 +            }
 +
 +            catch (Exception err)
 +            {
 +                MessageBox.Show(err.Message);​
 +            }
 +</​code>​
 +
 +===== Change History =====
 +
 +^ Version ^ Change ^
 +| [[developer:​soap-1.1:​methods:​getsupportedcurrencies|1.1]] | Method added prior to soap-1.1 |
developer/soap-1.6/methods/getsupportedcurrencies.txt ยท Last modified: 2012/08/04 11:26 by tem

Page Tools