- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我有一个使用 Javascript/HTML 的 Windows 8 应用程序,在 iframe 中我有一个 Paypal 表单:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="on0" value="Pages">
<select name="os0">
<option value="10">$1.95</option>
<option value="25">$2.95</option>
</select>
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="encrypted" value="[removed]">
<input type="image" src="/btn_buynow_LG.gif" border="0" name="submit" alt="">
</form>
此表单在包括 IE10 在内的所有浏览器中都可以正常工作,但是当从 Windows 8 应用程序的 iframe 中提交时,它会将用户引导至 Paypal 主页。这通常表示表单存在问题。我尝试过托管的 Paypal 按钮、加密的、未加密的按钮,它们都表现出相同的行为。只有当我从 Windows 8 应用程序中提交此表单时,它才会转到 Paypal.com 主页。
我还尝试将每个 URL 作为允许的 URL 添加到我的 list 中:
<ApplicationContentUriRules>
<Rule Match="http://example.com" Type="include" />
<Rule Match="http://*.example.com" Type="include" />
<Rule Match="http://paypal.com" Type="include" />
<Rule Match="http://*.paypal.com" Type="include" />
<Rule Match="https://paypal.com" Type="include" />
<Rule Match="https://*.paypal.com" Type="include" />
</ApplicationContentUriRules>
我尝试添加/删除沙箱属性并添加属性的所有组合,如下所示:
<iframe sandbox="allow-same-origin allow-top-navigation allow-forms allow-scripts allow-popups" src="http://example.com/paypalbtn.html"></iframe>
如果我删除 target="_blank"
,则 Windows 8 应用程序将导航至黑屏并挂起。我被迫 alt-tab 并关闭应用程序。我认为这是在另一个进程中将表单 POST 到新窗口的问题。
如何从 Windows 8 应用程序的 iframe 中启动 Paypal?
是否需要 POST 表单?我现在意识到 GET 表单有效。
最佳答案
当从 Windows 8 应用程序中的 iframe 启动时,Paypal 将阻止表单 POST 到新窗口。结果是您看到的是 Paypal 主页而不是采购订单。
我可以确认,只需将表单方法切换为 GET
并使用 target="_blank"
就可以完美无误地工作:
<form action="https://www.paypal.com/cgi-bin/webscr" method="get" target="_blank">
在 iframe 中解决此问题的另一种方法是在文本或图像周围使用标准 anchor 标记并手动创建 URL,如下所示:
<a href="https://www.paypal.com/cgi-bin/webscr?custom=[custom info]&item_name=[URL encoded name]&item_number=[num]&amount=9.95¤cy_code=USD&cmd=_xclick&business=[paypal email address]&return=[URL encoded URL]">Buy Now</a>
此答案归功于有关 Paypal links instead of buttons 的页面.
关于javascript - 如何从 WinJS iframe Windows 8 应用程序形成 POST 到 Paypal?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13999622/
我正在阅读 deduction guides在 C++17 中。假设我们有以下示例: template struct Custom { }; template struct Person {
我在我的 xamarin 表单项目中使用选项卡式页面。我正在尝试在 Android 的 MyTabsRenderer 类中使用 OnTabReselected 事件。但不会调用 OnTabSelect
我对 NSPredicate 有疑问。想不出一种写法,也找不到类似的东西。我有这个谓词: [NSPredicate predicateWithFormat:@"followedBy.username
我的模态中有一个小表单,如下所示: Name
我正在尝试制作用于表单验证的 jquery 插件(用于学习)。在此表单中,我无法获取类名称为“required”的所有表单字段。代码如下: (function( $ ) { $.fn.kValidat
在我的 Android 应用中,我从 Google Place API 获取附近餐馆的列表。 但不幸的是,这个列表没有给出餐厅的菜单。 我有 T_RESTAURANT 和 T_MENU 表。 假设我在
我正在尝试使用 angular.js 和 devise 设置登录。 这是我的表单 html: Email Password
谁能告诉我如何让生成的文档从表单中提取数据并将其作为标题?我已经查看了 Google Script 文档,但到目前为止我还没有找到任何可以回答我或向我展示类似示例的内容。到目前为止,我在这里找到了相关
当我有这样的表格时: “.”是什么意思?在行动中代表什么? 最佳答案 action 属性告诉表单将表单数据发布到哪里。 . 代表当前目录,所以我会说这是发布到当前目录中的默认文档。 相对路径有几
Mockito 似乎是一个非常漂亮的 Java stub /模拟框架。唯一的问题是我找不到任何关于使用他们的 API 的最佳方式的具体文档。测试中常用的方法包括: doXXX(???) : Stubb
我有 2 份表格。我从一种形式创建并展示了另一种形式。效果很好。但是,当我尝试从创建该表单的表单中关闭或处理该表单时,出现以下异常: Exception : Value Dispose() can
将我的应用程序上传到 TestFlight 时出现以下错误。 但是,我没有看到 missing 的任何位置Xamarin Assets 菜单中的图标。 (76x76、167x167 和 152x152
我的models.py文件看起来像这样 from django.db import models from django.template.defaultfilters import slugify
问题 学习 Xamarin 大学类(class) XAM120 .在将我的 IDial 实现添加到我的 UWP 项目时遇到障碍。出于某种原因,我的项目没有在我的系统上使用 PhoneCallManag
我在应用程序的列表页面上使用了 FloatingActionButton,我还想添加一个 searchBar。但我无法向他们展示该页面。我的代码和屏幕截图已关闭。如何显示搜索栏? FAB Github
实体产品和类别之间存在经典的多对多关系,其中一个产品可能包含在多个类别中。我们想在 UI 中使用带有 UITableViewController 或 UICollectionView 的 NSFetc
html 代码: js代码: function show(){ $.ajax({
我有一个用户列表。现在任何一个名字很长的用户都在搞乱排列/排列。 我认为通过为名称设置大小可以达到目的: .invitee .name{ height: 50px; width: 115px;
我正在使用 Flask 框架和 WTforms 库,我在更改选择字段中每个选项的颜色时遇到了问题,因为它总是显示为黑色而不是红色 我在模板中有下一个表单
Dugen Chen 写了一篇有用的文章,介绍如何将 HTML5 验证中的“required”属性添加到 Django 表单字段。 http://duganchen.ca/elegantly-addi
我是一名优秀的程序员,十分优秀!