laundry 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/laundry/payments_gateway/drivers/client_driver.rb +7 -5
- data/lib/laundry/payments_gateway/drivers/merchant_authenticatable_driver.rb +5 -0
- data/lib/laundry/payments_gateway/drivers/socket_driver.rb +6 -4
- data/lib/laundry/payments_gateway/drivers/transaction_driver.rb +6 -4
- data/lib/laundry/version.rb +1 -1
- metadata +3 -3
| @@ -3,11 +3,13 @@ module Laundry | |
| 3 3 |  | 
| 4 4 | 
             
                class ClientDriver < MerchantAuthenticatableDriver
         | 
| 5 5 |  | 
| 6 | 
            -
             | 
| 7 | 
            -
                   | 
| 8 | 
            -
                     | 
| 9 | 
            -
             | 
| 10 | 
            -
                     | 
| 6 | 
            +
                  # Setup WSDL
         | 
| 7 | 
            +
                  def self.wsdl
         | 
| 8 | 
            +
                    if Laundry.sandboxed?
         | 
| 9 | 
            +
                      "https://sandbox.paymentsgateway.net/WS/Client.wsdl"
         | 
| 10 | 
            +
                    else
         | 
| 11 | 
            +
                      "https://ws.paymentsgateway.net/Service/v1/Client.wsdl"
         | 
| 12 | 
            +
                    end
         | 
| 11 13 | 
             
                  end
         | 
| 12 14 |  | 
| 13 15 | 
             
                  actions "createClient", "getClient", "getPaymentMethod", "createPaymentMethod"
         | 
| @@ -9,6 +9,11 @@ module Laundry | |
| 9 9 | 
             
                  def initialize(merchant)
         | 
| 10 10 | 
             
                    # Save the merchant.
         | 
| 11 11 | 
             
                    self.merchant = merchant
         | 
| 12 | 
            +
                    setup_client!
         | 
| 13 | 
            +
                  end
         | 
| 14 | 
            +
                  
         | 
| 15 | 
            +
                  def setup_client!
         | 
| 16 | 
            +
                    self.class.client.wsdl.document = self.class.wsdl if self.class.respond_to?(:wsdl)
         | 
| 12 17 | 
             
                  end
         | 
| 13 18 |  | 
| 14 19 | 
             
                  def default_body
         | 
| @@ -4,10 +4,12 @@ module Laundry | |
| 4 4 | 
             
                class SocketDriver < MerchantAuthenticatableDriver
         | 
| 5 5 |  | 
| 6 6 | 
             
                  # Setup WSDL
         | 
| 7 | 
            -
                   | 
| 8 | 
            -
                     | 
| 9 | 
            -
             | 
| 10 | 
            -
                     | 
| 7 | 
            +
                  def self.wsdl
         | 
| 8 | 
            +
                    if Laundry.sandboxed?
         | 
| 9 | 
            +
                      "https://ws.paymentsgateway.net/pgtest/paymentsgateway.asmx?WSDL"
         | 
| 10 | 
            +
                    else
         | 
| 11 | 
            +
                      "https://ws.paymentsgateway.net/pg/paymentsgateway.asmx?WSDL"
         | 
| 12 | 
            +
                    end
         | 
| 11 13 | 
             
                  end
         | 
| 12 14 |  | 
| 13 15 | 
             
                  actions "ExecuteSocketQuery"
         | 
| @@ -4,10 +4,12 @@ module Laundry | |
| 4 4 | 
             
                class TransactionDriver < MerchantAuthenticatableDriver
         | 
| 5 5 |  | 
| 6 6 | 
             
                  # Setup WSDL
         | 
| 7 | 
            -
                   | 
| 8 | 
            -
                     | 
| 9 | 
            -
             | 
| 10 | 
            -
                     | 
| 7 | 
            +
                  def self.wsdl
         | 
| 8 | 
            +
                    if Laundry.sandboxed?
         | 
| 9 | 
            +
                      'https://sandbox.paymentsgateway.net/WS/Transaction.wsdl'
         | 
| 10 | 
            +
                    else
         | 
| 11 | 
            +
                      'https://ws.paymentsgateway.net/Service/v1/Transaction.wsdl'
         | 
| 12 | 
            +
                    end
         | 
| 11 13 | 
             
                  end
         | 
| 12 14 |  | 
| 13 15 | 
             
                  actions "getTransaction"
         | 
    
        data/lib/laundry/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: laundry
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.5
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -70,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 70 70 | 
             
                  version: '0'
         | 
| 71 71 | 
             
                  segments:
         | 
| 72 72 | 
             
                  - 0
         | 
| 73 | 
            -
                  hash:  | 
| 73 | 
            +
                  hash: -3800532644211602435
         | 
| 74 74 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 75 75 | 
             
              none: false
         | 
| 76 76 | 
             
              requirements:
         | 
| @@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 79 79 | 
             
                  version: '0'
         | 
| 80 80 | 
             
                  segments:
         | 
| 81 81 | 
             
                  - 0
         | 
| 82 | 
            -
                  hash:  | 
| 82 | 
            +
                  hash: -3800532644211602435
         | 
| 83 83 | 
             
            requirements: []
         | 
| 84 84 | 
             
            rubyforge_project: 
         | 
| 85 85 | 
             
            rubygems_version: 1.8.24
         |