NAME
Business::OnlinePayment::WorldPay - RBS WorldPay interface for Business::OnlinePayment
SYNOPSIS
use Business::OnlinePayment;
my $tx = Business::OnlinePayment->new("WorldPay");
$tx->content(
installation => '12345',
login => 'testdrive',
password => 'xyzzy',
type => 'Visa',
action => 'payment', # 'status', 'cancel', 'refund', 'cancel_or_refund'
description => '20 English Roses',
amount => '49.95',
currency => 'GBP',
order_number => 'A00100',
name => 'Claire Voyance',
address => '123 Disk Drive',
city => 'Anywhere',
state => 'DE',
zipcode => '19808',
country => 'US',
phone => '201-555-1212',
card_number => '4007000000027',
exp_date => '09/10',
start_date => '01/03',
issue_number => '002',
cvc => '377',
);
# ELV payment:
$tx->content(
installation => '12345',
login => 'testdrive',
password => 'xyzzy',
type => 'ELV',
action => 'payment',
description => '20 English Roses',
amount => '49.95',
currency => 'GBP',
order_number => 'A00100',
######################################
account_holder_name => 'Claire Voyance',
bank_account_number => '92441196',
bank_name => 'Bundesbank',
bank_location => 'Berline',
bank_location_id => '20030000',
######################################
);
$tx->set_server('test'); # 'live' (default) or 'test'
$tx->debug(1); # debugging to STDERR
$tx->debug(1, "/tmp/debugging.outfile"); # debugging output to file
$tx->test_transaction(1); # another way to set server to test
$tx->submit();
print "server_response = ", $tx->server_response, "\n";
print "is_success = ", $tx->is_success, "\n";
print "authorization = ", $tx->authorization, "\n";
print "error_message = ", $tx->error_message, "\n\n";
print "result_code = ", $tx->result_code, "\n";
print "cvv_response = ", $tx->cvv_response, "\n";
print "avs_response = ", $tx->avs_response, "\n";
print "risk_score = ", $tx->risk_score, "\n";
if ($tx->is_success) {
print "Card processed successfully: " . $tx->authorization . "\n";
}
else {
print "Card was rejected: " . $tx->error_message . "\n";
}
DESCRIPTION
This module subclasses Business::OnlinePayment to provide a basic merchant processing interface for submitting transactions as XML requests in the direct model provided by RBS WorldPay.
http://www.rbsworldpay.com/support/bg/xml/kb/submittingtransactionsdirect/dxml.html
It currently implements payments, cancellations, refunds, and payment status inquiries.
Orders submitted to the RBS WorldPay system are required to be valid XML files as specified in their Document Type Definition (DTD):
http://dtd.wp3.rbsworldpay.com/paymentService_v1.dtd
BUGS
Please report any bugs or feature requests to bug-business-onlinepayment-worldpay at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Business-OnlinePayment-WorldPay. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Business::OnlinePayment::WorldPay
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business-OnlinePayment-WorldPay
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
http://cpanratings.perl.org/d/Business-OnlinePayment-WorldPay
Search CPAN
SEE ALSO
AUTHOR
Paul Grassie, <paul.grassie@ardishealth.com>
COPYRIGHT AND LICENSE
Copyright (C) 2010 Paul Grassie, Ardis Health, http://www.ardishealth.com. All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.