notify url is not called

Posted by Jahangeer Ahmed on Stack Overflow See other posts from Stack Overflow or by Jahangeer Ahmed
Published on 2012-11-14T04:58:02Z Indexed on 2012/11/14 4:59 UTC
Read the original article Hit count: 240

Filed under:

Dim redirecturl As String = "" redirecturl = ConfigurationManager.AppSettings("papalUrl").ToString() & "us/cgi-bin/webscr?cmd=_cart&upload=1&business=" & ConfigurationManager.AppSettings("paypalemail").ToString() Dim j As Integer = 0 Dim dr1 As DataRow If ds.Tables("ReviewOrder").Rows.Count > 0 Then Dim requestsFile As String = Server.MapPath("~/App_Data/PaymentRequests.xml") ' ds.Tables("ReviewOrder").WriteXml(requestsFile) For j = 0 To ds.Tables("ReviewOrder").Rows.Count - 1 dr1 = ds.Tables("ReviewOrder").Rows(j)

            redirecturl += "&item_name_" & j + 1 & "=" & dr1("varTitle")
            redirecturl += "&amount_" & j + 1 & "=" & dr1("flRate")
            redirecturl += "&image_url_" & j + 1 & "=" & ConfigurationManager.AppSettings("RSSurl").ToString() & dr1("imgImage")

            redirecturl += "&quantity_" & j + 1 & "=" & Convert.ToInt64(dr1("flQuantity"))
            ''redirecturl += "&item_name_2=Sample_testing2&amount_2=9.50"
            ''redirecturl += "&quantity_2=2"
            ''redirecturl += "&item_name_3=Sample_testing3"
            ''redirecturl += "&amount_3=8.50"
            ''redirecturl += "&quantity_3=3"
            redirecturl += "&custom_" & j + 1 & "=" & dr1("BasketID")
        Next
    End If
    redirecturl += "&currency=" & ConfigurationManager.AppSettings("CurrencyCode").ToString()
    redirecturl += "&first_name=" & firstName
    redirecturl += "&last_name=" & lastName
    redirecturl += "&city=" & city
    redirecturl += "&state=" & state
    redirecturl += "&zip=" & zip
    redirecturl += "&address1=" & address1
    redirecturl += "&address2=" & address2

    redirecturl += "&notify_url=" & Server.UrlEncode(ConfigurationManager.AppSettings("NotifyUrl").ToString() & "&rm=2")

    redirecturl += "&return=" & ConfigurationManager.AppSettings("SuccessURL").ToString()

    'Failed return page url
    redirecturl += "&cancel_return=" & ConfigurationManager.AppSettings("FailedURL").ToString()

    Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "Redirect", "window.parent.location='" & redirecturl & "';", True)

© Stack Overflow or respective owner

Related posts about notify