- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用 joomla 并带来了一个允许用户在我的网站上发布列表的组件。该插件使用信用系统来支付列表费用,但信用系统非常复杂且令人困惑,因此我已将其禁用。
我发现 PayPal 提供了一些代码,可以在任何网页上插入“立即购买”按钮 :) 完美,正是我想要的!
我遇到的唯一问题是目前该按钮显示在我的“添加列表”表单(它也是组件的一部分)上,但只需单击表单的提交按钮就可以轻松绕过它,这意味着列表可以无需付费即可发布。
所以我的问题是:
我正在使用 html + php :)
我用来生成立即购买按钮的代码是
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="smyacc@hotmail.com">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="listing-purchase">
<input type="hidden" name="amount" value="2.99">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="shipping" value="0.00">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/GB/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_GB/i/scr/pixel.gif" width="1" height="1">
</form>
非常感谢对此的任何帮助!!!
卢克
最佳答案
好消息 - 您问题的答案基本上是是。您的最终目标绝对可行,但为了真正彻底解决您的问题,我们可能需要更多信息。
然而,您的处理方式因情况而异,不幸的是,自从我配置这些按钮以来已经有一段时间了,所以请耐心等待 ;-)
once the user clicks on the buy it now button is it possible to redirect them back the the add listing form they were just filling out?
是的,这是一个非常标准的功能,PayPal 已将其内置到他们的按钮和流程中。您在这里寻找的是 PayPal 所谓的“返回 URL”或“自动返回”。这是 the page with more of the documentation I quoted below因此您可以决定返回 URL 或自动返回或支付数据传输选项是否最适合您。
Returning buyers to your website after they check out
The basic checkout experience leaves buyers on the PayPal website after they check out. Use one of the following techniques to enhance the checkout experience so that buyers return to your website, instead.
Return URL: Allow buyers return to a page on your website if they click a return link or button on the PayPal payment confirmation page.
To learn more, see item #5 under Step 3: Adding advanced features to your Buy Now button or HTML variables for displaying PayPal checkout pages.
Auto Return: Have PayPal return customers automatically to a page on your website.
Important: PayPal recommends that you turn Payment Data Transfer on when you turn Auto Return on. With Auto Return on, PayPal redirects buyers to your website from an alternative PayPal payment confirmation page, which does not allow them to print PayPal receipts. Payment Data Transfer provides the transaction information that you need to allow buyers to print receipts from your website.
To learn more, see Auto Return.
Payment Data Transfer: PayPal includes information about the completed transaction when you use a return URL or Auto Return to send customers back to your website. Use the information that Payment Data Transfer provides to display a "thank you, print your receipt" page on your website. To learn more, see the Payment Data Transfer.
Question Can I disable the submit button on the form until the payment has been confirmed?
当然。要在确认付款之前禁用表单上的提交按钮,只需执行以下两项操作之一,直到您可以检测到付款已确认:
<button type="submit" disabled>Submit Listing</button>
<button type="submit" style="display:none">Submit Listing</button>
Question Does the PayPal 'Buy Now' button return any information confirming the process was successful?
同样,有几种方法可以解决这个问题。
方法 1 最简单的方法可能是使用 PayPal 返回 URL 和一些 GET 参数来告诉您事情是否已完成或已取消。有类似取消的返回 URL 和完成的返回 URL 之类的东西。在我链接的同一页面上,PayPal 记录了与此功能相关的按钮的创建:
Take buyers to a specific webpage (URL) after checkout cancellation (optional)?
Select the checkbox and enter a URL in the text box if you have a special page on your website where you want buyers to return to if they cancel their checkouts before completing their transactions.
Take buyers to a specific webpage (URL) after successful checkout (optional)?
Select the checkbox and enter a URL in the text box if you have a special page on your website where you want buyers to return to after they complete checkout successfully.
方法 2 更高级的方法(这也更简单,因为在第一种方法中黑客可以尝试猜测您的成功返回 URL)是使用 PayPal 的即时付款通知 功能。使用此功能,PayPal 向私有(private)(幕后)URL 发送 POST 请求,该 URL 允许您捕获它发送给您的与支付完成相关的数据。
所以你的后台接收到支付完成的信息,有无数种方式(AJAX请求,要求用户刷新浏览器或者给用户发邮件告诉他们回来完成等等)你可以着手为用户更新前端,以便他们可以使用现在可见/启用的提交按钮。
对于 details and documentation on PayPal's notify_url通过他们的 IPN 系统。
祝你好运!
关于php - 使用 paypal 按钮 - 我的网页可以判断 paypal 交易是否成功吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33762967/
这个问题与窗口处理或多个浏览器窗口的杂耍无关,而是关于在同一窗口中浏览 Web 应用程序的网页。我遇到这样的情况 1.我导航为屏幕 A->屏幕 x->屏幕 Y->屏幕 B 2.我需要捕获首次登录时屏幕
我有这个要求: The system will record the length of time the user displayed each page. 虽然在富客户端应用程序中微不足道,但我不
我在调试 JavaScript 网页时遇到问题。我遇到困难的地方是我标记 (...) 的地方。我收到未定义的错误。我是否将函数 countDown(start, Increment) 中的参数(即 s
需要一些帮助。我刚开始学习 HTML,今天一直在研究如何制作菜单,但在这样做时遇到了问题。 我似乎不知道如何在屏幕上居中显示菜单。 这就是我目前所拥有的; Home
我想通过单击按钮将小程序的任何参数发送到浏览器。 (HTML)。我知道按钮对象有一些方法,但不知道使用哪个。我怎样才能做到这一点?ps .: 我使用的是 jnlp 协议(protocol)。 类似于:
我应该使用Wikipedia的文章链接数据转储从组织的网站中提取代表性术语。 为此,我已经- 抓取并下载了该组织的网页。 (〜110,000) 创建了Wikipedia ID和术语/标题的字典。 (约
我的网页中包含 javascript 函数... function callFromAndroid(varName) { alert("call from android activated by
我想创建一个 Java 应用程序,允许用户导入网页并能够在程序中对其进行编辑。 导入网页将对其进行渲染,并且页面的组件(图像、文本等)将是可编辑或可拖动的,从而允许用户重新布局组件。 例如,用户可以加
当我们按下按钮时,我向 JFrame 添加了一个网页(网页在同一框架中打开)。效果很好。但我想向其中添加一个scrollPane,但是当我添加 JScrollPane jsp = new JScrol
我在使用 particles.js 时无法将图像居中。图像居中,但略微偏离中心。为什么要这样做,我如何才能将它居中? html particles.js demo CSS
我正在尝试在加载页面时播放音频,它应该非常简单但我无法完成。 问题是它没有播放,我尝试检查自动播放的状态(真/假),它说它在页面加载时播放,尽管它没有播放,还尝试制作一个将改变自动播放的功能状态为
我正在尝试显示用户从列表中选择的图像,但我在屏幕上看不到任何内容。 .container { position: relative; } .ce
这听起来有点奇怪,但我需要一些帮助,网页必须有一行必须包含三个部分,第一部分必须有 1 列的偏移量,并且部分之间的空间必须是 10px到目前为止,使用 Bootstrap 一切顺利。 现在第二行将有
这个问题在这里已经有了答案: Web and physical units (2 个答案) Div width in cm (inch) (6 个答案) 关闭 9 年前。
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
我想将我的 IPython 笔记本的宽度设置为 2500 像素,并且我希望它左对齐。我该怎么做? 我使用这段代码来应用我自己的 CSS: from IPython.core.display impor
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 7 年前。 Improve this q
我在 Word 中制作了一份文档,希望人们在其中添加自己的姓名以及他们的教学经验。我已将其保存为网页并发布到此处: http://epicforum.net/TS ...但操作部分实际上就是这样: h
这个问题在这里已经有了答案: Execute JS code after pressing the spacebar (5 个答案) 关闭 4 年前。
我正在开发一个只有两个页面的网站。 1.登录 2.首页 我正在使用 Angular 框架。 app.config(['$routeProvider', function ($routeProvider
我是一名优秀的程序员,十分优秀!