public async static Task <string> listAllPayments()
        {
            using (var client = PayPalRestfulClient.getPayPalClientInstance())
            {
                var access_token = await client.paypal_access_token_2(clientid, scret);

                return(await client.paypal_list_payments(access_token));
            }
        }
        public async static Task <string> executePayment(string token, string payerID)
        {
            using (var client = PayPalRestfulClient.getPayPalClientInstance())
            {
                string access_token = @"";
                var    url          = getExecuteUrlAndAccessTokenByToken(ref access_token, token);

                return(await client.paypal_execute_payment(access_token, url, payerID));
            }
        }
        /************************************************************************/
        /* three step for one payment                                           */
        /* 1. create payment                                                    */
        /* 2. get approvel url and let user pay with paypal                     */
        /* 3. execute the payment by execute url                                */
        /************************************************************************/
        public async static Task <string> createPayment(//string clientID, string scret,
            string amount, string des
            , string returnUrl = @"http:\\localhost"
            , string cancelUrl = @"http:\\localhost")
        {
            using (var client = PayPalRestfulClient.getPayPalClientInstance())
            {
                var access_token = await client.paypal_access_token_2(clientid, scret);

                var create_result = await client.paypal_create_payment(access_token, amount, des, returnUrl, cancelUrl);

                dynamic reVal = JsonConvert.DeserializeObject(create_result);
                //_dic.Add(getApproalTokenFromResult(reVal), reVal);
                _dic.Add(access_token, reVal);
                return(getApproalUrl(reVal.links));
            }
        }