https://github.com/paypal/Checkout-NET-SDK
paypal v2 支付如何调用,代码看的云里雾里
System.AggregateException: One or more errors occurred. ({"error":"invalid_client","error_description":"Client Authentication failed"}) ---> BraintreeHttp.HttpException: {"error":"invalid_client","error_description":"Client Authentication failed"}
at BraintreeHttp.HttpClient.Execute(HttpRequest request)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at PayPalCheckoutSdk.Core.PayPalHttpClient.AuthorizationInjector.Inject(HttpRequest request) at BraintreeHttp.HttpClient.Execute(HttpRequest request) at Qibu.Controllers.PayPalExpressController.Approval(String OrderNO, String Total, String description) at lambda_method(Closure , Object ) at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult() at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at System.Threading.Tasks.ValueTask
1.get_Result()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
---> (Inner Exception #0) BraintreeHttp.HttpException: {"error":"invalid_client","error_description":"Client Authentication failed"}
at BraintreeHttp.HttpClient.Execute(HttpRequest request)<---
不久前我也碰到这个问题,不过我是使用Aliyun.OSS,这个问题是远程连接关闭,本质是你的代码中变量乱用导致的,比如先远程获取了某些数据放到内存中,然后又操作这些内存数据进行另一次远程操作。好好检查代码。