developer:soap-1.6:objects:currencyconversion

Differences

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

Link to this comparison view

developer:soap-1.6:objects:currencyconversion [2012/08/04 11:37] (current)
tem created
Line 1: Line 1:
 +<embed ..:​contents/>​====== CurrencyConversion ======
  
 +Contains the results of a currency conversion.
 +
 +===== Description =====
 +
 +This object contains the results of a currency conversion. The currency codes are the 3 digit numeric codes found on the Currency Code list.
 +
 +In order for a merchant account to process multi-currency transactions,​ the account must be configured to accept transactions in multiple currencies. To determine which currencies a merchant account is authorized to accept, use the [[..:​methods:​getSupportedCurrencies]] method, which will return an array containing the currencies that are supported by the merchant account.
 +
 +
 +===== Properties =====
 +
 +^Type    ^Name     ​^Description ​    ^
 +|string |FromCurrency |Code of currency that transaction amount is being converted from.|
 +|double |FromAmount |Amount being converted. This amount is shown in the original currency, before the conversion takes place (FromCurrency).|
 +|string |Currency |Code of currency that transaction amount is being converted to.|
 +|double |Rate |Conversion rate used.|
 +|double |Amount |Amount converted to new currency. This amount is shown in the new currency that the amount has been converted to (Currency).|
 +
 +===== Places Used =====
 +
 +[[..:​methods:​currencyConversion]]
 +[[..:​methods:​bulkCurrencyConversion]] ​
 +
 +===== Examples =====
 +
 +
 +==== PHP ====
 +
 +For directions on how to set up the WSDL link, create "​$token"​ and "​$client",​ go to [[..:​howto:​php|PHP Soap How-to]].
 +
 +<code php>
 +<?​php ​
 +
 +$CurrencyConversionObject=$this->​client->​getTransaction($this->​token,​ $FromCurrency,​ $ToCurrency,​ $Amount);
 +
 +echo $CurrencyConversionObject->​Amount;​
 +
 +?> 
 +</​code> ​
 +
 +==== .NET VB ====
 +<code vb>
 +Dim response As usaepay.CurrencyConversion = New usaepay.CurrencyConversion
 + 
 +        response = client.currencyConversion(token,​ from, convert, amount)
 +        MsgBox(response.Amount)
 +</​code>​
 +
 +==== .NET C# ====
 +<code c>
 +usaepay.CurrencyConversion response = new usaepay.CurrencyConversion();​
 + 
 +            try
 +            {
 +                response = client.currencyConversion(token,​ from, to, amount);
 +                MessageBox.Show(string.Concat(response.Amount));​
 +            }
 +
 +</​code>​
 +
 +==== XML ====
 +
 +<code xml>
 +<​currencyConversionReturn xsi:​type="​ns1:​CurrencyConversion">​
 +<Amount xsi:​type="​xsd:​double">​34.19</​Amount>​
 +<​Currency xsi:​type="​xsd:​string">​978</​Currency>​
 +<​FromAmount xsi:​type="​xsd:​double">​50</​FromAmount>​
 +<​FromCurrency xsi:​type="​xsd:​string">​840</​FromCurrency>​
 +<Rate xsi:​type="​xsd:​double">​0.68383862</​Rate>​
 +</​currencyConversionReturn>​
 +</​code>​
 +
 +===== Change History =====
 +
 +^ Version ^ Change ^
 +| [[developer:​soap-1.4:​objects:​currencyconversion|1.4]] | Currency and FromCurrency parameters changed from integer to string |
 +| [[developer:​soap-1.1:​objects:​currencyconversion|1.1]] | Method added prior to soap-1.1 |
developer/soap-1.6/objects/currencyconversion.txt ยท Last modified: 2012/08/04 11:37 by tem

Page Tools