Django-stripe-paymants和eldarion-ajax订阅JSON响应 [英] Django-stripe-paymants and eldarion-ajax subscribe JSON response

查看:215
本文介绍了Django-stripe-paymants和eldarion-ajax订阅JSON响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Django-stripe-paymants,除了在订阅表格完成后处理JSON响应,它正在运行。他们的付款被处理,网络挂钩看起来不错。



但它只是显示JSON是浏览器窗口。



ie:

  {html:\\\
\\\
\\\
< div class = \subscribe-form\> \\\
< h2>购买订阅.....

我想像在Java脚本中缺少一些小东西,但是被卡住了。



我已经阅读文档几次,搜索一个解决方案,其常见原因不包括bootstrap-ajax.js。自从上一个相关问题我可以找到,bootstrap-ajax已被重命名为eldarion-ajax。



我的基本模板包括:

 < script src ={%static'js /vendor/checkout.js'%}>< / script> 
< script src ={%static'js / vendor / jquery-1.11.0.min.js'%}> < / script>
< script src ={%static'js / vendor / eldarion-ajax.min.js'%}>< / script>

任何指针都将不胜感激,Javascript不是我的强项..



T hanks!

解决方案

我意识到,你已经想出了自己的问题的答案,但是我有一个很相似问题与我的Django-stripe-payment + eldarion-ajax应用程序,我设法让jQuery v1.11.0工作正常。请检查此处的答案。 / p>

I am working with Django-stripe-paymants and it's working except for handling the JSON response after the subscribe form is completed. They payment is processed and the web hooks look good.

But it is just showing the JSON is browser window.

ie:

{"html": "\n\n\n<div class=\"subscribe-form\">\n    <h2>Purchase a Subscription.....

I imagine there is something small missing in the Java script, but am stuck.

I have read through the documentation a few times and searched around for a solution. The common cause for this was not including bootstrap-ajax.js. Since the last relevant issue I can find, bootstrap-ajax has been renamed eldarion-ajax.

My base template includes:

<script src="{% static 'js/vendor/checkout.js' %}"></script>
<script src="{% static 'js/vendor/jquery-1.11.0.min.js' %}"></script>
<script src="{% static 'js/vendor/eldarion-ajax.min.js' %}"></script>

Any pointers will be appreciated. Javascript is not my strong point..

Thanks!

解决方案

I realise it looks like you've figured out an answer to your own question, however I had a very similar issue with my Django-stripe-payments + eldarion-ajax app and I managed to get jQuery v1.11.0 to work ok. Please check here for my answer.

这篇关于Django-stripe-paymants和eldarion-ajax订阅JSON响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆