-
Notifications
You must be signed in to change notification settings - Fork 3
ParseXmlToNotification
Munir Wanis edited this page Feb 10, 2016
·
2 revisions
The ParseXmlToNotification takes an XML and convert it to a hash variable.
require 'stone_ecommerce'
# variable with merchant key
merchantKey = '85328786-8BA6-420F-9948-5352F5A183EB'
# instantiate class with request methods
# :sandbox for sandbox ambient
# :production for production ambient
gateway = Gateway::Gateway.new(:sandbox, merchantKey)
xml = 'some XML passed as string'
# make the request and returns a hash from the XML parsed
response = gateway.ParseXmlToNotification(xml)