我正在努力在我的应用程序中实现FastLink2.0集成以进行聚合。我从this post看到,需要从HTML表单调用接口,而不仅仅是简单的REST GET请求。
我能够让一个简单的html页面工作并重定向到FastLink,但当我将页面放入iframe时(如documentation推荐的那样),它表示"处理时出错请求或会话无效"
<iframe src="fastlink.html"></iframe>
fastlink.html:
<html>
<head>
</head>
<body>
<div class='center processText'>Processing...</div>
<div style="visibility: hidden">
<form action='https://node.developer.yodlee.com/authenticate/restserver/' method='post' id='rsessionPost'>
RSession : <input type='text' name='rsession' placeholder='rsession'
value='<--user token-->'
id='rsession'/><br/>
FinappId : <input type='text' name='app' placeholder='FinappId' value='10003600' id='finappId'/><br/>
Redirect : <input type='text' name='redirectReq' placeholder='true/false' value='true'/><br/>
Token : <input type='text' name='token' placeholder='token'
value='<--authenticated token-->' id='token'/><br/>
Extra Params : <input type='text' name='extraParams' placeholer='Extra Params' value=''
id='extraParams'/><br/></form>
</div>
<script>document.getElementById('rsessionPost').submit();</script>
</body>
</html>
有人想出来吗?提前谢谢!
答案 0 :(得分:0)
请按照步骤 -
以下是如何在iframe中调用fastlink的简单示例:
在post.html中
<div class='center processText'>Processing...</div>
<div>
<form action='https://node.developer.yodlee.com/authenticate/restserver/' method='post' id='rsessionPost'> RSession :
<input type='text' name='rsession' placeholder='rsession' value='08062013_0:829d770b5c7d29e300a7dabc42108383ecac552de57a9706ed4077c98acde1e29e874e676651813a95543b8fb5e2d5face054f300a03b34e7105976867dde3' id='rsession'/>
<br/> FinappId :
<input type='text' name='app' placeholder='FinappId' value='10003600' id='finappId'/>
<br/> Redirect :
<input type='text' name='redirectReq' placeholder='true/false' value='true'/>
<br/> Token :
<input type='text' name='token' placeholder='token' value='7346ddfb28f1eef2acdc4943695680337a3e5ea2ae9bb88c35d0ed58c702b6' id='token'/>
<br/> Extra Params :
<input type='text' name='extraParams' placeholer='Extra Params' value='' id='extraParams'/>
<br/>
</form>
</div>
<script>document.getElementById('rsessionPost').submit();
</script>
然后在iframe中调用它:
在test.html中:
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<iframe src="post.html"></iframe>
</body>
</html>
希望这有帮助。
此致
Krithik