Behrouz Riahi
Behrouz Riahi

Reputation: 1791

Adding Paypal "Buy Now" button to the html file

am following Paypal tutorial for adding "Buy now" button. I pasted the button code as it is shown in the code below

<template name="itemDetails">
        <div class="container">

        <div class="row">

            <div class="col-md-3">
                <p class="lead">Categories</p>
                <div class="list-group">
                    <a href="#" class="list-group-item">Android</a>
                    <a href="#" class="list-group-item">IOS</a>
                    <a href="#" class="list-group-item">Unity</a>
                </div>
                <button type="button" class="btn btn-info btn-block sell">Post</button>

                 <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
                <input type="hidden" name="cmd" value="_s-xclick">
                <input type="hidden" name="hosted_button_id" value="someRandomeValue">
                <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
                <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
            </form>


            </div>

but i can't see the button when navigate to the page! why?

Upvotes: 3

Views: 323

Answers (1)

Behrouz Riahi
Behrouz Riahi

Reputation: 1791

It turned to be silly mistake which i didn't notice earlier. i had to include this line of code in the server side

BrowserPolicy.content.allowOriginForAll( '*.paypalobjects.com' );

Upvotes: 1

Related Questions