If customer want money back from clickbank, how to delete customers file on my server

Discussion in 'ClickBank' started by Clicking, Mar 15, 2011.

  1. #1
    Hi,

    I sell a software where users pay for a Login to this software. This login is saved like this:
    Database/CustomerLogins/User1Login.txt

    Now if this customer doesn´t want this software and want his/hers money back, in this case from Clickbank.

    How will it be possible to automatically delete the file User1Login.txt ?
     
    Clicking, Mar 15, 2011 IP
  2. floodrod

    floodrod Well-Known Member

    Messages:
    829
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Yes possible. Clickbank API sends refund variables. We use this data in our affiliate program.

    You can get programmer to code- receive refund IPN from clickbank then remove user from list.

    But you will need a coder
     
    floodrod, Mar 15, 2011 IP
  3. Clicking

    Clicking Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That sounds wonderful. I am a fully C# and ASP.net programmer myself, so I will be able to do this.

    The only thing I need to know is where I can find documentation and examples of this kind of functionality.
    How and where this API send refund variables and how I can retreive them and so on...

    Like if a customer refund this product, how can I match this against the purchase and so on?

    I found information here but not examples:
    http://www.clickbank.com/help/account-help/account-tools/clickbank-api/

    One information was the one I am after to retreive but are looking for reallife coding examples
    Request a refund for a customer’s purchase
     
    Last edited: Mar 16, 2011
    Clicking, Mar 16, 2011 IP
  4. Clicking

    Clicking Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I managed to find the function for this. I have put an API and CLERK key in my Account tab. I have put them in this function. (I have changed the keys in this example so they are not the right one)

    It do retreive this information for a buy. What I wonder is how a refund tag would look like. I beleive that tag should be avaliable for this order if that did occur?

    ORDERINFORMATION
    <orderData xmlns:cb="http://www.clickbank.com/api">
    <date>2011-03-14T08:23:03-07:00</date>
    <receipt>6RBJRLEH</receipt>
    <promo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <pmtType>TEST</pmtType>
    <txnType>TEST_SALE</txnType>
    <item>1</item>
    <amount>84.63</amount>
    <site>USERNAME</site>
    <affi xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <country>SE</country>
    <state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <lastName>NAME2</lastName>
    <firstName>NAME1</firstName>
    <currency>SEK</currency>
    <email>email@hotmail.com</email>
    <zip>11129</zip>
    <rebillAmount xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <processedPayments xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <futurePayments xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <nextPaymentDate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <status xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <accountAmount>57.22</accountAmount>
    <role>VENDOR</role>
    <customerDisplayName>Peter Andersson</customerDisplayName>
    </orderData>




    
        protected void Page_Load(object sender, EventArgs e)
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.clickbank.com/rest/1.2/orders/list");
            request.Accept = "application/xml";
            request.Headers.Add(HttpRequestHeader.Authorization, "DEV-DSLKJFDS8DFSHFDS98HFD98HDSFOIDSFH90DFS:API-SDKJFKDSKLJSFLKDSF789S767SJLDJFDS7");
            request.Method = "GET";
    
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    
            Console.WriteLine(response.StatusCode);
            Console.WriteLine(response.StatusDescription);
            Stream resStream = response.GetResponseStream();
    
            string tempString = null;
            int count = 0;
            byte[] buf = new byte[8192];
    
            StreamWriter st = new StreamWriter(Server.MapPath("info.txt"));
            do
            {
                count = resStream.Read(buf, 0, buf.Length);
    
                if (count != 0)
                {
                    tempString = Encoding.ASCII.GetString(buf, 0, count);
                    st.WriteLine(tempString);
                }
            }
            while (count > 0);
            st.Close();
            
        }
    
    Code (markup):
     
    Last edited: Mar 16, 2011
    Clicking, Mar 16, 2011 IP
  5. floodrod

    floodrod Well-Known Member

    Messages:
    829
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    135
    #5
    floodrod, Mar 17, 2011 IP