ProvBratnet.getPOSSignature Method
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.
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>
Returns a dictionary containing the necessary data that will be used in the Transaction object.
Specifically, the fields Transaction.aadeProviderSignatureData (dictionary key signedContent) and Transaction.aadeProviderSignature (dictionary key signature) will be filled.
The Dictionary contains the following values:
The values in BOLD are those you will need for completing a POS transaction.
Specifically, the fields Transaction.aadeProviderSignatureData (dictionary key signedContent) and Transaction.aadeProviderSignature (dictionary key signature) will be filled.
The Dictionary contains the following values:
The values in BOLD are those you will need for completing a POS transaction.
| Field | Value / Description |
|---|---|
| userRequestID | 6484b70e-0b19-4aca-a3e9 |
| version | Test Verion 01 |
| response.tempUid | D123FCA456D7F8901F2CA34567BC8B901FA7F23B |
| response.bSignature | MEUCIQCSg1T1o18ZKDn8jmSkc9DwG1nt6y5ftGB2c13R5IWHOQIgA4n= It is used on Transaction.aadeProviderSignature for Viva Wallet POS It is not applicable on ProviderData.Signature for Mellon Group POS |
| response.hSignature | 3045022100928354F5A35F192839FC8E64A473D0F01B59EDEB2E5FB4 It is not applicable on Transaction.aadeProviderSignature for Viva Wallet POS It is used on ProviderData.Signature for Mellon Group POS This value is also required to cancel the signature that was issued by the getPOSSignature method. To cancel a signature, call the method cancelPOSSignature |
| response.signatureMessage | D123FCA456D7F8901F2CA34567BC8B901FA7F23B;;20260609042357;24800;20000;4800;20000;12345678 It is used on Transaction.aadeProviderSignatureData for Viva Wallet POS It is used on ProviderData for Mellon Group POS Important: For MellonGroup, these data needs to brake as follows:
string paymentData = res("response.signatureMessage");
string[] payData = paymentData.Split(";");
MellonGroupPOS.posTransaction tra = mlg.newTransaction;
// more code here
tra.ProviderData.Uid = payData[0];
tra.ProviderData.SignatureTimestamp = payData[2];
tra.ProviderData.NetAmount = payData[3];
tra.ProviderData.VatAmount = payData[4];
tra.ProviderData.TotalAmount = payData[5];
// more code here
This language is not supported or no code example is available.
Dim paymentData as string = res("response.signatureMessage")
Dim payData() = paymentData.Split(";")
Dim tra As MellonGroupPOS.posTransaction = mlg.newTransaction
'more code here
tra.ProviderData.Uid = payData(0)
tra.ProviderData.SignatureTimestamp = payData(2)
tra.ProviderData.NetAmount = payData(3)
tra.ProviderData.VatAmount = payData(4)
tra.ProviderData.TotalAmount = payData(5)
'more code here
This language is not supported or no code example is available. |
| JSON_ARBDATA | VjJ4b2FtUXhUW!RpUlZKU1ZqSjRjRmx0Y3p!Tk1WWlZVMVJXYUUxWVFsVlZNVkpoVTJ4RmQySkVUbFZXTW5oTFdY In case of an emergency, please submit this value via ticket, and we will provide support shortly. |
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.