ProvOrian.SendInvoice Method

Send the invoice to Orian provider. 
Provider returns a dictionary(Of String, String) having any results (success or errors).
Public Function SendInvoice( _ 
ByVal inv As invoice, _ 
ByVal orianData As orianData, _ 
Optional ByVal appInfo As appInfo = Nothing, _ 
Optional ByVal posProtocol As Integer = 3 _ 
) As Dictionary(Of String, String)
This language is not supported or no code example is available.
public Dictionary<string, string> SendInvoice( 
invoice inv
orianData orianData
appInfo appInfo = Nothing, 
int posProtocol = 3 
)
This language is not supported or no code example is available.

Parameters

inv
invoice

The myDATA invoice, type of invoice

orianData
orianData

The provider data, type of orianData

appInfo
appInfo

This applies to the software that utilizes this library, type of appInfo

posProtocol
int

Default Value 3 
The POS protocol that it will be used for generating the signature. 
Possible values: 
CardLink: 1 
CommonWeb: 2 
VivaWallet: 3

Return Value

Dictionary<string, string>

A dictionary(Of String, String) containing provider's answer.

Example
 
  invoice invoice = sni.newInvoice;
 
  #region issuer and counterpart - Fill in only the fields you need.
  	invoice.issuer.vatNumber = "555777001";
  	invoice.issuer.country = "GR";
  	
  	invoice.counterpart.vatNumber = "555777002";
  	invoice.counterpart.country = "GR";
  	#endregion
  	
  #region elements - Fill in only the fields you need.
  	invoice.elements.series = "IZ";
  	invoice.elements.aa = 1;
  	invoice.elements.issueDate = DateTime.Now;
  	invoice.elements.invoiceType = "1.1";
  #endregion
 
  #region Lines - Fill in only the fields you need.
  	invoiceLine ln = sni.newLine;
  	ln.netValue = 200.0d;
  	ln.VatCategory = 1;
  	ln.VatAmount = 48.0d;
  	ln.lineComments = "line comment";
  	ln.classification.Type = "E3_561_001";
  	ln.classification.Category = "category1_1";
  	
  	invoice.lines.Add(ln);
  #endregion
 
  #region payments
  	paymentMethod tmpPay = sni.newPaymentMethod;
  	tmpPay.@type = 1;
  	tmpPay.amount = 496.0d;
  	invoice.payments.Add(tmpPay);
  #endregion
 
  #region Orian Data
  	var ori = default(orianData);
  	ori.extraDetails.issuerName = "George M.";
  	ori.extraDetails.issuerAddress = "New Street 111";
  	ori.extraDetails.issuerPostalCode = "12345";
  	ori.extraDetails.issuerCity = "Thessaloniki";
  	ori.extraDetails.issuerEmail = "issuer@myemail.com";
  	ori.extraDetails.issuerPhone = "00302101111111";
  	
  	ori.extraDetails.counterpartName = "Papadopoulos G.";
  	ori.extraDetails.counterpartAddress = "New street 57";
  	ori.extraDetails.counterpartPostalCode = "12345";
  	ori.extraDetails.counterpartCity = "Athens";
  	ori.extraDetails.counterpartEmail = "counterpart@myemail.gr";
  	ori.extraDetails.counterpartPhone = "00302101111111";
  	
  	ori.extraDetails.paymentTerms = "POS Payment";
  	ori.extraDetails.paymentTerminalID = "1234567890";
  	ori.extraDetails.contractReference = "24SSSS111111111";
  	ori.extraDetails.projectReference = "3|1234567";
  	
  	var pLines = new List<provLine>();
  	var pline = new provLine();
  	pline.discountPercentage = 0.0d;
  	pline.discountAmount = 0.0d;
  	pline.itemName = "TEST PRODUCT";
  	pline.itemCode = "123";
  	pline.countryOfOrigin = "US";
  	pline.peppolTaxCategory = "S";
  	pline.peppolMeasurementUnit = "XUN";
  	
  	var pItems = new List<peppolItemClass>();
  	var pItem = default(peppolItemClass);
  	pItem.itemID = "03100000-2";
  	pItem.itemClass = "STI";
  	pItems.Add(pItem);
  	pline.itemClass = pItems;
  	
  	pLines.Add(pline);
  	ori.invoiceLines = pLines;
  #endregion
 
  var por = new ProvOrian("orianUser", "orianPassword", "Arbitrans User", "Arbitrans Key", false);
  Dictionary<string, string> fResult = por.SendInvoice(invoice, ori);					
This language is not supported or no code example is available.
  Dim invoice As invoice = sni.newInvoice
 
  #Region "issuer and counterpart - Fill in only the fields you need."
          invoice.issuer.vatNumber = "555777001"
          invoice.issuer.country = "GR"
 
          invoice.counterpart.vatNumber = "555777002"
          invoice.counterpart.country = "GR"
  #End Region
 
  #Region "elements - Fill in only the fields you need."
          invoice.elements.series = "IZ"
          invoice.elements.aa = 1
          invoice.elements.issueDate = Date.Now
          invoice.elements.invoiceType = "1.1"
  #End Region
 
  #Region "Lines - Fill in only the fields you need."
          Dim ln As invoiceLine = sni.newLine
          ln.netValue = 200.0
          ln.VatCategory = 1
          ln.VatAmount = 48.0
          ln.lineComments = "line comment"
          ln.classification.Type = "E3_561_001"
          ln.classification.Category = "category1_1"
 
          invoice.lines.Add(ln)
  #End Region
 
  #Region "payments"
          Dim tmpPay As paymentMethod = sni.newPaymentMethod
          tmpPay.type = 1
          tmpPay.amount = 496.0
          invoice.payments.Add(tmpPay)
  #End Region
 
  #Region "Orian Data"
      Dim ori As orianData
      ori.extraDetails.issuerName = "George M."
      ori.extraDetails.issuerAddress = "New Street 111"
      ori.extraDetails.issuerPostalCode = "12345"
      ori.extraDetails.issuerCity = "Thessaloniki"
      ori.extraDetails.issuerEmail = "issuer@myemail.com"
      ori.extraDetails.issuerPhone = "00302101111111"
 
      ori.extraDetails.counterpartName = "Papadopoulos G."
      ori.extraDetails.counterpartAddress = "New street 57"
      ori.extraDetails.counterpartPostalCode = "12345"
      ori.extraDetails.counterpartCity = "Athens"
      ori.extraDetails.counterpartEmail = "counterpart@myemail.gr"
      ori.extraDetails.counterpartPhone = "00302101111111"
 
      ori.extraDetails.paymentTerms = "POS Payment"
      ori.extraDetails.paymentTerminalID = "1234567890"
      ori.extraDetails.contractReference = "24SSSS111111111"
      ori.extraDetails.projectReference = "3|1234567"
 
      Dim pLines As New List(Of provLine)
      Dim pline As New provLine
      pline.discountPercentage = 0.0
      pline.discountAmount = 0.0
      pline.itemName = "TEST PRODUCT"
      pline.itemCode = "123"
      pline.countryOfOrigin = "US"
      pline.peppolTaxCategory = "S"
      pline.peppolMeasurementUnit = "XUN"
 
      Dim pItems As New List(Of peppolItemClass)
      Dim pItem As peppolItemClass
      pItem.itemID = "03100000-2"
      pItem.itemClass = "STI"
      pItems.Add(pItem)
      pline.itemClass = pItems
 
      pLines.Add(pline)
      ori.invoiceLines = pLines
  #End Region
 
  Dim por As ProvOrian = New ProvOrian("orianUser", "orianPassword", "Arbitrans User", "Arbitrans Key", False)
  Dim fResult As Dictionary(Of String, String) = por.SendInvoice(invoice, ori)
  					
This language is not supported or no code example is available.

.NET Framework

Supported in: 3.5 or newer

In this article

Definition