/// <summary> /// Pre-authorize a payment. Use this if you want to know if a customer has sufficient funds /// before processing a payment. A real-world example of this is pre-authorizing at the gas pump /// for $100 before you fill up, then end up only using $60 of gas; the customer is only charged /// $60. The final payment is used with PreAuthCompletion(). /// /// The PreAuth is used with tokenized payments with a token generated from the Legato Javascript service. /// </summary> /// <returns>The response, in particular the payment ID that is needed to complete the purchase.</returns> /// <param name="paymentRequest">Payment request.</param> public PaymentResponse PreAuth(TokenPaymentRequest paymentRequest) { Gateway.ThrowIfNullArgument(paymentRequest, "paymentRequest"); paymentRequest.Token.Complete = false; return(PreAuthInternal(paymentRequest)); }
public void Setup() { _paymentRequest = new TokenPaymentRequest { Amount = 30, OrderNumber = "abc123", Token = new Token { Code = "abcdefghujk-000122999-asdfjlkasd8ha8shdfo8hasdfha", Name = "John Doe" } }; _executer = new Mock <IWebCommandExecuter>(); }
public void Setup() { _paymentRequest = new TokenPaymentRequest { Amount = 30, OrderNumber = "abc123", Token = new Token { Code = "abcdefghujk-000122999-asdfjlkasd8ha8shdfo8hasdfha", Name = "John Doe" } }; _executer = new Mock <IWebCommandExecuter>(); _bambora = new Gateway() { MerchantId = 300200578, PaymentsApiKey = "4BaD82D9197b4cc4b70a221911eE9f70", ReportingApiKey = "4e6Ff318bee64EA391609de89aD4CF5d", ProfilesApiKey = "D97D3BE1EE964A6193D17A571D9FBC80", ApiVersion = "1" }; }
public void Setup() { _paymentRequest = new TokenPaymentRequest { Amount = 30, OrderNumber = "abc123", Token = new Token { Code = "abcdefghujk-000122999-asdfjlkasd8ha8shdfo8hasdfha", Name = "John Doe" } }; _executer = new Mock <IWebCommandExecuter>(); _bambora = new Gateway() { MerchantId = Constants.MerchantId, SubMerchantId = Constants.SubMerchantId, PaymentsApiKey = Constants.PaymentsApiKey, ReportingApiKey = Constants.ReportingApiKey, ProfilesApiKey = Constants.ProfilesApiKey, ApiVersion = Constants.ApiVersion }; }