[ic] SOAP in a payment module - help requested

Glenn McCalley techlist at mail.bnetmd.net
Fri Dec 20 13:45:57 UTC 2013


Greetings,

The client for one of our stores requires us to use a "non-standard" payment 
service
that provides them with some reporting on sales.  We have processed these 
payments
using an IC payment module hacked from the authorizenet module for several 
years.

Now, the payment processor has rewritten their system under Windows and is
requiring a SOAP / XML type transaction.  (-I- think somebody must have gone
to a Micro$oft road show...).

My usual approach is to write a program run from the command line with dummy
data just to get a transaction to process.  When that succeeds, integrate 
the core
code from that program into an IC Payment module and there we are.  This 
time
I just can't get the durn thing to work AT ALL - can't even get a response 
from
the server like "invalid card".  All I can get is "Object reference not set 
to an
instance of an object".  Having not worked with SOAP, and finding Google 
entries
for that message equally obtuse I am floundering and out of time.

SO!  If there is someone out there who knows of a working SOAP payment 
module
I can hack up or wwho has relevant experience who would like to take a crack 
at this
compensation is available.

Cheers,
Glenn.
glenn at bnetmd.net
410-303-2073

-------------------------------------------------------------------------------------
just for grins - this is my test program
-------------------------------------------------------------------------------------
#!/usr/bin/perl
use strict;
use warnings;
use SOAP::Lite;

my $chargedata = "";

GetData();

my @PARAMS = ( SOAP::Data->name(processGift => $chargedata));

# define the SOAP object
my $server = SOAP::Lite->new()
  ->uri("https://cmdi.net/ccService")
  ->proxy("https://p23.cmdi.net/ccServiceHost/ccServiceHost.svc?wsdl")
  ->on_action ( sub { 
"https://cmdi.net/ccService/IProcessCard/processGift"; } );

# call the CMDI server and get an answer
my $result = $server->call('processGift', @PARAMS);
                die $result->faultstring if $result->fault;

# print the answer
print "-----------------------------------------------\n";
print "Raw Answer:\n";
print $result->result;
print "-----------------------------------------------\n";
print "Faultstring:\n";
print $result->faultstring;
print $result->fault->{'detail'} . "\n";



######################################################################
# GetData sets the dummy transaction data to be sent                 #
######################################################################
sub GetData {
# set up the transaction info
$chargedata .= "    <processGift>";
$chargedata .= "      <ccData>";
$chargedata .= " 
<token>7FA5C543-A276-4D76-959D-10B384AA5A78</token>";
$chargedata .= "        <callercode>cmdi_test</callercode>";
$chargedata .= "        <callertid>RNCtest001</callertid>";
$chargedata .= "        <prefix></prefix>";
$chargedata .= "        <fname>Glenn</fname>";
$chargedata .= "        <mname></mname>";
$chargedata .= "        <lname>McCalley</lname>";
$chargedata .= "        <suffix></suffix>";
$chargedata .= "        <addr1>123 Some Street</addr1>";
$chargedata .= "        <city></city>";
$chargedata .= "        <state></state>";
$chargedata .= "        <zip>21161</zip>";
$chargedata .= "        <giftdte>11/18/2013</giftdte>";
$chargedata .= "        <giftamt>1.00</giftamt>";
$chargedata .= "        <nameoncard></nameoncard>";
$chargedata .= "        <cardno>4444333322221111</cardno>";
$chargedata .= "        <expmo>09</expmo>";
$chargedata .= "        <expyr>2017</expyr>";
$chargedata .= "        <cvv>321</cvv>";
$chargedata .= "      </ccData>";
$chargedata .= "    </processGift>";
}





More information about the interchange-users mailing list