Skip to content

Instantly share code, notes, and snippets.

@dph01
Created April 28, 2012 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dph01/2517015 to your computer and use it in GitHub Desktop.
Save dph01/2517015 to your computer and use it in GitHub Desktop.
def buynow(xhtml: NodeSeq): NodeSeq =
<form name="_xclick"
action={PaypalRules.connection.vend().protocol+"://"+PaypalRules.mode.vend().domain+"/cgi-bin/webscr"}
method="post">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="amount" value={amount.toString} />
<input type="hidden" name="currency_code" value={PaypalRules.currency.vend()} />
{ values.-("amount","currency_code","cmd","submit")
.map(x => <input type="hidden" name={x._1} value={x._2} />) }
<input type="image" src={PaypalRules.button.vend()} name="submit" alt="" />
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment