Paypal的后端paypal例证在Plunker

jol*_*lly 3 paypal express-checkout

在Plunker中用于上下文类型支付的Paypal文档的一个示例中,给出了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>
Run Code Online (Sandbox Code Playgroud)

以下是示例:http ://plnkr.co/edit/UhNka4VaaRRGY1TK32LE? p=preview以下是URL: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

Vim*_*ath 7

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>
Run Code Online (Sandbox Code Playgroud)

现在,在内部,ec_call.php您需要运行SetExpresscheckout API调用,并在该返回URL中执行Doexpresscheckout API调用.而已.

您也可以下载PHP示例代码.