Question: We need a way to send the order information (name/email/order number) to a web service which will handle sending out a license key for the digital product. What is the best way to handle this? I know the cart can call a Store Procedure, however, there is little documentation on how to use this and if and what variables can be passed to the Stored Procedure.
Answer:
Enable OnCheckout Complete Event – Allows you to call a custom SQL Server stored procedure that you program. The event that triggers the stored procedure being executed is a successful checkout in the cart.
Note: When naming your stored procedure you will need to append the following:
DatabaseOwner + ObjectQualifier + ModuleQualifier in front of your stored procedure.
DatabaseOwner is usually “dbo”
ObjectQualifier – Is assigned when you installed DNN (defaults to _dnn)
ModuleQualifier is “Smith”
For example, a stored procedure titled “TransferOrder” should be named as follows:
“dbo.dnn_Smith_ TransferOrder”
I googled “sql server stored procedure call a web service” and there are a lot of articles that explain how to do this
Here is a good link that describes how to call a web service from a stored procedure:
http://www.databasejournal.com/features/mssql/article.php/3821271/Calling-a-Web-Service-from-within-SQL-Server.htm
Also here is a forum post on it http://www.smith-consulting.com/forums/forumid/1/postid/2025/scope/posts.aspx#2025