ProvBratnet.getPOSSignature Method

Get the POS signature to create a new POS Sale. 
The results of this method will be used at VivaWalletPOS.newSale.
Public Function getPOSSignature( _ 
ByVal posTransaction As posTransaction, _ 
ByVal uid As String, _ 
ByVal directPayment As Boolean, _ 
Optional ByVal nspCode As String = "01" _ 
) As Dictionary(Of String, String)
This language is not supported or no code example is available.
public Dictionary<string, string> getPOSSignature( 
posTransaction posTransaction
string uid
bool directPayment
string nspCode = "01" 
)
This language is not supported or no code example is available.

Parameters

posTransaction
posTransaction

Mandatory Field 
The raw data of the transaction, type of posTransaction

uid
string

The UID of the invoice you got from sendInvoice, field invoiceUid 
Mandatory if directPayment is True else empty string ("").

directPayment
bool

Determines if the payment is going to be done the time you're issuing the invoice or later. 
If False then the inv and uid parameters are mandatory.

nspCode
string

Mandatory Field 
The POS protocol that it will be used for generating the signature. 
Possible values: 
01 for MellonGroupPOS 
02 for VivaWalletPOS 
Default Value: 01 MellonGroup

Return Value

Dictionary<string, string>
Example
 
 var bra = new ProvBratnet("BratnetUser", "BratnetPassword", "bratnetAPIKey", "arbUser", "arbKey", false);
 
 // The "inv" is the invoice object you previously created.
 // The "brd" is the bratnetData object you previously created.
 
 myDATATools mdt = new myDATATools("Arbitrans User", "Arbitrans Key"); // Initialize myDATA Tools
 ProvBratnet.posTransaction pos = bra.newPosTransaction(); // Ininitialize a new POS Transaction
 pos.amount = mdt.calcInvoiceGrossValue(invoice);
 pos.netValue = mdt.calcInvoiceNetValue(invoice);
 pos.vatAmount = mdt.calcInvoiceVatAmount(invoice);
 pos.grossValue = mdt.calcInvoiceGrossValue(invoice);
 pos.invoiceType = invoice.elements.invoiceType;
 pos.issueDate = inv.elements.issueDate;
 pos.invoiceNumber = invoice.elements.aa;
 pos.issuerBranch = inv.issuer.branch;
 pos.issuerVatNumber = inv.issuer.vatNumber;
 pos.series = inv.elements.series;
 pos.terminalId = brd.extraDetails.paymentTerminalID;
 
 // Simultaneous POS Payment
 Dictionary<string, string> posSign = bra.getPOSSignature(pos, "", true, "02");
 
 // Delayed POS Payment
 Dictionary<string, string> posSign = bra.getPOSSignature(pos, "D123FCA456D7F8901F2CA34567BC8B901FA7F23B", true, "02");
 					
This language is not supported or no code example is available.
 Dim bra As ProvBratnet = New ProvBratnet("BratnetUser", "BratnetPassword", "bratnetAPIKey", "arbUser", "arbKey", False)
 
 'The "inv" is the invoice object you previously created.
 'The "brd" is the bratnetData object you previously created.
 
 
 Dim mdt as myDATATools = new myDATATools("Arbitrans User", "Arbitrans Key") 'Initialize myDATA Tools
 Dim pos As ProvBratnet.posTransaction = bra.newPosTransaction() 'Ininitialize a new POS Transaction
 pos.amount = mdt.calcInvoiceGrossValue(invoice)
 pos.netValue = mdt.calcInvoiceNetValue(invoice)
 pos.vatAmount = mdt.calcInvoiceVatAmount(invoice)
 pos.grossValue = mdt.calcInvoiceGrossValue(invoice)
 pos.invoiceType = invoice.elements.invoiceType
 pos.issueDate = inv.elements.issueDate
 pos.invoiceNumber = invoice.elements.aa
 pos.issuerBranch = inv.issuer.branch
 pos.issuerVatNumber = inv.issuer.vatNumber
 pos.series = inv.elements.series
 pos.terminalId = brd.extraDetails.paymentTerminalID
 
 'Simultaneous POS Payment
 Dim posSign As Dictionary(Of String, String) = bra.getPOSSignature(pos, "", True, "02")
 
 'Delayed POS Payment
 Dim posSign As Dictionary(Of String, String) = bra.getPOSSignature(pos, "D123FCA456D7F8901F2CA34567BC8B901FA7F23B", True, "02")
 					
This language is not supported or no code example is available.

.NET Framework

Supported in: 3.5 or newer

In this article

Definition