在其中一个例子中,Paypal docs at Plunker for in-context type payments中,给出了url,但没有关于该后端内部内容的文档。有人能帮帮忙吗。
<div class="row product">
<div class="col-md-4">
<h3>Toy Story Jessie T-Shirt</h3>
<p>
<a href="http://166.78.8.98/cgi-bin/aries.cgi?live=1&returnurl=http://166.78.8.98/cgi-bin/return.htm&cancelurl=http://166.78.8.98/cgi-bin/cancel.htm" id="t1" class="checkout">
<img class="paypal-button-hidden" src="https://www.paypalobjects.com/fr_FR/i/btn/btn_xpressCheckout.gif" alt="Check out with PayPal" />
</a>
</p>
</div>
</div>这是一个例子:http://plnkr.co/edit/UhNka4VaaRRGY1TK32LE?p=preview这里是:http://166.78.8.98/cgi-bin/aries.cgi?live=1&returnurl=http://166.78.8.98/cgi-bin/return.htm&cancelurl=http://166.78.8.98/cgi-bin/cancel.htm
发布于 2015-08-06 15:26:09
HTML:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
<form id="myContainer" method="post" action="ec_call.php" accept-charset="UTF-8">
</form>
<script>
window.paypalCheckoutReady = function() {
paypal.checkout.setup('S4X5XW328WAYY', {
container: 'myContainer',
environment: 'sandbox'
// button: 'incontext_id'
});
}
</script>
</body>
<script src="//www.paypalobjects.com/api/checkout.js" async></script>
</html>现在,在ec_call.php内部,你需要运行你的SetExpresscheckout API调用,在返回的URL中,只需执行do return API调用即可。就这样。
您还可以下载PHP示例code。
https://stackoverflow.com/questions/30111957
复制相似问题