Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PayoutRequest"/> with the required parameters.
 /// </summary>
 /// <param name="merchantInfo">Merchant's data (E.g. secret key, the merchant id, the merchant site id, etc.)</param>
 /// <param name="sessionToken">The session identifier returned by /getSessionToken.</param>
 /// <param name="userTokenId">ID of the user in merchant system.</param>
 /// <<param name="clientUniqueId">ID of the transaction in the merchant’s system. This must be sent in order to perform future actions, such as: reconciliation, identifying the transaction in the event of any issues, etc.</param>
 /// <param name="amount">The transaction amount. (E.g. 1, 101.10 - decimal representation of the amount as <see cref="string"/>.</param>
 /// <param name="currency">The three character ISO currency code of the transaction.</param>
 /// <param name="userPaymentOption">User payment option data.</param>
 public PayoutRequest(
     MerchantInfo merchantInfo,
     string sessionToken,
     string userTokenId,
     string clientUniqueId,
     string amount,
     string currency,
     UserPaymentOption userPaymentOption)
     : base(merchantInfo, ChecksumOrderMapping.ApiGenericChecksumMapping, sessionToken)
 {
     this.UserTokenId       = userTokenId;
     this.ClientUniqueId    = clientUniqueId;
     this.Amount            = amount;
     this.Currency          = currency;
     this.UserPaymentOption = userPaymentOption;
     this.RequestUri        = this.CreateRequestUri(ApiConstants.PayoutUrl);
 }
Beispiel #2
0
        public async Task <PayoutResponse> Payout(
            string userTokenId,
            string clientUniqueId,
            string amount,
            string currency,
            UserPaymentOption userPaymentOption,
            string comment = null,
            DynamicDescriptor dynamicDescriptor = null,
            MerchantDetails merchantDetails     = null,
            UrlDetails urlDetails       = null,
            DeviceDetails deviceDetails = null,
            CardData cardData           = null,
            string userId                 = null,
            string rebillingType          = null,
            string authenticationTypeOnly = null,
            SubMerchant subMerchant       = null,
            Addendums addendums           = null)
        {
            var request = new PayoutRequest(
                merchantInfo,
                sessionToken,
                userTokenId,
                clientUniqueId,
                amount,
                currency,
                userPaymentOption)
            {
                Comment                = comment,
                DynamicDescriptor      = dynamicDescriptor,
                MerchantDetails        = merchantDetails,
                UrlDetails             = urlDetails,
                DeviceDetails          = deviceDetails,
                CardData               = cardData,
                UserId                 = userId,
                RebillingType          = rebillingType,
                AuthenticationTypeOnly = authenticationTypeOnly,
                SubMerchant            = subMerchant,
                Addendums              = addendums
            };

            return(await safechargeRequestExecutor.Payout(request));
        }
Beispiel #3
0
        public async Task <OpenOrderResponse> OpenOrder(

            string currency,
            string amount,
            List <Item> items = null,
            OpenOrderPaymentOption paymentOption = null,
            UserPaymentOption userPaymentOption  = null,
            string paymentMethod                = null,
            string userTokenId                  = null,
            string clientUniqueId               = null,
            string clientRequestId              = null,
            string userId                       = null,
            string authenticationTypeOnly       = null,
            AmountDetails amountDetails         = null,
            DeviceDetails deviceDetails         = null,
            CashierUserDetails userDetails      = null,
            UserAddress shippingAddress         = null,
            UserAddress billingAddress          = null,
            DynamicDescriptor dynamicDescriptor = null,
            MerchantDetails merchantDetails     = null,
            Addendums addendums                 = null,
            UrlDetails urlDetails               = null,
            string customSiteName               = null,
            string productId                    = null,
            string customData                   = null,
            string transactionType              = null,
            string isMoto                       = null,
            string isRebilling                  = null,
            string rebillingType                = null,
            SubMerchant subMerchant             = null)
        {
            var request = new OpenOrderRequest(merchantInfo, sessionToken, currency, amount)
            {
                Items                  = items,
                PaymentOption          = paymentOption,
                UserPaymentOption      = userPaymentOption,
                PaymentMethod          = paymentMethod,
                UserTokenId            = userTokenId,
                ClientRequestId        = clientRequestId,
                ClientUniqueId         = clientUniqueId,
                UserId                 = userId,
                AuthenticationTypeOnly = authenticationTypeOnly,
                AmountDetails          = amountDetails,
                DeviceDetails          = deviceDetails,
                UserDetails            = userDetails,
                ShippingAddress        = shippingAddress,
                BillingAddress         = billingAddress,
                DynamicDescriptor      = dynamicDescriptor,
                MerchantDetails        = merchantDetails,
                Addendums              = addendums,
                UrlDetails             = urlDetails,
                CustomSiteName         = customSiteName,
                ProductId              = productId,
                CustomData             = customData,
                TransactionType        = transactionType,
                IsMoto                 = isMoto,
                IsRebilling            = isRebilling,
                RebillingType          = rebillingType,
                SubMerchant            = subMerchant
            };

            return(await safechargeRequestExecutor.OpenOrder(request));
        }