0

I am getting following errors. I have tried many things but it is not working. It is a login with Paypal payment system it is working when I tested on Paypal however on code script failing.

<script>
    paypal.use( ["login"], function(login) {
    login.render ({
        'appid': '<b>Notice</b>: Use of undefined constant client_id - assumed 'client_id' in <b>/home/yu/public_html/yu.com/catalog/view/theme/beaute/template/module/pp_login.tpl</b> on line <b>8</b>client_id',
        'authend': '<b>Notice</b>: Use of undefined constant sandbox - assumed 'sandbox' in <b>/home/yu/public_html/yu.com/catalog/view/theme/beaute/template/module/pp_login.tpl</b> on line <b>9</b>sandbox',
        'scopes': '<b>Notice</b>: Use of undefined constant scopes - assumed 'scopes' in <b>/home/yu/public_html/yu.com/catalog/view/theme/beaute/template/module/pp_login.tpl</b> on line <b>10</b>scopes',
        'containerid': 'pp_login_container',
        'locale': '<b>Notice</b>: Use of undefined constant locale - assumed 'locale' in <b>/home/yu/public_html/yu.com/catalog/view/theme/beaute/template/module/pp_login.tpl</b> on line <b>12</b>locale',
        'theme': '<b>Notice</b>: Use of undefined constant button_colour - assumed 'button_colour' in <b>/home/yu/public_html/yu.com/catalog/view/theme/beaute/template/module/pp_login.tpl</b> on line <b>13</b>button_colour',
        'returnurl': '<b>Notice</b>: Use of undefined constant return_url - assumed 'return_url' in <b>/home/yu/public_html/yu.com/catalog/view/theme/beaute/template/module/pp_login.tpl</b> on line <b>14</b>return_url'
    });
});
    </script>

Here is the code causing error.

  <div class="panel panel-default">
  <div class="panel-body" style="text-align: right;">
    <span id="pp_login_container"></span>
   <script src="https://www.paypalobjects.com/js/external/api.js"></script>
    <script>
    paypal.use( ["login"], function(login) {
    login.render ({
        'appid': '<?php if (isset($pp_login_client_id)) echo $pp_login_client_id;else echo client_id; ?>',
        'authend': '<?php if (isset($pp_login_sandbox)) echo $pp_login_sandbox;else echo sandbox; ?>',
        'scopes': '<?php if (isset($pp_login_scopes)) echo $pp_login_scopes;else echo scopes; ?>',
        'containerid': 'pp_login_container',
        'locale': '<?php if (isset($pp_login_locale)) echo $pp_login_locale;else echo locale; ?>',
        'theme': '<?php if (isset($pp_login_button_colour)) echo $pp_login_button_colour;else echo button_colour; ?>',
        'returnurl': '<?php if (isset($pp_login_return_url)) echo $pp_login_return_url;else echo return_url; ?>'
    });
});
    </script>
  </div>
</div>
Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130
JOZO
  • 99
  • 1
  • 10

1 Answers1

2

if client_id, sanbox etc are variables, put $ with it. like $client_id..etc. if not, it should be like echo 'client_id'; If they are constants, it should be defined. like, define('client_id', 'some value');

VipindasKS
  • 516
  • 7
  • 15
  • please check [here](http://stackoverflow.com/questions/36887028/create-paypal-sandbox-merchant-seller-account) – fresher Apr 27 '16 at 10:45