Jump to content


Photo

Paypal Express Checkout In Sandbox Environment, Security Header Is Not Valid, No Mistake In Api Credential

paypal express-checkout api

  • Please log in to reply
No replies to this topic

#1 anto0192

anto0192

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 10 July 2015 - 01:49 PM

Hi! In my GWT-RPC project I want to use Paypal Express Checkout on Sandbox. I run my project on eclipse as GWT Super Dev Mode to test it. 
 
Using the paypal integration wizard I've added the paypalfunctions.java class on my server side that permit calling PayPal API. On my server-side I have this AsyncCall, the log part is for debugging:
 
   
/**


         * PayPal Operations
         */
        @SuppressWarnings("rawtypes")
     public HashMap setCheckoutExpress(DatiPaypalCheckoutExpress paypal){
         paypalfunctions api=new paypalfunctions();
         HashMap response=api.CallMarkExpressCheckout(((Double) paypal.getTOT()).toString(), 
         "http://127.0.0.1:8888/MovieUniverse.html#order_confirmed",
         "http://127.0.0.1:8888/MovieUniverse.html#order_cancelled",
         "", "", "", "", "",
         "", "", "");
    //     response=api.CallShortcutExpressCheckout("10.00",
    //     "http://127.0.0.1:8888/MovieUniverse.html#order_confirmed",
    //     "http://127.0.0.1:8888/MovieUniverse.html#order_cancelled");
         if(response!=null){
         GWT.log("Server: setCheckoutExpress() HashMap: "+response.toString());
         }else
         GWT.log("Server: setCheckoutExpress() HashMap: null");
    
    
         return response;
        }
 
the commented part, CallShortcutExpressCheckout works. But when I use the CallMarkExpressCheckout I receive as response 
 
    {L_LONGMESSAGE0=Security header is not valid, VERSION=93, BUILD=17329237, L_ERRORCODE0=10002, ACK=Failure, CORRELATIONID=9ce80c51dc8a5, TIMESTAMP=2015-07-09T16:25:14Z, L_SEVERITYCODE0=Error, L_SHORTMESSAGE0=Security error}
There aren't spaces in API credentials and the CallShortcutExpressCheckout method works so paypal endpoints are written right. 
I don't know how to solve it.
Summarizing the dates are:
 
gv_APIUserName ="movieuniverse_api1.gmail.com";
gv_APIPassword ="E4T76Z68V4C38FS6";
gv_APISignature ="AFcWxV21C7fd0v3bYYYRCpSSRl31AWKgxYWxptrQw.jokhnsrfl4nC6m";


gv_APIEndpoint ="https://api-3t.sandbox.paypal.com/nvp";
PAYPAL_URL ="https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token=";


String HTTPREQUEST_PROXYSETTING_SERVER = "";
    String HTTPREQUEST_PROXYSETTING_PORT = "";
    boolean USE_PROXY = false;


    gv_Version = "93";


    gv_ProxyServer = HTTPREQUEST_PROXYSETTING_SERVER;
    gv_ProxyServerPort = HTTPREQUEST_PROXYSETTING_PORT;
    gv_Proxy = 2; //'setting for proxy activation
    gv_UseProxy = USE_PROXY;

I think the call to API should works, but it doesn't. Thanks a lot for your attention.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users