我正在尝试设置wepay API接受我的网站上的付款通过嵌入式结账,我正在运行一些WePay网站目前托管在我的本地机器上测试和创建在Cakephp.when中我执行它在浏览器(谷歌铬,火狐)使用OS.The IFrame正确加载许多次,但如果我试图执行它在Windows操作系统浏览器(火狐,谷歌铬)的wepay IFrame结账只加载了2次,之后它没有加载的IFrame。
内部控制器:
Wepay::useStaging($client_id, $client_secret);
$wepay = new WePay($access_token);
try {
$checkout= $wepay->request('/checkout/create', array(
'account_id' => $account_id,
'amount' => $amount,
'short_description' => "this is a test payment",
'type' => "donation",
'redirect_uri'=> LIVE_SITE.'/users/thanks/'.$aid.'/'.$lid,
'mode' => "iframe"
)
);
}
catch (WePayException $e) {
$error = $e->getMessage();
}
$this->set('checkoutnews',$checkout); 在查看文件下:
<script type="text/javascript" src="https://stage.wepay.com/js/iframe.wepay.js">
</script>
<script type="text/javascript">
WePay.iframe_checkout("checkout_div", "<?php echo $checkoutnews->checkout_uri ?>");
</script>发布于 2016-11-08 03:48:32
替换:
'mode' => 'iframe'使用
'hosted_checkout' => ['mode' => 'iframe']发布于 2015-09-21 02:07:41
当您添加以下内容时,它不起作用
‘'mode’=> "iframe“
去掉它,你就会好起来的。
https://stackoverflow.com/questions/28166583
复制相似问题