Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 31 lines (26 sloc) 937 Bytes
##
# BluePay Ruby Sample code.
#
# This code sample runs a report that grabs data from the
# BluePay gateway based on certain criteria. This will ONLY return
# transactions that have already settled. See comments below
# on the details of the report.
# If using TEST mode, only TEST transactions will be returned.
require_relative "../../lib/bluepay.rb"
ACCOUNT_ID = "Merchant's Account ID Here"
SECRET_KEY = "Merchant's Secret Key Here"
MODE = "TEST"
report = BluePay.new(
account_id: ACCOUNT_ID,
secret_key: SECRET_KEY,
mode: MODE
)
report.get_settled_transaction_report(
report_start_date: '2015-01-01', # YYYY-MM-DD
report_end_date: '2015-04-30', # YYYY-MM-DD
query_by_hierarchy: '1', # Also search subaccounts? Yes
do_not_escape: '1', # Output response without commas? Yes
exclude_errors: '1' # Do not include errored transactions? Yes
)
# Makes the API request with BluePay and returns response
puts report.process