0

I've integrated Paymill successfully in my ROR4 App using their Paymill Bridge. All works fine in development mode, but as soon as I deploy it to production, it returns me the "NO TOKEN FOUND".

This used to happen in development mode because it was not loading the transactions.js properly due to turbolinks, I have fixed it since.

But cannot make it work in production

Thanks! All the Best

4

1 回答 1

1

自从引入资产管道以来,rails 使用gem uglier来压缩(删除空格、缩短函数和变量名等)自定义 JavaScript。这是通过命令rake assets:precompile完成的,该命令在每次部署到 heroku 时执行。

我认为你应该看看uglifier并尝试覆盖默认设置。我的第一个猜测是您必须将:unused设置为false。因为 PAYMILL_PUBLIC_KEY 变量由PAYMILL 桥使用,而不是由您的脚本使用。

您可以通过调用以下命令在本地机器上测试:rake assets:precompile并检查生成的 JavaScript。

于 2014-02-06T11:48:41.257 回答