HTML 贝宝表格
我写了一个代码。当您按“提交”时,我需要添加贝宝按钮,当您付款时,我会质疑电子邮件。有帮助吗? 我从不使用贝宝。
<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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关注 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:
id
to capture as inputYou 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 .