Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a Silverlight 4 LOB application to which I would like to add a simple subscription service. Have set up a secure WCF service which returns a valid paykey. The question is how to utilise this resource in Silverlight without exposing the key on the client.

A simple solution that works but exposes the key on the client uses HtmlPage.Window.Navigate(new System.Uri(redirectURL)) on a SL button click event to mimic the call to response.redirect(redirectURL) in the asp samples.

I have also seen working samples of Express Checkout using the Merchant button scripts inside a div element in default.aspx as follows.
XML
<div id="paypal_area" style="position:absolute;top:0px;left:0px;display:none">
    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="XXXXXXXXXX">
    <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </form>
</div>

My question relates to the current best approach in Silverlight to using the Adaptive Payments API. I assume that I need a script in default.aspx that responds to a html button click event but I don't know how to implement the javascript required or how to position the button. Any help would be appreciated.

Regards,
Justin
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900