Skip to content

Instantly share code, notes, and snippets.

@xenda
Created February 10, 2012 21:38
Show Gist options
  • Save xenda/1793129 to your computer and use it in GitHub Desktop.
Save xenda/1793129 to your computer and use it in GitHub Desktop.
execute("transactionStart") do |message|
@token_value = message.url_screen
end
def execute(name, &block)
body = self.send("#{name}_body")
message = Message.new(name, body)
block.call(message)
rescue WSFault => wsfault
message = nil
...
ensure
message
end
class GatewayPayment
class Message
attr_accessor :action
TO = "https://preprod.verifika.com/VPOS/services/VPOSMMWSS11?wsdl"
ACTION_BASE = "http://www.alignet.com/VPOSMMWSS11/"
def initialize(action, body)
@action = action
@body = body
build_message
end
def build_message
WSMessage(...)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment