protected void Submit_Click(object sender, EventArgs e)
        {
            // Create request object
            ReverseTransactionRequestType request = new ReverseTransactionRequestType();
            request.ReverseTransactionRequestDetails = new ReverseTransactionRequestDetailsType();
            request.ReverseTransactionRequestDetails.TransactionID = transactionID.Value;

            // Invoke the API
            ReverseTransactionReq wrapper = new ReverseTransactionReq();
            wrapper.ReverseTransactionRequest = request;

            // Configuration map containing signature credentials and other required configuration.
            // For a full list of configuration parameters refer in wiki page
            // [https://github.com/paypal/sdk-core-dotnet/wiki/SDK-Configuration-Parameters]
            Dictionary<string, string> configurationMap = Configuration.GetAcctAndConfig();

            // Create the PayPalAPIInterfaceServiceService service object to make the API call
            PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(configurationMap);

            // # API call
            // Invoke the ReverseTransaction method in service wrapper object
            ReverseTransactionResponseType ReverseTransactionResponse = service.ReverseTransaction(wrapper);

            // Check for API return status
            setKeyResponseObjects(service, ReverseTransactionResponse);
        }
Esempio n. 2
0
        protected void Submit_Click(object sender, EventArgs e)
        {
            // Create request object
            ReverseTransactionRequestType request = new ReverseTransactionRequestType();
            request.ReverseTransactionRequestDetails = new ReverseTransactionRequestDetailsType();
            request.ReverseTransactionRequestDetails.TransactionID = transactionID.Value;

            // Invoke the API
            ReverseTransactionReq wrapper = new ReverseTransactionReq();
            wrapper.ReverseTransactionRequest = request;
            PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService();
            ReverseTransactionResponseType ReverseTransactionResponse = service.ReverseTransaction(wrapper);

            // Check for API return status
            setKeyResponseObjects(service, ReverseTransactionResponse);
        }
        /// <summary>
        /// 
        /// </summary>
        ///<param name="reverseTransactionReq"></param>
        ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param> 
        public ReverseTransactionResponseType ReverseTransaction(ReverseTransactionReq reverseTransactionReq, ICredential credential)
        {
            setStandardParams(reverseTransactionReq.ReverseTransactionRequest);
            DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(this.config, reverseTransactionReq.ToXMLString(null, "ReverseTransactionReq"), null, null);
            IAPICallPreHandler apiCallPreHandler = new MerchantAPICallPreHandler(this.config, defaultHandler, credential);
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName;
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion;
            ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = "PayPalAPIAA";

            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.LoadXml(Call(apiCallPreHandler));
            return new ReverseTransactionResponseType(
                xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='ReverseTransactionResponse']")
            );
        }
 /// <summary> 
 /// 
 /// </summary>
 ///<param name="reverseTransactionReq"></param>
 public ReverseTransactionResponseType ReverseTransaction(ReverseTransactionReq reverseTransactionReq)
 {
     return ReverseTransaction(reverseTransactionReq,(string) null);
 }
 /**
   *AUTO_GENERATED
  	  */
 public ReverseTransactionResponseType ReverseTransaction(ReverseTransactionReq reverseTransactionReq, string apiUserName)
 {
     IAPICallPreHandler apiCallPreHandler = null;
      		string portName = "PayPalAPIAA";
     setStandardParams(reverseTransactionReq.ReverseTransactionRequest);
     DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(reverseTransactionReq.ToXMLString(null, "ReverseTransactionReq"), null, null);
     apiCallPreHandler = new MerchantAPICallPreHandler(defaultHandler, apiUserName, getAccessToken(), getAccessTokenSecret());
     ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName;
     ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion;
     ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = portName;
     string response = Call(apiCallPreHandler);
     XmlDocument xmlDocument = new XmlDocument();
     xmlDocument.LoadXml(response);
     XmlNode xmlNode = xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='ReverseTransactionResponse']");
     return new ReverseTransactionResponseType(xmlNode);
 }
 /**
   *AUTO_GENERATED
  	  */
 public ReverseTransactionResponseType ReverseTransaction(ReverseTransactionReq reverseTransactionReq, string apiUserName)
 {
     setStandardParams(reverseTransactionReq.ReverseTransactionRequest);
     string response = Call("ReverseTransaction", reverseTransactionReq.ToXMLString(), apiUserName);
     XmlDocument xmlDocument = new XmlDocument();
     xmlDocument.LoadXml(response);
     XmlNode xmlNode = xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='ReverseTransactionResponse']");
     return new ReverseTransactionResponseType(xmlNode);
 }
 public ReverseTransactionResponseType ReverseTransaction(ReverseTransactionReq ReverseTransactionReq)
 {
     return ReverseTransaction(ReverseTransactionReq, null);
 }
        /**
         *
         */
        public ReverseTransactionResponseType ReverseTransaction(ReverseTransactionReq ReverseTransactionReq, string apiUsername)
        {
            setStandardParams(ReverseTransactionReq.ReverseTransactionRequest);
            string resp = call("ReverseTransaction", ReverseTransactionReq.toXMLString(), apiUsername);

            return new ReverseTransactionResponseType(resp);
        }