c# - UpdateRecurringPaymentsProfile + Authentication/Authorization Failed -
i try make request updaterecurringpaymentsprofile
in paypal using httpwebrequest
in
mvc webapplication. problem occurred while processing request.
please see below result.
timestamp=2015-08-19t12:07:38z&correlationid=c803523ed08bf&ack=failure&version=0.000000&build=000000&l_errorcode0=10002&l_shortmessage0=authentication/authorization failed&l_longmessage0=you not have permissions make api call&l_severitycode0=error
httpwebrequest request = (httpwebrequest)webrequest.create("https://api-3t.sandbox.paypal.com/nvp"); request.method = "post"; string formcontent = "&method=updaterecurringpaymentsprofile" + "&profileid=" + httpcontext.current.session["profileid"] + "&amt=" + amt + "¤cycode=" + currencycode + "&acct" + acct + "&firstname=" + firstname + "&lastname=" + lastname + "&street=" + street + "&city=" + city + "&state=" + state + "&countrycode=" + countrycode + "&zip=" + zip; byte[] bytearray = system.text.encoding.utf8.getbytes(formcontent); request.contenttype = "application/x-www-form-urlencoded"; request.contentlength = bytearray.length; system.io.stream datastream = request.getrequeststream(); datastream.write(bytearray, 0, bytearray.length); datastream.close(); webresponse response = request.getresponse(); datastream = response.getresponsestream(); system.io.streamreader reader = new system.io.streamreader(datastream); string responsefromserver = system.web.httputility.urldecode(reader.readtoend()); reader.close(); datastream.close(); response.close();
i made createrecurringpaymentsprofile
command successfully. clueless these issue.
please help.
Comments
Post a Comment