跟随Paypal tutorial添加“立即购买”按钮。我粘贴了按钮代码,如下面的代码所示
<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>
但导航到页面时我看不到按钮!为什么呢?
答案 0 :(得分:1)
这变成了我之前没有注意到的愚蠢错误。 我不得不在服务器端包含这行代码
BrowserPolicy.content.allowOriginForAll( '*.paypalobjects.com' );