public static PaymentTransaction Create(string id,
                                         CashInPaymentSystem paymentSystem,
                                         string clientId,
                                         double amount,
                                         double feeAmount,
                                         string assetId,
                                         string walletId,
                                         string assetToDeposit = null,
                                         string info           = "",
                                         PaymentStatus status  = PaymentStatus.Created)
 {
     return(new PaymentTransaction
     {
         Id = id,
         PaymentSystem = paymentSystem,
         ClientId = clientId,
         Amount = amount,
         AssetId = assetId,
         WalletId = walletId,
         Created = DateTime.UtcNow,
         Status = status,
         Info = info,
         DepositedAssetId = assetToDeposit ?? assetId,
         FeeAmount = feeAmount,
         MeTransactionId = Guid.NewGuid().ToString()
     });
 }
Пример #2
0
        internal static string ToSerializedValue(this CashInPaymentSystem value)
        {
            switch (value)
            {
            case CashInPaymentSystem.Unknown:
                return("Unknown");

            case CashInPaymentSystem.CreditVoucher:
                return("CreditVoucher");

            case CashInPaymentSystem.Bitcoin:
                return("Bitcoin");

            case CashInPaymentSystem.Ethereum:
                return("Ethereum");

            case CashInPaymentSystem.Swift:
                return("Swift");

            case CashInPaymentSystem.SolarCoin:
                return("SolarCoin");

            case CashInPaymentSystem.ChronoBank:
                return("ChronoBank");

            case CashInPaymentSystem.Fxpaygate:
                return("Fxpaygate");

            case CashInPaymentSystem.Quanta:
                return("Quanta");
            }
            return(null);
        }
 public static PaymentSystemRawLogEvent Create(CashInPaymentSystem paymentSystem, string eventType, string data)
 {
     return(new PaymentSystemRawLogEvent
     {
         DateTime = DateTime.UtcNow,
         PaymentSystem = paymentSystem.ToString(),
         Data = data,
         EventType = eventType
     });
 }
Пример #4
0
        private bool IsPaymentSystemSupported(CashInPaymentSystem paymentSystem, string assetId)
        {
            switch (paymentSystem)
            {
            case CashInPaymentSystem.CreditVoucher:
                return(_creditVouchersSettings.SupportedCurrencies?.Contains(assetId) ?? assetId == LykkeConstants.UsdAssetId);

            case CashInPaymentSystem.Fxpaygate:
                return(_fxpaygateSettings.SupportedCurrencies?.Contains(assetId) ?? assetId == LykkeConstants.UsdAssetId);

            default:
                return(false);
            }
        }
Пример #5
0
 public static PaymentTransaction Create(string id,
                                         CashInPaymentSystem paymentSystem,
                                         string clientId,
                                         double amount,
                                         string assetId,
                                         string assetToDeposit = null,
                                         string info           = "")
 {
     return(new PaymentTransaction
     {
         Id = id,
         PaymentSystem = paymentSystem,
         ClientId = clientId,
         Amount = amount,
         AssetId = assetId,
         Created = DateTime.UtcNow,
         Status = PaymentStatus.Created,
         Info = info,
         DepositedAssetId = assetToDeposit ?? assetId
     });
 }
Пример #6
0
 internal void SetPaymentSystem(CashInPaymentSystem data)
 {
     PaymentSystem = data.ToString();
 }