This is a sample code for crafting, This should have everything you need. use as you wish, it is in C# / Some lua. enjoy
//This is a bool check if you know this Recipe.
Craft.HasRecipeByName(string ProfessionName, string RecipeName);
//This will Craft a amount you want or the the amount you are able to make. Leave Quantity at 0 if you want to make all you can make.
Craft.CraftItemByName(string profession, string itemName, int Quantity = 0);