Пример #1
0
        protected void BuyMarketplaceProduct(string username, Money amount, string from, string transId,
                                             int productId, int quantity, string deliveryAddress, string email, int?promotorId, string cryptoCurrencyInfo)
        {
            MarketplaceProduct product = new MarketplaceProduct(productId);

            bool successful = false;

            try
            {
                product.BuyViaProcessor(username, quantity, email, deliveryAddress, amount, promotorId);
                successful = true;
            }
            catch
            {
                successful = false;
            }

            PaymentProcessor PP = PaymentAccountDetails.GetFromStringType(from);

            CompletedPaymentLog.Create(PP, "Marketplace Purchase", transId, false, username, amount, Money.Zero, successful, cryptoCurrencyInfo);
        }