/// <summary> /// Initializes a new instance of the <see cref = "PayPalDirectPaymentGateway" /> class. /// </summary> /// <param name = "httpTransport">The transport for PayPal communication.</param> /// <param name = "environment">The pay pal environment.</param> public PayPalDirectPaymentGateway(IHttpPostTransport httpTransport, PayPalEnvironment environment) { if (httpTransport == null) throw new ArgumentNullException("httpTransport"); if (environment == null) throw new ArgumentNullException("environment"); this.httpTransport = httpTransport; this.environment = environment; }
public static bool DoExpressCheckoutPayment(PayPalEnvironment Environment, string expressCheckoutToken, string expressCheckoutPayerID, string orderTotalValue, PayPalCurrency currency) { if (Environment == PayPalEnvironment.SandBox) { return DoExpressCheckoutPaymentSandBox(expressCheckoutToken, expressCheckoutPayerID, orderTotalValue, currency); } else { return DoExpressCheckoutPaymentReal(expressCheckoutToken, expressCheckoutPayerID, orderTotalValue, currency); } }
public static void GetExpressCheckoutDetails(PayPalEnvironment Environment, string token, out string amount, out string currecny, out string itemName, out string itemNumber, out string orderDescription, out string quantity, out string payerDetails) { if (Environment == PayPalEnvironment.SandBox) { GetExpressCheckoutDetailsSandBox(token, out amount, out currecny, out itemName, out itemNumber, out orderDescription, out quantity, out payerDetails); } else { GetExpressCheckoutDetailsReal(token, out amount, out currecny, out itemName, out itemNumber, out orderDescription, out quantity, out payerDetails); } }
public static string CreatePaypalExpressPayment(PayPalEnvironment Environment, string orderDescription, double itemPrice, PayPalCurrency currency, int quantity, string ItemName, string ItemNumber, string ReturnUrl, string CancelUrl, out string paypalToken) { if (Environment == PayPalEnvironment.SandBox) { return CreatePaypalExpressPaymentSandbox(orderDescription, itemPrice, currency, quantity, ItemName, ItemNumber, ReturnUrl, CancelUrl, out paypalToken); } else { return CreatePaypalExpressPaymentReal(orderDescription, itemPrice, currency, quantity, ItemName, ItemNumber, ReturnUrl, CancelUrl, out paypalToken); } }
public PayPalConfiguration(PayPalEnvironment environment, string idEnvironment) { Environment = environment; PayPalKey = idEnvironment; }