HTML 贝宝表格

发布于 2025-01-19 20:26:56 字数 592 浏览 2 评论 0原文

我写了一个代码。当您按“提交”时,我需要添加贝宝按钮,当您付款时,我会质疑电子邮件。有帮助吗? 我从不使用贝宝。

<h3>Prescription</h3>

<div class="container">
  <form action="action_page.php">

    <label for="consultation">consultation</label>
    <input type="text" id="consult"

    
    <textarea id="subject" name="subject" style="height:200px"></textarea>
    <form action="/action_page.php">
    <input type="file" id="myFile" name="filename">

    <input type="submit" value="Submit">
    
    </form>
  
</div>

</body>

I wrote a code. I need to add the Paypal button when you press "Submit" and when you pay for consultation then I got email with question. Any help ?
I never use PayPal.

<h3>Prescription</h3>

<div class="container">
  <form action="action_page.php">

    <label for="consultation">consultation</label>
    <input type="text" id="consult"

    
    <textarea id="subject" name="subject" style="height:200px"></textarea>
    <form action="/action_page.php">
    <input type="file" id="myFile" name="filename">

    <input type="submit" value="Submit">
    
    </form>
  
</div>

</body>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

痞味浪人 2025-01-26 20:26:56

关注 paypal结帐集成集成指南并进行2条路线(URL路径)您的服务器:

  • 一个用于“
  • 捕获订单”的“创建订单”一个,以ID作为输入捕获

您可以使用Checkout-PHP-SDK将路由的API调用或拥有首先获取访问令牌然后进行呼叫的HTTPS实现。这两种路线都应仅返回JSON数据(无HTML或文本)。在第二路线内,当捕获API成功时,您应该验证金额正确,并将其由此产生的付款详细信息存储在您的数据库中(尤其是paskuy_units [0] .payments.payments.captures.captures [0] .id,这是PayPal事务ID)并执行任何必要的业务逻辑(例如发送您想要的电子邮件或保留产品) 将返回JSON转发给前端呼叫者之前。如果错误向前转发JSON的详细信息,因为前端必须处理此类情况。

将这两条路线与此前端批准流配对: https:https:https:///developer.paypaler.paypal。 com/demo/beckout/#/tatter/server

Follow the PayPal Checkout integration guide and make 2 routes (url paths) on your server:

  • one for 'Create Order'
  • one for 'Capture Order' that takes an id to capture as input

You can use the Checkout-PHP-SDK for the routes' API calls to PayPal, or your own HTTPS implementation of first getting an access token and then doing the call. Both of these routes should return only JSON data (no HTML or text). Inside the 2nd route, when the capture API is successful you should verify the amount was correct and store its resulting payment details in your database (particularly purchase_units[0].payments.captures[0].id, which is the PayPal transaction ID) and perform any necessary business logic (such as sending this email you want, or reserving product) immediately before forwarding your return JSON to the frontend caller. In the event of an error forward the JSON details of it as well, since the frontend must handle such cases.

Pair those 2 routes with this frontend approval flow: https://developer.paypal.com/demo/checkout/#/pattern/server .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文