Search Results

Search found 7 results on 1 pages for 'm7d'.

Page 1/1 | 1 

  • Regex to leave desired string remaining and others removed

    - by m7d
    In Ruby, what regex will strip out all but a desired string if present in the containing string? I know about /[^abc]/ for characters, but what about strings? Say I have the string "group=4&type_ids[]=2&type_ids[]=7&saved=1" and want to retain the pattern group=\d, if it is present in the string using only a regex? Currently, I am splitting on & and then doing a select with matching condition =~ /group=\d/ on the resulting enumerable collection. It works fine, but I'd like to know the regex to do this more directly.

    Read the article

  • Problem loading activemerchant using Bundler

    - by m7d
    Hi - I am using Merb. I can't seem to get activemerchant to load using Bundler. All my other gems load fine. In my Gemfile I am using: gem 'activemerchant', :require => 'active_merchant' Here is the relevant error: uninitialized constant ActiveMerchant::Billing::AuthorizedNetGateway Anyone run into this or have any ideas? Thanks ahead of time!

    Read the article

  • How to void authorized transaction in authorize.net gateway using ActiveMerchant

    - by m7d
    Goal: Only have successful purchases show up on a customer's billing statement. I don't want declined authorizations showing up on their billing statement (as seen in an online banking system) as pending. A customer often will accidentally input an incorrect billing address, for example, followed by a correct one. Together, the two attempts, one successful and one not both show up on their billing statement as pending prior to settlement. This can scare the customer as it looks potentially like they will be charged twice. Details: When I do an AUTH_CAPTURE (via ActiveMerchant's purchase) or an AUTH (via ActiveMerchant's authorize) which is declined and subsequently want to void that authorization (via ActiveMerchant's void) so as not to have it appear on a customer's billing statement as pending (even though it will settle out after a few days), the gateway can't find the transaction to void using the authorization code returned from the authorization or capture method calls on the gateway. This is specific to the authorize.net AIM gateway. Please advise. Thanks!

    Read the article

  • Testing across multiple sessions in merb using webrat

    - by m7d
    I want to test across multiple sessions using webrat in merb. Apparently, this is fairly easy to accomodate in Rails via: http://erikonrails.snowedin.net/?p=159. Following the same logic, I am trying to do something that follows that pattern for merb and webrat. Here is an attempt (which does not work because MerbAdapter does not respond to visit and other webrat session methods; I don't want to take too much more time with this so I have stopped here for now): # defined in test.rb environment file module Merb #:nodoc: module Test #:nodoc: module RequestHelper #:nodoc: def in_a_separate_session old = @_webrat_session.response.clone @_webrat_session = Webrat::MerbAdapter.new yield @_webrat_session.response = old end end end end I tried a few other ideas, but obviously I am missing something. Anyone else know how this would be done in merb? I think I could specify a cookie jar using the request mock, but I prefer to do this with webrat.

    Read the article

  • Controlling number of downloads on Amazon S3

    - by m7d
    Is there a way to control number of downloads of digital content on Amazon S3 or via some middle man software that talks to S3? I already use their timed links, but I would like to control number of downloads also. Any ideas of how to accomplish this using S3 or suggestions about alternative services that could? Thanks!

    Read the article

1