Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
BuyEDalerTransaction.cs
1using Paiwise;
2using System;
3using System.Collections.Generic;
4using System.Threading.Tasks;
6
8{
12 internal class BuyEDalerTransaction : PaymentTransaction
13 {
32 public BuyEDalerTransaction(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, IBuyEDalerService 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.BuyEDaler(
52 this.Amount, this.Currency, this.SuccessUrl, this.FailureUrl, this.CancelUrl,
53 (IBuyEDalerService)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.
Service Module hosting the XMPP broker and its components.
Interface for information about a service provider that users can use to buy eDaler.