ProvOrian.getPOSSignature Method

Use this method to get the provider's signature for making a deferred POS payment. 
Deferred POS payments can only be done if the invoice paymentMethod.type = 5.
Public Function getPOSSignature( _ 
ByVal posTransaction As posTransaction
) As Dictionary(Of String, String)
This language is not supported or no code example is available.
public Dictionary<string, string> getPOSSignature( 
posTransaction posTransaction 
)
This language is not supported or no code example is available.

Parameters

posTransaction
posTransaction

The raw data of a POS Transaction.

Return Value

Dictionary<string, string>
Example
 
     var por = new ProvOrian("orianUser", "orianPassword", "Arbitrans User", "Arbitrans Key", false);
     var posTransaction = new ProvOrian.posTransaction();
     posTransaction.invoiceID = "1d2e3456-bc78-9012-345b-6789b012a345"; // The first time you sent the "On Credit" invoice, you received the invoice ID.
     posTransaction.paidAmount = 204.0d; // The POS will determine the amount the customer will pay. Typically, it is the invoice's gross value.
     posTransaction.terminalID = "111111111111";
     Dictionary<string, string> fResult = por.getPOSSignature(posTransaction);
 
     // Set up the POS variables so they can transmit the amount to the POS and complete the invoice for ORIAN.
     string paymentID = "";
     string paymentData = "";
     string paymentSignature = "";
     double paymentAmount = 0.0d;
     // In order to complete a POS transaction using an Invoicing Provider, you need first a POS Signature from the Provider.
     // This ensures that the payment contains indeed a POS transaction.
     if (fResult.ContainsKey("paymentInfo.paymentData") & fResult.ContainsKey("paymentInfo.paymentSignature"))
     {
         paymentID = fResult["paymentInfo.paymentID"];
         paymentData = fResult["paymentInfo.paymentData"];
         paymentSignature = fResult["paymentInfo.paymentSignature"];
         paymentAmount = Conversions.ToDouble(fResult["paymentInfo.paymentAmount"]);
     }
 
     #region VivaWallet POS TRANSACTION
 		// In order to complete a POS transaction using an Invoicing Provider, you need first a POS Signature from the Provider.
 		// Call the getPOSSignature Method to get a Dictionary(Of String, String) containing the signature data.
 	
 		// Initialize the VivaWalletPOS
 		var vw = new VivaWalletPOS("Arbitrans User", "Arbitrans Key", "ClientID", "ClientSecret", false);
 		Transaction tra = vw.NewTransaction; // initialize a new Sale Object
 		tra.sessionID = "my custom and unique Session ID"; // The SessionID must be unique. The same SessionID cannot be used twice.
 	
 		// The Terminal ID. In order to enable user-selected POS terminals, implement the "POS(i).TerminalID" property,
 		// where "i" represents the POS terminal index that the user has selected.
 		tra.terminalID = posTransaction.terminalID;
 		tra.cashRegisterID = "transaction without cash register"; // The Cash Register ID
 		tra.amount = paymentAmount; // The amount to be charged
 		tra.currencyCode = "978"; // The currency ISO Code. The 978 is EUR ISO Code
 		tra.merchantReference = tra.sessionID; // A text message informing the merchant of the nature of this sale.
 		tra.customerTrns = tra.sessionID; // A text message informing the customer of the nature of this sale.
 		tra.preauth = false; // Boolean flag indicating whether the payment is or is not a pre-authorization.
 		tra.maxInstalments = 12; // Max instalments allowed during card presentment
 		tra.tipAmount = 0.0d; // The desired Tip Amount
 		tra.aadeProviderId = 115; // The Invoicing Provider Code. Check re "Remarks" of the field aadeProviderId to find the Provider code you need.
 		tra.aadeProviderSignatureData = paymentData; // The aadeProviderSignatureData
 		tra.aadeProviderSignature = paymentSignature; // The aadeProviderSignature
 	
 		string resultVW = vw.newSale(tra); // Send the sale to the POS.
 
 		// The subsequent code executes a session status check. It rechecks the session while it is being processed until the user cancels or confirms the sale.
 		// Such is the nature of an example. This can be substituted with a timer or any other suitable alternative.
 Checkagain:
     ;
 		// create a loop checking the transaction status in real-time.
 		string traStatus = vw.checkSession(tra.sessionID); // Get the status of the session
 		if (traStatus.StartsWith("204")) // If the session is being processed
 		{
 			// If you want to cancel the transaction, uncomment the line below.
 			// vw.sendAbort(sessionID, tra.cashRegisterID);
 			goto Checkagain; // Check the status again
 		}
 		else
 		{
 			MessageBox.Show(traStatus);
 		} // Show the status to the end user.
 	
 		string transactionID = vw.getTransactionID(sessionID); // Get the tansaction ID after the succesfull transaction.
     #endregion
 
     // Send the payment to ORIAN.
     var pos = new ProvOrian.posComplete();
     pos.paymentID = paymentID;
     pos.transactionID = transactionID;
     pos.paidAmount = paymentAmount;
     pos.invoiceID = posTransaction.invoiceID;
 
     Dictionary<string, string> result = por.completePOSTransaction(pos);
 					
This language is not supported or no code example is available.
         Dim por As ProvOrian = New ProvOrian("orianUser", "orianPassword", "Arbitrans User", "Arbitrans Key", False)
         Dim posTransaction As New ProvOrian.posTransaction
         posTransaction.invoiceID = "1d2e3456-bc78-9012-345b-6789b012a345" 'The first time you sent the "On Credit" invoice, you received the invoice ID.
         posTransaction.paidAmount = 204.0 'The POS will determine the amount the customer will pay. Typically, it is the invoice's gross value.
         posTransaction.terminalID = "111111111111"
         Dim fResult As Dictionary(Of String, String) = por.getPOSSignature(posTransaction)
 
         'Set up the POS variables so they can transmit the amount to the POS and complete the invoice for ORIAN.
         Dim paymentID As String = ""
         Dim paymentData As String = ""
         Dim paymentSignature As String = ""
         Dim paymentAmount As Double = 0.0
         'In order to complete a POS transaction using an Invoicing Provider, you need first a POS Signature from the Provider.
         'This ensures that the payment contains indeed a POS transaction.
         If fResult.ContainsKey("paymentInfo.paymentData") And fResult.ContainsKey("paymentInfo.paymentSignature") Then
             paymentID = fResult("paymentInfo.paymentID")
             paymentData = fResult("paymentInfo.paymentData")
             paymentSignature = fResult("paymentInfo.paymentSignature")
             paymentAmount = fResult("paymentInfo.paymentAmount")
         End If
 
 #Region "VivaWallet POS TRANSACTION"
         'In order to complete a POS transaction using an Invoicing Provider, you need first a POS Signature from the Provider.
         'Call the getPOSSignature Method to get a Dictionary(Of String, String) containing the signature data.
 
         'Initialize the VivaWalletPOS
         Dim vw As New VivaWalletPOS("Arbitrans User", "Arbitrans Key", "ClientID", "ClientSecret", False)
         Dim tra As Transaction = vw.NewTransaction 'initialize a new Sale Object
         tra.sessionID = "my custom and unique Session ID" 'The SessionID must be unique. The same SessionID cannot be used twice.
 
         'The Terminal ID. In order to enable user-selected POS terminals, implement the "POS(i).TerminalID" property,
         'where "i" represents the POS terminal index that the user has selected.
         tra.terminalID = posTransaction.terminalID
         tra.cashRegisterID = "transaction without cash register" 'The Cash Register ID
         tra.amount = paymentAmount 'The amount to be charged
         tra.currencyCode = "978" 'The currency ISO Code. The 978 is EUR ISO Code
         tra.merchantReference = tra.sessionID 'A text message informing the merchant of the nature of this sale.
         tra.customerTrns = tra.sessionID 'A text message informing the customer of the nature of this sale.
         tra.preauth = False 'Boolean flag indicating whether the payment is or is not a pre-authorization.
         tra.maxInstalments = 12 'Max instalments allowed during card presentment
         tra.tipAmount = 0.0 'The desired Tip Amount
         tra.aadeProviderId = 115 'The Invoicing Provider Code. Check re "Remarks" of the field aadeProviderId to find the Provider code you need.
         tra.aadeProviderSignatureData = paymentData 'The aadeProviderSignatureData
         tra.aadeProviderSignature = paymentSignature ' The aadeProviderSignature
 
         Dim resultVW As String = vw.newSale(tra) 'Send the sale to the POS.
 
         'The subsequent code executes a session status check. It rechecks the session while it is being processed until the user cancels or confirms the sale.
         'Such is the nature of an example. This can be substituted with a timer or any other suitable alternative.
 Checkagain: 'create a loop checking the transaction status in real-time.
         Dim traStatus As String = vw.checkSession(tra.sessionID) 'Get the status of the session
         If traStatus.StartsWith("204") Then 'If the session is being processed
             'If you want to cancel the transaction, uncomment the line below.
             'vw.sendAbort(sessionID, tra.cashRegisterID)
             GoTo Checkagain 'Check the status again
         Else
             MessageBox.Show(traStatus) 'Show the status to the end user.
         End If
 
         Dim transactionID As String = vw.getTransactionID(sessionID) 'Get the tansaction ID after the succesfull transaction.
 #End Region
 
         'Send the payment to ORIAN.
         Dim pos As New ProvOrian.posComplete
         pos.paymentID = paymentID
         pos.transactionID = transactionID
         pos.paidAmount = paymentAmount
         pos.invoiceID = posTransaction.invoiceID
 
         Dim result As Dictionary(Of String, String) = por.completePOSTransaction(pos)
 					
This language is not supported or no code example is available.

.NET Framework

Supported in: 3.5 or newer

In this article

Definition