Ejemplo n.º 1
0
        /// <summary>
        /// Creates a transaction start request.
        /// </summary>
        /// <param name="ipAddress">The IP address of the customer</param>
        /// <param name="returnUrl">The URL where the customer has to be send to after the payment.</param>
        /// <param name="paymentOptionId">	The ID of the payment option (for iDEAL use 10).</param>
        /// <param name="paymentSubOptionId">	In case of an iDEAL payment this is the ID of the bank (see the paymentOptionSubList in the getService function).</param>
        /// <param name="testMode">	Whether or not we perform this call in test mode.</param>
        /// <returns>Transaction Start Request</returns>
        public API.Transaction.Start.Request CreateTransactionRequest(string ipAddress, string returnUrl, int?paymentOptionId, int?paymentSubOptionId, bool?testMode)
        {
            var request = new API.Transaction.Start.Request
            {
                Amount             = 0,
                IPAddress          = ipAddress,
                ReturnUrl          = returnUrl,
                PaymentOptionId    = paymentOptionId,
                PaymentOptionSubId = paymentSubOptionId,
                TestMode           = testMode
            };

            return(request);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Performs a request to start a transaction.
        /// </summary>
        /// <returns>Full response object including Transaction ID</returns>
        public async Task <API.Transaction.Start.Response> StartAsync(API.Transaction.Start.Request request)
        {
            await ClientService.PerformPostRequestAsync(request);

            return(request.Response);
        }