LogoLogo
HomeLibraryDonateAbout
  • Introduction
  • JS
    • EC
      • ECommerceInterface
      • ECDeviceInfo
      • ECProgress
      • Payment Objects
        • ECPrice
        • ECCreditCardPayment
        • ECCreditCardEncryptedPayment
        • ECECardPayment
        • ECAccountPayment
        • ECTransactionInfo
      • Title Objects
        • ECTitleLimit
        • ECTitleInfo
        • ECTicketInfo
    • DL Tasks
    • Keyboard
    • Mii
    • NWC24
    • SD Card
    • Shop
    • Sound
  • SOAP
    • Base Format
    • IAS
      • CheckRegistration
      • GetRegistrationInfo
      • SyncRegistration
      • GetChallenge
      • Register
      • Unregister
    • ECS
      • AcceptGiftTitle
      • ConfirmCSS
      • CheckAccountBalance
      • CheckDeviceStatus
      • DeleteETickets
      • GetECConfig
      • GetETickets
      • GiftTitle
      • ListETickets
      • ListPurchaseHistory
      • MigrateETickets
      • MigratePoints
      • NotifyETicketsSynced
      • PurchaseTitle
      • PurchasePoints
      • RedeemAllSCATitles
    • CAS
      • GetCountryAttributes
      • ListContentSets
      • ListContentSetGroups
Powered by GitBook
On this page
  • Constructor
  • Properties

Was this helpful?

  1. JS
  2. EC
  3. Payment Objects

ECPrice

A way to describe pricing data

PreviousPayment ObjectsNextECCreditCardPayment

Last updated 3 years ago

Was this helpful?

If you want to relay pricing data to the server, you instantiate ECPrice. For example, when you purchase a title via ec.purchaseTitle on , you're expected to present a price as a parameter.

Constructor

ECPrice expects exactly two parameters for its single constructor: amount, and currency.

var price = new ECPrice(amount, currency);

For example, let's assume you wish to instantiate a price representing 4.99 USD. Both the amount and the currency are strings.

var price = new ECPrice('4.99', 'USD');

Properties

Property Name
Discussion

price.amount

The amount that this ECPrice object represents, as a string. It is not converted to a numerical type for usage.

price.currency

The currency this ECPrice object represents, as a string. There is no defined list of currencies checked against, so any value may be utilized.

ECommerceInterface