Skip to content

Instantly share code, notes, and snippets.

@HostedPCI
HostedPCI / rubySample.rb
Last active August 29, 2015 14:03
Ruby samples
require 'rubygems'
require 'active_merchant'
# add ActiveMerchant gem from https://github.com/HostedPCI-Inc/active_merchant.git, branch: 'hostedpci_gateway'
# Initialize gateway, best place in Application.yml
gateway = ActiveMerchant::Billing::HostedpciGateway.new(
:login => 'ObtainTestAccount',
:password => '****',
:hpci_api_host => 'Obtain API host'
)
@HostedPCI
HostedPCI / config.php
Last active May 2, 2016 05:44
Php code samples
<?php
$params = new stdClass;
$params->hpci_site_host_name = baseurl();
$params->hpci_site_id = '520900';
$params->hpci_location = 'checkout1';
$params->hpci_query_string = $_SERVER['QUERY_STRING'];
$params->hpci_api_host = 'https://api-wisvis1stg.c1.hostedpci.com/';
$params->hpci_api_uid = 'ObtainTestAccount';
$params->hpci_api_pwd = '*****';
?>
package com.isyn.app.payment;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.text.DecimalFormat;