protected void Submit_Click(object sender, EventArgs e) { // Create request object BMManageButtonStatusRequestType request = new BMManageButtonStatusRequestType(); // (Required) The ID of the hosted button whose status you want to change. request.HostedButtonID = hostedID.Value; //(Required) The new status of the button. It is one of the following values: //DELETE - the button is deleted from PayPal request.ButtonStatus = (ButtonStatusType) Enum.Parse(typeof(ButtonStatusType), buttonStatus.SelectedValue); // Invoke the API BMManageButtonStatusReq wrapper = new BMManageButtonStatusReq(); wrapper.BMManageButtonStatusRequest = request; // Configuration map containing signature credentials and other required configuration. // For a full list of configuration parameters refer in wiki page // (https://github.com/paypal/sdk-core-dotnet/wiki/SDK-Configuration-Parameters) Dictionary<string, string> configurationMap = Configuration.GetAcctAndConfig(); // Creating service wrapper object to make an API call by loading configuration map. PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(configurationMap); BMManageButtonStatusResponseType response = service.BMManageButtonStatus(wrapper); // Check for API return status setKeyResponseObjects(service, response); }