/// <summary>
        /// Authorizes a payment_method for a particular amount. 
        /// </summary>
        /// <param name="paymentMethodToken">Token identifying the payment method to authorize.</param>
        /// <param name="amount">Amount to authorize. Should be in format like "12.00".</param>
        /// <param name="payload">Transaction payload object, for passing additional parameters</param>/// 
        /// <returns>a transaction containing the processor's response.</returns>
        public Transaction Authorize(string paymentMethodToken, string amount, TransactionPayload payload = null)
        {
            // create request
            var request = new RestRequest(Method.POST);
            request.RequestFormat = DataFormat.Xml;
            request.Resource = "processors/{ProcessorToken}/authorize.xml";
            request.RootElement = "transaction";

            // set processor token
            request.AddParameter("ProcessorToken", ProcessorToken, ParameterType.UrlSegment);

            // generate payload
            payload = payload ?? new TransactionPayload();
            payload.Type = "authorize";
            payload.Amount = amount;
            payload.PaymentMethodToken = paymentMethodToken;
            request.AddBody(payload);

            // send a request and deserialize response into transaction
            return Transaction.Execute(request);
        }
 /// <summary>
 /// Authorizes a payment_method for a particular amount. 
 /// </summary>
 /// <param name="paymentMethodToken">Token identifying the payment method to authorize.</param>
 /// <param name="amount">Amount to authorize.</param>
 /// <param name="payload">Transaction payload object, for passing additional parameters</param>/// 
 /// <returns>a transaction containing the processor's response.</returns>
 public Transaction Authorize(string paymentMethodToken, decimal amount, TransactionPayload payload = null)
 {
     string amountString = Helper.DecimalToString(amount);
     return Authorize(paymentMethodToken, amountString, payload);
 }