Skip to content
Munir Wanis edited this page Feb 10, 2016 · 2 revisions
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)

# creates request object for transaction capture
captureSaleRequest = Gateway::ManageSaleRequest.new
captureSaleRequest.OrderKey = '219d7581-78e2-4aa9-b708-b7c585780bfc'

# make the request and returns a response hash
puts response = gateway.Capture(captureSaleRequest)