Module: PayuZa

Extended by:
PayuZa
Included in:
PayuZa
Defined in:
lib/payu_za.rb,
lib/payu_za/client.rb,
lib/payu_za/errors.rb,
lib/payu_za/structs.rb,
lib/payu_za/version.rb,
lib/payu_za/structs/basket.rb,
lib/payu_za/structs/customer.rb,
lib/payu_za/structs/credit_card.rb,
lib/payu_za/structs/transaction.rb,
lib/payu_za/structs/custom_field.rb,
lib/payu_za/structs/struct_model.rb,
lib/payu_za/structs/do_transaction.rb,
lib/payu_za/structs/get_transaction.rb,
lib/payu_za/structs/set_transaction.rb,
lib/payu_za/structs/additional_information.rb

Defined Under Namespace

Modules: Structs Classes: Client, StructNotValidError

Constant Summary collapse

VERSION =
"0.0.1"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_versionObject

Returns the value of attribute api_version.



12
13
14
# File 'lib/payu_za.rb', line 12

def api_version
  @api_version
end

#environmentObject

Returns the value of attribute environment.



12
13
14
# File 'lib/payu_za.rb', line 12

def environment
  @environment
end

#password_digestObject

Returns the value of attribute password_digest.



12
13
14
# File 'lib/payu_za.rb', line 12

def password_digest
  @password_digest
end

#safe_keyObject

Returns the value of attribute safe_key.



12
13
14
# File 'lib/payu_za.rb', line 12

def safe_key
  @safe_key
end

#soap_passwordObject

Returns the value of attribute soap_password.



12
13
14
# File 'lib/payu_za.rb', line 12

def soap_password
  @soap_password
end

#soap_usernameObject

Returns the value of attribute soap_username.



12
13
14
# File 'lib/payu_za.rb', line 12

def soap_username
  @soap_username
end

#wsdl_endpointsObject

Returns the value of attribute wsdl_endpoints.



12
13
14
# File 'lib/payu_za.rb', line 12

def wsdl_endpoints
  @wsdl_endpoints
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (PayuZa)

    the object that the method was called on



15
16
17
# File 'lib/payu_za.rb', line 15

def configure
  yield self
end

#default!Object



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/payu_za.rb', line 19

def default!
  PayuZa.configure do |config|
    config.api_version = 'ONE_ZERO'
    config.wsdl_endpoints = {
      development: 'https://staging.payu.co.za/service/PayUAPI?wsdl',
      staging: 'https://staging.payu.co.za/service/PayUAPI?wsdl',
      production: 'https://secure.payu.co.za/service/PayUAPI?wsdl'
    }

    config.environment = :staging
  end
end

#wsdl_endpointObject



35
36
37
# File 'lib/payu_za.rb', line 35

def wsdl_endpoint
  wsdl_endpoints[environment]
end