Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Jasl
@jasl
Admin
NO. 1107 / 2012-02-21

[email protected]
北京
126 Topics / 3954 Replies
396 Followers
11 Following
82 Favorites
Ass♂we♂can
GitHub Public Repos
  • wx_pay 461

    An unofficial simple wechat pay gem

  • zk_dcap_verifier_poc 1

  • substrate 0

    Substrate: The platform for blockchain innovators

  • parity-common 0

    Collection of crates used in Parity projects

  • polkadot-sdk 0

    The Parity Polkadot Blockchain SDK

  • pjs-rs 0

    A javascript runtime with pjs embebed

  • agave 0

    Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.

  • ngine 0

    A nostr application framework

  • derive_more 0

    Some more derive(Trait) options

  • cybros-experimental 0

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 进来吐个槽。RoR 这边的版本兼容性实在是煎熬人性 activerecord-oracle_enhanced-adapter at June 24, 2015

    其实也能算 Gem 的维护者不严谨,应该设置一个比较严格的依赖版本

  • [微信开发系列] 使用 JS API 实现微信支付功能 at June 23, 2015

    感谢 @rei 的工作,为 xxPay 的设计提供了原则性指导...

  • [微信开发系列] 使用 JS API 实现微信支付功能 at June 23, 2015

    赞...

  • 明年在成都举行,吃!吃!吃! at June 18, 2015

    #17 楼 @liwei78 争取明年哈哈哈。。。深圳吃吃吃也超赞,场地那边刚好在深圳的正中心附近

  • The Ruby Community: The Next Version at June 18, 2015

    能把这些 gem 用对也不容易。。。

  • 明年在成都举行,吃!吃!吃! at June 18, 2015

    #13 楼 @martin91 时间定在 9 月最后一个周末

  • 明年在成都举行,吃!吃!吃! at June 18, 2015

    #14 楼 @roclv 因为成都负责人的工作变更,只好把地点改到深圳了,另因我个人的工作原因,我恐怕要端午之后才能正式着手组织了

  • 新写的 ueditor rails integration at June 18, 2015

    #65 楼 @app_sys 已经不维护了...不知道滋瓷不滋瓷

  • 为什么国外的创业公司更喜欢 Rails? at June 16, 2015

    #53 楼 @robbin

    +----------------------+-------+-------+---------+---------+-----+-------+
    | Name                 | Lines |   LOC | Classes | Methods | M/C | LOC/M |
    +----------------------+-------+-------+---------+---------+-----+-------+
    | Controllers          |  7908 |  6380 |     121 |     745 |   6 |     6 |
    | Helpers              |  1380 |  1199 |       0 |     136 |   0 |     6 |
    | Models               |  7231 |  5465 |      68 |     567 |   8 |     7 |
    | Mailers              |   196 |   155 |       5 |      18 |   3 |     6 |
    | Javascripts          |  5781 |  4491 |      33 |     749 |  22 |     3 |
    | Libraries            |  1435 |  1117 |      21 |      98 |   4 |     9 |
    | Feature specs        |   145 |   120 |       0 |       1 |   0 |   118 |
    | Model specs          |   480 |   390 |       0 |       0 |   0 |     0 |
    +----------------------+-------+-------+---------+---------+-----+-------+
    | Total                | 24556 | 19317 |     248 |    2314 |   9 |     6 |
    +----------------------+-------+-------+---------+---------+-----+-------+
      Code LOC: 18807     Test LOC: 510     Code to Test Ratio: 1:0.0
    

    包含电商、SNS、API、CMS 四套大模块,也有一些遗留的孤立代码没清理,大概能删掉 2k 左右

  • 微信支付 Gem at June 15, 2015

    #43 楼 @caiqinghua 也不难吧 比如你设置支付授权目录 https://knewone.com/orders/

    那发起支付使用 https://knewone.com/orders/wxpay 是 ok 的 那么 route 定义

    resources :orders do
      collection do
        get 'wxpay'
      end
    end
    

    然后实现 wxpay action 就可以了,只要在这个 url 里调用微信 js 支付即可 回调因为是在参数里指定,所以用 restful 风格就是 rails 的标准实践来搞没有任何问题

    AJAX 不成功恐怕要靠你自己分析了,这个自己的代码别人不好帮

    另外根据我的经验,微信给的错误信息不能全信,比如你支付授权目录设置的有问题,给你的报错不靠蒙这辈子也想不通是支付授权目录设置的问题,解决方法就是,一个尽可能的多 alert 信息(微信支付只能在微信浏览器里调试,console.log 没有),一个要多注意检查配置。

  • 如何优雅地把 Hash 参数传递给 JavaScript at June 15, 2015

    gon 是个好办法,不过感觉没必要,erb 直接 render 就行了,缺点就是代码高亮有可能会乱(RubyMine 不会)

  • 微信支付 Gem at June 15, 2015

    #39 楼 @caiqinghua 你发的代码 erb 本身就是可以这么用地~ 不过我是在控制器直接渲染好 json 然后这样写

    WeixinJSBridge.invoke(
            'getBrandWCPayRequest',
            <%= raw @params %>,
            function (res) {
              if (res.err_msg == "get_brand_wcpay_request:ok") {
                window.location.href = '<%= wxpay_callback_order_path(@order) %>';
              } else if (res.err_msg == "get_brand_wcpay_request:cancel") {
                window.location.href = '<%= order_path(@order) %>';
              } else if (res.err_msg == "get_brand_wcpay_request:fail") {
                alert('系统错误');
              } else {
                alert('未知错误');
              }
            }
    );
    
  • 微信支付 Gem at June 15, 2015

    #37 楼 @caiqinghua 👍

  • 微信支付 统一支付接口 appid and openid not match at June 14, 2015

    #8 楼 @caiqinghua 另一方面,微信的 openid 获取是和系统的业务和技术耦合非常紧密的,所以没法单纯通过 Gem 层面抽象

  • 微信支付 统一支付接口 appid and openid not match at June 14, 2015

    #8 楼 @caiqinghua 因为有 omniauth-wechat-oauth2 这种更专业的 gem 解决呀

  • 微信支付 统一支付接口 appid and openid not match at June 12, 2015

    用我的 gem 吧。。。就是楼上的链接,之前刚好有朋友已经踩过 APP 支付的坑了...

  • Homebrew 作者被 Google 鄙视了… at June 12, 2015

    如何用最少的字符翻转二叉树?请看:(╯°□°)╯︵ ǝǝɹʇ ʎɹɐuıq

  • Producter —— 一本关于设计,iOS,营销的书 at June 11, 2015

    @rei 似乎 hotmail 也没有收到,垃圾箱检查过了

  • Ruby China API V3 获取 token 失败 at June 10, 2015

    设置一个不同的 redirect_uri 呢 这个 oauth:2.0:oob 是用来测试用的,没法用于生产环境

  • [上海][2015年6月9日] Ruby 聚会召集 at June 08, 2015

    @luikore 求分享

  • 微信支付 Gem at June 04, 2015

    #33 楼 @qicaisheng 看到了,昨天忙,我稍微重构下合并,感谢!

  • 要当爹了,找个兼职赚奶粉钱… at June 01, 2015

    兹瓷!

  • 微信支付 Gem at June 01, 2015

    #31 楼 @qicaisheng 辛苦~ CSRF 这个是 Rails 的防重放的机制,但是对于 API 是没有必要的,看来还是写到文档上比较好~

  • 微信支付 Gem at May 30, 2015

    #29 楼 @qicaisheng 关于 APP 方面配置的情况,麻烦帮忙更新一下 wxpay 的文档吧~ 感谢!

    这个问题要看下日志了,可能是你路由的配置问题,文档里我的只是为了示意 实际上我们的系统里是这样配置的路由

    resources :orders do
      member do
        post 'wxpay_notify'
      end
    end
    # will generate route like /orders/:id/wxpay_notify
    
  • 微信支付 Gem at May 25, 2015

    #24 楼 @pathbox 貌似微信支付不支持 SHA 签名吧?

  • 微信支付 Gem at May 25, 2015

    #25 楼 @qicaisheng 理论是支持的,不过因为我目前没有环境去测试 APP 下的情况,所以避免误导没有写在文档里,如果你可以帮忙测试,通过后请告知我,更新文档、

  • [北京][2015年5月23日] Ruby Saturday「活动召集」 at May 20, 2015

    #21 楼 @diguage 这次有赞助

  • Rust 1.0 发布!新增 Rust 节点。 at May 16, 2015

    赞!

  • 准备入 Ruby on Rails 坑了,你们有什么要说的吗? at May 13, 2015

    祝你幸福!

  • 为什么国外的创业公司更喜欢 Rails? at May 13, 2015

    #29 楼 @iBcker KO 将近 2w 行的 rails 项目都没有这么明显的感觉,2012mid rmbp 顶配,页面改动后不需要重启 server,但是重编译看页面复杂度最慢我观测过的可以到 5s,确实远不如 php,但是对比其他语言比如 python 并没有什么劣势

  • Prev
  • 1
  • 2
  • …
  • 64
  • 65
  • 66
  • 67
  • 68
  • …
  • 120
  • 121
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English