Aaron James Trevena > Business-OnlinePayment-Protx-0.03 > Business::OnlinePayment::Protx

Download:
Business-OnlinePayment-Protx-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.03   Source   Latest Release: Business-OnlinePayment-Protx-0.06

NAME ^

Business::OnlinePayment::Protx - Perl Class for making Online Payments via Protx VPS

SYNOPSIS ^

  use Business::OnlinePayment::Protx;

  Business::OnlinePayment::Protx->Vendor($your_vps_gateway_username);

  my $request = Business::OnlinePayment::Protx->new();

  my $payment_status = $request->make_direct_payment(
                                                   VendorTxCode => 1131,
                                                   Amount => 23.5,
                                                   Description => 'a test purchase' ,
                                                   CardHolder => 'mr fred elliot',
                                                   CardNumber => '4444333322221111',
                                                   ExpiryMonth => "07",
                                                   ExpiryYear => "05",
                                                   IssueNumber => 3,
                                                   CV2 => 555,
                                                   CardType => 'MC',);

  my $payment_status = $request->Status;

  my $repeat_request = $request->new();

  my $repeat_status = $repeat_request->make_repeat_payment(
                                                         VendorTxCode => '2011',
                                                         Description => 'a repeat payment',
                                                         RelatedVPSTxId => $vpstxid,
                                                         RelatedVendorTxCode => '1011',
                                                         RelatedSecurityKey => $seckey,
                                                         RelatedTxAuthNo => $authno,
                                                         Amount => 250,
                                                        );

  my $repeat_VPSRef = $repeat_request->VPSTxId;
  my $repeat_VendorRef = $repeat_request->VendorTxCode;



  my $status = $request->make_preauth_payment( VendorTxCode => '1231', Amount => ... );
  my $preauth_VPSRef = $repeat_request->VPSTxId;
  my $preauth_VendorRef = $repeat_request->VendorTxCode;

DESCRIPTION ^

Business::OnlinePayment::Protx is a module that allows you to easily make payments via the Protx VPS DirectPay system.

This module provides a Flexible powerful class with attributes matching the fields used in VPS request and response messages. It uses LWP to send HTTPS POST requests to the gateway and processes the response.

CLASS METHODS ^

Vendor

This class method specifies the vendor username to be used in payment requests.

  Business::OnlinePayment::Protx->Vendor($your_vps_gateway_username);

This needs to be set before creating or using any objects.

VPSProtcol

This class method specifies the VPS protocol to be used in payment requests.

  Business::OnlinePayment::Protx->VPSProtocol('2.22');

The default is 2.2, if you need to change the value, do so before calling an object method that uses it such as make_direct_payment

mode

This class method specifies the mode to be used for payment requests.

  Business::OnlinePayment::Protx->mode('live');

The default mode value is 'simulator', other modes are 'test' and 'live'.

CONSTRUCTOR METHODS ^

new

This creates and populates the Business::OnlinePayment::Protx with parameters provided.

my $request = Business::OnlinePayment::Protx->new();

Parameters you can provide are Vendor

OBJECT METHODS AND ACCESSORS ^

make_direct_payment

This method sends a payment request to the VPS Payment Gateway and checks the result.

This method takes the following named arguments : VendorTxCode, Amount, Description, CardHolder, CardNumber, StartMonth, StartYear, ExpiryMonth, ExpiryYear, IssueNumber, CV2, CardType and returns true (the Status provided by the gateway) on success and dies on failure.

This method is called on the object and will update the object based on the results, these results can then be accessed via the normal accessors as show below

my $status = $request->make_direct_payment( VendorTxCode => '1231', Amount => ... );

my $VPS_tx_id = $request->VPSTxId;

make_repeat_payment

This method sends a repeat payment request to the VPS Payment Gateway and checks the result.

This method takes the following arguments : VendorTxCode, Description, Amount, RelatedVPSTxId, RelatedVendorTxCode, RelatedSecurityKey, RelatedTxAuthNo and returns true (the Status provided by the gateway) on success and dies on failure.

This method is called on the object and will update the object based on the results, these results can then be accessed via the normal accessors as show below

my $status = $request->make_repeat_payment(VendorTxCode=>...);

my $VPS_tx_id = $request->VPSTxId;

make_preauth_payment

This method sends a preauthorise payment request to the VPS Payment Gateway and checks the result.

This method takes the following named arguments : VendorTxCode, Amount, Description, CardHolder, CardNumber, StartMonth, StartYear, ExpiryMonth, ExpiryYear, IssueNumber, CV2, CardType and returns true (the Status provided by the gateway) on success and dies on failure.

This method is called on the object and will update the object based on the results, these results can then be accessed via the normal accessors as show below

my $status = $request->make_preauth_payment( VendorTxCode => '1231', Amount => ... );

my $VPS_tx_id = $request->VPSTxId;

make_deferred_payment

This method sends a deferred payment request to the VPS Payment Gateway and checks the result.

abort_deferred_payment

This method sends a repeat payment request to the VPS Payment Gateway and checks the result.

release_deferred_payment

This method sends a repeat payment request to the VPS Payment Gateway and checks the result.

CardType

Type of card used on order

VISA, MC (mastercard), DELTA, SOLO, SWITCH, UKE (electron), AMEX, DC or JCB

alphanumeric

Amount

Total Value of Order

floating point to 2 decimal places.

StartMonth

StartYear

StartDate

alias to get_StartDate

get_StartDate

ExpiryMonth

ExpiryYear

ExpiryDate

alias to get_ExpiryDate

get_ExpiryDate

EXPORT

None by default.

SEE ALSO ^

www.protx.com

AUTHOR ^

Foresite Developers, <dev@fsite.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2005 Foresite Business Solutions www.fsite.com

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.5 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: