-1
VB.net으로 작성된 웹 응용 프로그램이 있습니다. paypal을 통해 지불을 구현했습니다. PC를 통해 결제 할 때 문제가 없지만 모바일을 통해 결제 할 때 몇 가지 문제가 있습니다. 반송 페이지에서 paypal 매개 변수를 읽을 수 없습니다. paypal에서 정보를 읽기 위해 httpwebrequest를 사용했지만 request.form 변수가 비어있어 응답이 "INVALID"입니다.PayPal POST 결제가 모바일 브라우저에서 작동하지 않습니다.
나를 도울 수있는 사람이 있습니까 ??? 우리는 무슨 일이 일어나고 있는지 알아낼 수 있도록 코드를 살펴 가질 필요 해요
Dim objHttp As HttpWebRequest
objHttp = WebRequest.Create("https://www.sandbox.paypal.com/cgi-bin/webscr")
objHttp.Method = "POST"
objHttp.ContentType = "application/x-www-form-urlencoded"
Dim param As Byte() = Request.BinaryRead(HttpContext.Current.Request.ContentLength)
Dim strRequest As String = Encoding.ASCII.GetString(param)
Dim ipnPost As String = strRequest
strRequest += "&cmd=_notify-validate"
objHttp.ContentLength = strRequest.Length
'Send the request to PayPal and get the response
Dim streamOut As New StreamWriter(objHttp.GetRequestStream(), System.Text.Encoding.ASCII)
streamOut.Write(strRequest)
streamOut.Close()
Dim streamIn As New StreamReader(objHttp.GetResponse().GetResponseStream())
Dim strResponse As String = streamIn.ReadToEnd()
streamIn.Close()
Dim myHttpWebResponse As HttpWebResponse = CType(objHttp.GetResponse(), HttpWebResponse)
Dim strIdTransazione = Request.Form("txn_id")
Dim strDscTransazione = Request.Form("payment_status")
'HttpStatusCode.myHttpWebResponse.StatusCode()
If myHttpWebResponse.StatusCode <> HttpStatusCode.OK Then
Else
end if
... –
안녕, 당신은 본 적 ... –