Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SellEDalerTransaction.cs
1using Paiwise;
2using System;
3using System.Collections.Generic;
4using System.Threading.Tasks;
6
8{
12 internal class SellEDalerTransaction : PaymentTransaction
13 {
32 public SellEDalerTransaction(Guid Id, string ServiceId,
33 string ServiceProvider, decimal Amount, CaseInsensitiveString Currency,
34 string SuccessUrl, string FailureUrl, string CancelUrl, string TabId,
35 string FunctionName, string UserName, ISellEDalerService Service,
36 CaseInsensitiveString LegalId,
37 Dictionary<CaseInsensitiveString, object> ContractParameters,
38 Dictionary<CaseInsensitiveString, CaseInsensitiveString> IdParameters)
39 : base(Id, ServiceId, ServiceProvider, Amount, Currency, SuccessUrl,
40 FailureUrl, CancelUrl, TabId, FunctionName, UserName, Service,
41 LegalId, ContractParameters, IdParameters)
42 {
43 }
44
49 protected override async Task<bool> DoExecute()
50 {
51 PaymentResult PaymentResult = await Paiwise.PaiwiseProcessor.SellEDaler(
52 this.Amount, this.Currency, this.SuccessUrl, this.FailureUrl, this.CancelUrl,
53 (ISellEDalerService)this.service, XmppServerModule.EDaler, this.legalId, null,
54 this.contractParameters, this.idParameters, this.Id.ToString(),
55 async (sender, e2) =>
56 {
57 this.ClientUrl = e2.Url;
58 await this.PushToClient();
59 }, null);
60
61 return PaymentResult.Ok;
62 }
63 }
64}
Result of request payment.
Definition: PaymentResult.cs:7
bool Ok
If payment was successful or not.
Contains information about a service provider.
Represents a case-insensitive string.
Interface for information about a service provider that users can use to sell eDaler.
class PaymentTransaction(string TransactionId, string Currency)
Maintains the status of an ongoing payment transaction.