Skip to content

Commit

Permalink
Apply manual fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andyundso committed Jan 15, 2024
1 parent 60b2e9e commit adcd049
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions lib/datatrans/web/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ def authorize
@response.successful?
end

def respond_to_missing?(method, *)
response.respond_to?(method.to_sym) || super
end

def method_missing(method, *args, &block)
if response.respond_to? method.to_sym
response.send(method)
Expand Down
4 changes: 4 additions & 0 deletions lib/datatrans/xml/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ def status

# TODO: purchase, credit methods

def respond_to_missing?(method, *)
response.respond_to?(method.to_sym) || request.respond_to?(method.to_sym) || super
end

def method_missing(method, *args, &block)
if response.respond_to? method.to_sym
response.send(method)
Expand Down
6 changes: 0 additions & 6 deletions lib/datatrans/xml/transaction/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ def authorization_code
nil
end

def authorization_code
params_root_node["response"]["authorizationCode"]
rescue
nil
end

def payment_method
params_root_node["response"]["pmethod"]
rescue
Expand Down

0 comments on commit adcd049

Please sign in to comment.