// See ITransactionRegistrar for parameter descriptions public SetExpressCheckoutResponse SendSetExpressCheckout(string currencyCode, decimal amount, string description, string trackingReference, string serverURL, List<ExpressCheckoutItem> purchaseItems = null, string userEmail = null) { SetExpressCheckoutRequest request = new SetExpressCheckoutRequest(currencyCode, amount, description, trackingReference, serverURL, purchaseItems, userEmail); string postData = serializer.Serialize(request); Logging.LogLongMessage("PayPal Send Request", "Serlialized Request to PayPal API: " + postData); string response = requestSender.SendRequest(Configuration.Current.PayPalAPIUrl, postData); string decodedResponse = System.Web.HttpUtility.UrlDecode(response, System.Text.Encoding.Default); Logging.LogLongMessage("PayPal Response Recieved", "Decoded Respose from PayPal API: " + decodedResponse); return deserializer.Deserialize<SetExpressCheckoutResponse>(decodedResponse); }
// See ITransactionRegistrar for parameter descriptions public SetExpressCheckoutResponse SendSetExpressCheckout(string currencyCode, decimal amount, string description, string trackingReference, string serverURL, List <ExpressCheckoutItem> purchaseItems = null, string userEmail = null) { SetExpressCheckoutRequest request = new SetExpressCheckoutRequest(currencyCode, amount, description, trackingReference, serverURL, purchaseItems, userEmail); string postData = serializer.Serialize(request); Logging.LogLongMessage("PayPal Send Request", "Serlialized Request to PayPal API: " + postData); string response = requestSender.SendRequest(Configuration.Current.PayPalAPIUrl, postData); string decodedResponse = System.Web.HttpUtility.UrlDecode(response, System.Text.Encoding.Default); Logging.LogLongMessage("PayPal Response Recieved", "Decoded Respose from PayPal API: " + decodedResponse); return(deserializer.Deserialize <SetExpressCheckoutResponse>(decodedResponse)); }