The Code Element

The code element gives you the freedom to personalise the website even more. And you don’t need to be a coder to do that. For example, you can embed music, playlists from Spotify, SoundCloud. You could even embed a podcast from SoundCloud or any other platform that allows embedding.

In the video below, we have used the Code element to embed a playlist from Spotify. Took us about 20 seconds:

Adding a PayPal “Buy Now” button

A more advanced use of the Code element is to add PayPal Buttons, in case you want an easy way to sell your products. PayPal has a tutorial about how you can generate the buttons: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/buy_now_step_1/

In a different article, PayPal offers snippets of code that you can use directly into your website: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/html_example_buy_now/

We’ve just copied the code they’re offering for a basic Buy Now button:

<form action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>

<!– Identify your business so that you can collect the payments. –>
<input type=”hidden” name=”business” value=”herschelgomez@xyzzyu.com”>

<!– Specify a Buy Now button. –>
<input type=”hidden” name=”cmd” value=”_xclick”>

<!– Specify details about the item that buyers will purchase. –>
<input type=”hidden” name=”item_name” value=”Hot Sauce-12oz. Bottle”>
<input type=”hidden” name=”amount” value=”5.95″>
<input type=”hidden” name=”currency_code” value=”USD”>

<!– Display the payment button. –>
<input type=”image” name=”submit” border=”0″
src=”https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_buynow_107x26.png”
alt=”Buy Now”>
<img alt=”” border=”0″ width=”1″ height=”1″
src=”https://www.paypalobjects.com/en_US/i/scr/pixel.gif” >

</form>

You have to change the email address from their code with your own PayPal registered email address:
<!– Identify your business so that you can collect the payments. –>

<input type=”hidden” name=”business” value=”herschelgomez@xyzzyu.com”>

Second step is to change the details of the product:
  <!– Specify details about the item that buyers will purchase. –>
<input type=”hidden” name=”item_name” value=”Hot Sauce-12oz. Bottle”>
<input type=”hidden” name=”amount” value=”5.95″>
<input type=”hidden” name=”currency_code” value=”USD”>
Change the “Hot Sauce-12oz. Bottle” with the name of your product:
  <input type=”hidden” name=”item_name” value=”My Amazing Product”>
Now change the price:
<input type=”hidden” name=”amount” value=”5.95″>
You should change the currency value as well to GBP or EUR, or whatever else currency you use.

<input type=”hidden” name=”currency_code” value=”GBP”>

 

Once you have made those changes, just add the code into the Code element, and that’s it – you can now receive payments.