예제 #1
0
 /// <remarks/>
 public void transAlertsAsync(Transaction transaction) {
     this.transAlertsAsync(transaction, null);
 }
예제 #2
0
 /// <remarks/>
 public void transAlertsAsync(Transaction transaction, object userState) {
     if ((this.transAlertsOperationCompleted == null)) {
         this.transAlertsOperationCompleted = new System.Threading.SendOrPostCallback(this.OntransAlertsOperationCompleted);
     }
     this.InvokeAsync("transAlerts", new object[] {
                 transaction}, this.transAlertsOperationCompleted, userState);
 }
예제 #3
0
 static void Main(string[] args)
 {
     String sharedKey = "raiffeisen.online.test.12gdf3";
       ITNWebServiceContract client = new ITNWebServiceContract();
       Transaction transaction = new Transaction()
       {
     transID = "xxx",
     amount = new Amount() { currency = AmountCurrency.PLN, value = 205.12M },
     docHash = String.Empty,
     orderID = "qaa",
     status = -2,
     transTitle = "Huura, działa",
     transDate = new DateTime(2013, 01, 01),
     customerData = new CustomerData() { customerAddress = "Marcin Jagieła, ul. Paderewskiego 1C/27", customerNRB = "11114020040000370228260610" },
     merchantID = 10,
     statusDate = new DateTime(2001, 01, 01),
     paywayID = 1,
       };
       StringBuilder sb = new StringBuilder();
       sb.Append(transaction.merchantID).Append(transaction.orderID).Append(transaction.transID).
     Append(transaction.transDate.ToString("yyyy-MM-dd HH:mm:ss")).
     Append(transaction.transTitle).
     Append(transaction.amount.value.ToString("0.00").Replace(",", ".")).Append(transaction.amount.currency).
     Append(transaction.paywayID).Append(transaction.statusDate.ToString("yyyy-MM-dd HH:mm:ss")).//Append("111111").
     //Te jedynki wynikają ze śmiesznego formatowania Status Date:
     //dołączają jakąś strefę czasową czy coś - do uzgodnienia.
     Append(transaction.status).Append(transaction.customerData == null ? String.Empty : transaction.customerData.customerAddress).
     Append(transaction.customerData == null ? String.Empty : transaction.customerData.customerNRB).Append(sharedKey);
       using (MD5 md5Hash = MD5.Create())
       {
     transaction.docHash = GetHash(md5Hash, sb.ToString());
       }
       Confirmation result = client.transAlerts(transaction);
       client.Dispose();
 }