Visualizzazione dei risultati da 1 a 10 su 10

Discussione: asp e paypal

  1. #1

    asp e paypal

    qualcuno può darmi una mano con i codici per la notifica di pagamento?
    ho trovato degli script su internet ma quando provo a fare il test compare sempre ipn handler url invalida
    DesArtes
    design, arts, software & web
    www.desartes.it

  2. #2

    ho inserito questo codice

    <%
    Dim Item_name, Item_number, Payment_status, Payment_amount
    Dim Txn_id, Receiver_email, Payer_email
    Dim objHttp, str

    'leggo la post da PayPal e preparo il comando
    str = Request.Form & "&cmd=_notify-validate"


    ' rimando a paypal la post per la validazione
    set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
    ' set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
    ' set objHttp = Server.CreateObject("Microsoft.XMLHTTP")
    objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false
    objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
    objHttp.Send str

    ' assegno le variabili mandate da paypal a variabili locali
    Item_name = Request.Form("item_name")
    Item_number = Request.Form("item_number")
    Payment_status = Request.Form("payment_status")
    Payment_amount = Request.Form("mc_gross")
    Payment_currency = Request.Form("mc_currency")
    Txn_id = Request.Form("txn_id")
    Receiver_email = Request.Form("receiver_email")
    Payer_email = Request.Form("payer_email")

    'informazioni utente
    for_auction = Request.Form("for_auction")
    auction_buyer_id = Request.Form("auction_buyer_id")
    auction_closing_date = Request.Form("auction_closing_date")

    ' Check notification validation
    if (objHttp.status <> 200 ) then
    ' HTTP error handling
    elseif (objHttp.responseText = "VERIFIED") then
    ' check that Payment_status=Completed
    ' check that Txn_id has not been previously processed
    ' check that Receiver_email is your Primary PayPal email
    ' check that Payment_amount/Payment_currency are correct
    ' process payment
    elseif (objHttp.responseText = "INVALID") then
    ' log for manual investigation
    else
    ' error
    end if

    if (objHttp.responseText = "VERIFICATO") then
    (codice per inviare email)
    end if

    set objHttp = nothing
    DesArtes
    design, arts, software & web
    www.desartes.it

  3. #3
    Non è che per caso ti sei dimenticato di attivare la ricezione di messaggi IPN e di inserire l'url di notifica su paypal ... hai visto mai!

  4. #4
    scusa l'ignoranza, ipn handler url e url di notifica non sono le stesse?
    DesArtes
    design, arts, software & web
    www.desartes.it

  5. #5
    Appunto chiedevo se avevi attivato la ricezione IPN e se l'url di notifica era stato inserito e se corrisponde al giusto nome della pagina sul tuo sito che deve ricevere la notifica.


    Aggiunto dopo: se il problema fosse diverso prova a dare un'occhiata a questo script e vedi se può esserti d'aiuto

  6. #6
    uhm si allora fanno riferimento a quell'unica pagina...
    DesArtes
    design, arts, software & web
    www.desartes.it

  7. #7
    Originariamente inviato da desArtes
    uhm si allora fanno riferimento a quell'unica pagina...
    ti ho dato un link, fammi sapere se ti è d'aiuto!

  8. #8
    grazie mille ora provo a vadere!
    DesArtes
    design, arts, software & web
    www.desartes.it

  9. #9

    ma

    io vorrei che ricevuta la notifica sul conto, mi arrivi anche un'email....è possibile?!
    DesArtes
    design, arts, software & web
    www.desartes.it

  10. #10
    è possibile che sia solo perchè anczichè
    objHttp.responseText = "VERIFIED"
    è
    objHttp.responseText = "Completed"??
    DesArtes
    design, arts, software & web
    www.desartes.it

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.