Paypal with express checkout to get BillingAgreementID

split-visionz

New Member
I am working with the paypal using express checkout to get a billing agreement id.I was following this guide:https://www.x.com/developers/paypal/documentation-tools/how-authorize-and-run-reference-transaction-express-checkoutIn the first step when i do "SetExpressCheckout":The following is the codepublic string SetExpressCheckout(string Amount) { string returnURL = "http://localhost:50325/ReviewOrder.aspx" + "?amount=" + Amount + "&PAYMENTREQUEST_0_CURRENCYCODE=USD"; string cancelURL = returnURL.Replace("ReviewOrder", "ExpCheckOut"); string strCredentials = "USER=" + strUsername + "&PWD=" + strPassword + "&SIGNATURE=" + strSignature; string strNVP = strCredentials; strNVP += "&PAYMENTREQUEST_0_PAYMENTACTION=AUTHORIZATION&&PAYMENTREQUEST_0_AMT=25" + "&L_BILLINGTYPE0=MerchantInitiatedBilling" + "&RETURNURL=" + returnURL; strNVP += "&CANCELURL=" + cancelURL; strNVP += "&METHOD=SetExpressCheckout&VERSION=" + strAPIVersion + "&DESC=test EC payment" +"&NOSHIPPING=0" ; //Create web request and web response objects, make sure you using the correct server (sandbox/live) HttpWebRequest wrWebRequest = (HttpWebRequest)WebRequest.Create(strNVPSandboxServer); //Set WebRequest Properties wrWebRequest.Method = "POST"; // write the form values into the request message StreamWriter requestWriter = new StreamWriter(wrWebRequest.GetRequestStream()); requestWriter.Write(strNVP); requestWriter.Close(); // Get the response. HttpWebResponse hwrWebResponse = (HttpWebResponse)wrWebRequest.GetResponse(); StreamReader responseReader = new StreamReader(wrWebRequest.GetResponse().GetResponseStream()); // and read the response string responseData = http://stackoverflow.com/questions/15606074/responseReader.ReadToEnd(); responseReader.Close(); return responseData; }The response is: TOKEN=EC-09082530FY878870B& TIMESTAMP=2013-03-25T00:45:56Z& CORRELATIONID=3d33037174d55& ACK=SuccessWithWarning& VERSION=86& BUILD=5479129& L_ERRORCODE0=11452& L_SHORTMESSAGE0=Merchant not enabled for reference transactions& L_LONGMESSAGE0=Merchant not enabled for reference transactions& L_SEVERITYCODE0=WarningHow to to get a BillingAgreeentd in Step 3:Code for step 3 is:public string GetBillingAgreementID() { string returnURL = "http://localhost:50325/ReviewOrder.aspx" + "?amount=" + Amount + "
 
Back
Top