view release on metacpan or search on metacpan
ElavonVirtualMerchant.pm view on Meta::CPAN
=head1 DESCRIPTION
This module lets you use the Elavon (formerly Nova Information Systems) Virtual Merchant real-time payment gateway, a successor to viaKlix, from an application that uses the Business::OnlinePayment interface.
You need an account with Elavon. Elavon uses a three-part set of credentials to allow you to configure multiple 'virtual terminals'. Since Business::OnlinePayment only passes a login and password with each transaction, you must pass the third item,...
Elavon offers a number of transaction types, including electronic gift card operations and 'PINless debit'. Of these, only credit card transactions fit the Business::OnlinePayment model.
Since the Virtual Merchant API is just a newer version of the viaKlix API, this module subclasses Business::OnlinePayment::viaKlix.
view all matches for this distribution
view release on metacpan or search on metacpan
t/transaction.t view on Meta::CPAN
use Business::OnlinePayment;
my $login = $ENV{BOP_TEST_LOGIN};
my $password = $ENV{BOP_TEST_PASSWORD};
if (!$login) {
plan skip_all => "no test credentials provided; set BOP_TEST_LOGIN and BOP_TEST_PASSWORD to test communication with the gateway.",
1;
exit(0);
}
plan tests => 2;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/OnlinePayment/IPayment/Response.pm view on Meta::CPAN
=head1 SYNOPSIS
# where %params are the GET parameters
$ipayres = Business::OnlinePayment::IPayment::Response->new(%params);
$ipayres->set_credentials(
my_amount => "5000",
my_currency => "EUR",
my_userid => "99999",
my_security_key => "testtest",
);
lib/Business/OnlinePayment/IPayment/Response.pm view on Meta::CPAN
=head2 METHODS
=head3 set_credentials(%hash)
As a shortcut, you can set the above attribute using this method
=cut
sub set_credentials {
my ($self, %args) = @_;
if (defined $args{my_userid}) {
$self->my_userid($args{my_userid});
}
if (defined $args{my_security_key}) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/tokenize.t view on Meta::CPAN
$tx->content(%content);
my $ret = $tx->submit;
$token_result = $tx->result_code;
skip "contact litle support to enable tokens",4 if defined $token_result && $token_result == 821;
like( $tx->result_code, qr/^(000|802)$/, "result_code(): ".($tx->result_code||'').' - '.($tx->error_message||'') );
skip "transaction did not process (check litle credentials)",3 if ! defined $tx->result_code && $tx->error_message =~ /System Error/;
like( $tx->order_number, qr/^\w{5,19}/, "order_number(): ".($tx->order_number||'') );
is( $tx->is_success, 1, "is_success: 1" );
like( $tx->card_token, qr/^\w{5,19}/, "card_token(): ".($tx->card_token||'') );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/OnlinePayment/Ogone.pm view on Meta::CPAN
$self->{_content}->{currency} ||= 'EUR';
# Table to translate from Business::OnlinePayment::Ogone args to Ogone API args
# The values of this hash are also used as a list of allowed args for the HTTP POST request, thus preventing information leakage
my %ogone_api_args = (
# credentials
login => 'USERID',
password => 'PSWD',
PSPID => 'PSPID',
# primary identifier
lib/Business/OnlinePayment/Ogone.pm view on Meta::CPAN
# Call is_success() with either a true or false value, indicating if the transaction was successful or not.
if ( $response_code =~ m/^200/ ) {
$self->is_success(0); # defaults to fail
# croak 'incorrect credentials. WARNING: continuing with bad credentials will block your account s: '.$xml->{STATUS}.'{}'.$xml->{NCERROR} if $xml->{NCERROR} eq '50001119';
if ( $xml->{STATUS} == 46 ) { $self->is_success(1) } # identification required
if ( $xml->{STATUS} == 5 ) { $self->is_success(1) } # authorization accepted
if ( $xml->{STATUS} == 9 ) { $self->is_success(1) } # payment accepted
if ( $xml->{STATUS} == 91 ) { $self->is_success(1) } # partial payment accepted
lib/Business/OnlinePayment/Ogone.pm view on Meta::CPAN
payment processor will act on them in different ways, you can consider it a sort of dispatch table. The main actors are
C<action>, C<alias>, C<win3ds>.
=head3 content() internal parameter mappings
# credentials
login => 'USERID',
password => 'PSWD',
PSPID => 'PSPID',
# primary identifier
lib/Business/OnlinePayment/Ogone.pm view on Meta::CPAN
=back
=head1 TESTING
To test this module you will need to set your credentials in the environment. Put the following in a file in your hoe directory e.g. F<~/.ogone>
The password is not the same as the PSPID password, you will need to enter the API users' password.
export OGONE_PSPID=bob
export OGONE_USERID=bob_api
export OGONE_PSWD=foobar
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/OnlinePayment/PayPal.pm view on Meta::CPAN
sub transactionid { shift()->authorization(@_); }
sub order_number { shift()->correlationid(@_); }
=head2 get_credentials()
Get the credential information for Business::PayPal::API that was
provided to Business::OnlinePayment::new(). The supported arguments
are:
lib/Business/OnlinePayment/PayPal.pm view on Meta::CPAN
if behavior like this is needed in this module so I will wait for user
feedback to determine if we need/want to implement this.
=cut
sub get_credentials {
my $self = shift;
my %credentials;
my @cred_vars = (
[qw(PKCS12File PKCS12Password)],
[qw(CertFile KeyFile)], [qw(Signature)],
);
lib/Business/OnlinePayment/PayPal.pm view on Meta::CPAN
foreach my $var (@vars) {
# HACK: Business::OnlinePayment makes method lower case
my $method = lc($var);
if ( $self->can($method) ) {
$credentials{$var} = $self->$method;
}
else {
$need++;
}
}
if ($need) {
undef %credentials;
}
else {
last;
}
}
return %credentials;
}
=head2 get_request_data()
Return a hash %data with all the data from content() that we will try
lib/Business/OnlinePayment/PayPal.pm view on Meta::CPAN
=over 4
=item *
Get credentials to be used for authentication with PayPal by calling
L</get_credentials()>.
=item *
Get request data to be passed to PayPal by calling
L</get_request_data()>.
lib/Business/OnlinePayment/PayPal.pm view on Meta::CPAN
=cut
sub submit {
my $self = shift;
my %credentials = $self->get_credentials;
my %request = $self->get_request_data;
my $pp =
Business::PayPal::API->new( %credentials,
sandbox => $self->test_transaction, );
my %resp = $pp->DoDirectPaymentRequest(%request);
$self->server_response( \%resp );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/OnlinePayment/Vindicia/Select.pm view on Meta::CPAN
"Vindicia::Select",
default_Origin => 'NEW', # or RECURRING
);
push @{$client->{'mocked'}}, {
action => 'billTransactions', # must match the action you call, or the script will die
login => 'mocked', # must match the login credentials used, or the script will die
resp => 'ok_duplicate', # or you can return a HASH of the actual data you want to mock
};
=head1 FUNCTIONS
view all matches for this distribution
view release on metacpan or search on metacpan
eg/lib/Example/Role/Auth.pm view on Meta::CPAN
use MooX::Options;
use Business::PayPal::API qw( GetTransactionDetails TransactionSearch );
use Types::Standard qw( InstanceOf );
# credentials
option password => (
is => 'ro',
format => 's',
required => 1,
doc => 'password',
view all matches for this distribution
view release on metacpan or search on metacpan
t/Business-PayPal-NVP.t view on Meta::CPAN
diag '###################################################################';
}
}
if ( ! %auth ) {
# put in fake credentials for at least bare minimum tests
$auth{'user'} = 'your.TEST.api.username.for.paypal.tld';
$auth{'pwd'} = 'your.TEST.api.password';
$auth{'sig'} = 'your.TEST.api.signature';
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/PayPal/Permissions.pm view on Meta::CPAN
=item * password
=item * signature
credentials from paypal.com
=item * app_id
app id from x.com, use 'APP-80W284485P519543T' for sandbox
view all matches for this distribution
view release on metacpan or search on metacpan
examples/test.pl view on Meta::CPAN
use lib "$Bin/../lib";
use Business::PayPoint;
use Data::Dumper;
my $bp = Business::PayPoint->new();
$bp->set_credentials( 'secpay', 'secpay', 'secpay' );
my %result = $bp->validateCardFull(
'trans_id' => 'tran0001',
'ip' => '127.0.0.1',
'name' => 'Mr Cardholder',
view all matches for this distribution
view release on metacpan or search on metacpan
t/210-USPS_Online-basic.t view on Meta::CPAN
use Scalar::Util qw(blessed);
plan skip_all => 'Required modules not installed'
unless Business::Shipping::Config::calc_req_mod('USPS_Online');
plan skip_all => 'No credentials'
unless $ENV{USPS_USER_ID} and $ENV{USPS_PASSWORD};
plan skip_all => 'Slow tests. Set TEST_SLOW to run.'
unless $ENV{TEST_SLOW};
view all matches for this distribution
view release on metacpan or search on metacpan
share/tnt-expressconnect/xsd/pricing/v3/PriceResponseOUT.xsd view on Meta::CPAN
</xs:complexType>
<xs:complexType name="brokenRule">
<xs:annotation>
<xs:documentation>The brokenRule section is for application errors which the customer can resolve such as invalid
postcode, login credentials.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="rateId" type="xs:string">
<xs:annotation>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/TrueLayer/Authenticator.pm view on Meta::CPAN
}
my $url = "https://" . $self->host . "/connect/token";
my $json = JSON->new->utf8->canonical->encode(
{
grant_type => 'client_credentials',
client_id => $self->client_id,
client_secret => $self->client_secret,
scope => join( " ",$self->scope->@* ),
}
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/UPS/Tracking.pm view on Meta::CPAN
UPS account password
=head2 config
Optionally you can retrieve all or some UPS webservice credentials from a
configuration file. This accessor holds the path to this file.
Defaults to C<~/.ups_tracking>
Example configuration file:
view all matches for this distribution
view release on metacpan or search on metacpan
* Removed two tests that started failing due to changes in the API
response.
* Skip tracking tests (which are disabled anyway) rather than failing if
test credentials aren't set.
* Access to the testing/staging environment is no longer granted by
default and testing against the production environment is allowed
(load/stress testing isn't), so tests are now run against the
production API by default. To run against the testing/staging
environment, set USPS_WEBTOOLS_ENVIRONMENT to TESTING while setting up
your credentials.
1.124 2020-09-18
* New maintainer
1.122 2016-10-13T00:13:29Z
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/cXML.pm view on Meta::CPAN
}
=item C<B<sender_callback>( I<$sub> )>
By default, a request's From/Sender credentials are only used to guess
response credentials. If you specify a callback here, it will be invoked
immediately after XML parsing, before passing to transaction handlers, giving
you an opportunity to authenticate the caller.
Your subroutine will be passed 3 arguments:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/eWAY/RapidAPI.pm view on Meta::CPAN
else {
$content_type = "application/json";
}
my $ua = $self->ua;
$ua->credentials( $self->username, $self->password );
my $resp;
if ($is_post) {
$resp = $ua->post(
$url,
Content => $request,
view all matches for this distribution
view release on metacpan or search on metacpan
t/samples/slashdot.rss view on Meta::CPAN
<slash:section>hardware</slash:section>
<slash:hit_parade>6,6,4,2,0,0,0</slash:hit_parade>
<feedburner:origLink>http://slashdot.feedsportal.com/c/35028/f/647410/s/3c35f940/sc/38/l/0Lhardware0Bslashdot0Borg0Cstory0C140C0A70C0A60C0A0A392340Cby0E20A450Ethe0Etop0Especies0Ewill0Eno0Elonger0Ebe0Ehumans0Eand0Ethat0Ecould0Ebe0Ea0Eproblem0Dut...
</item>
<item><title>Two Earth-Like Exoplanets Don't Actually Exist</title><link>http://rss.slashdot.org/~r/Slashdot/slashdot/~3/NcsdVQtQOQQ/story01.htm</link><description>Two suspected exoplanets, Gliese 581g and 581d, have been shown to not exist, and ...
view all matches for this distribution
view release on metacpan or search on metacpan
docs/database.html view on Meta::CPAN
my @events = $schema->resultset('Event')->search( { hostname => 'foo' } );
</pre>
<p>More typically you will not want to specify the user
credentials in the script itself so the better approach is to use
a configuration file. That can be done like this:</p>
<pre>
use BuzzSaw::DB;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Buzznet/API.pm view on Meta::CPAN
sub getXMLRPC
{
my $self = shift;
my $cli = RPC::XML::Client->new($self->url);
$cli->credentials("Buzznet",$self->{"username"},$self->{"password"});
my $request = $cli->request;
return $cli;
}
sub sendRequest
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CAM/App.pm view on Meta::CPAN
=item authenticate
Test the login information, if any. Currently no tests are performed
-- this is a no-op. Subclasses may override this method to test login
credentials. Even though it's currently trivial, subclass methods
should alway include the line:
return undef if (!$self->SUPER::authenticate());
In case the parent authenticate() method adds a test in the future.
view all matches for this distribution
view release on metacpan or search on metacpan
my $protocol = lc($1);
my $host = $2;
my $path = $3;
# Strip off user and password, if any
my $credentials;
if ($host =~ /^(.*)\@([^\@]*)$/) {
$credentials = $1;
$host = lc($2);
} else {
$host = lc($host);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/Authentication/Driver/CDBI.pm view on Meta::CPAN
FIELD_METHODS supports filters as specified by
CGI::Application::Plugin::Authentication::Driver
=head1 METHODS
=head2 verify_credentials
This method will test the provided credentials against the values found in
the database, according to the Driver configuration.
=cut
sub verify_credentials {
my $self = shift;
my @creds = @_;
my @_options=$self->options;
die "The Class::DBI driver requires a hash of options" if @_options % 2;
lib/CGI/Application/Plugin/Authentication/Driver/CDBI.pm view on Meta::CPAN
my $cdbiclass=$options{CLASS};
die "CLASS option must be set." unless($cdbiclass);
return unless(scalar(@creds) eq scalar(@{$options{FIELD_METHODS}}));
my @crednames=@{$self->authen->credentials};
my %search;
my %compare;
my $i=0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/Authentication/Driver/DBIC.pm view on Meta::CPAN
=back
=head1 METHODS
=head2 verify_credentials
This method will test the provided credentials against the values found in
the database, according to the Driver configuration.
=cut
sub verify_credentials {
my $self = shift;
my @creds = @_;
my @_options = $self->options;
die "The Class::DBIx driver requires a hash of options" if @_options % 2;
lib/CGI/Application/Plugin/Authentication/Driver/DBIC.pm view on Meta::CPAN
my $class = $options{CLASS};
die "CLASS option must be set." unless($class);
return unless(scalar(@creds) eq scalar(@{$options{FIELD_METHODS}}));
my @crednames=@{$self->authen->credentials};
my %search;
my %compare;
my $i=0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
the CGI::Application::Plugin::Authentication plugin.
There are two main decisions that you need to make when using this module. How will
the usernames and password be verified (i.e. from a database, LDAP, etc...), and how
can we keep the knowledge that a user has already logged in persistent, so that they
will not have to enter their credentials again on the next request (i.e. how do we 'Store'
the authentication information across requests).
=head2 Choosing a Driver
There are three drivers that are included with the distribution. Also, there
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
Authen::Simple for more information). This should be enough to cover
everyone's needs.
If you need to authenticate against a source that is not provided, you can use
the Generic driver which will accept either a hash of username/password pairs,
or an array of arrays of credentials, or a subroutine reference that can verify
the credentials. So through the Generic driver you should be able to write
your own verification system. There is also a Dummy driver, which blindly
accepts any credentials (useful for testing). See the
L<CGI::Application::Plugin::Authentication::Driver::Generic>,
L<CGI::Application::Plugin::Authentication::Driver::DBI> and,
L<CGI::Application::Plugin::Authentication::Driver::Dummy> docs for more
information on how to use these drivers. And see the L<Authen::Simple> suite
of modules for information on those drivers.
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
This Authentication plugin can handle ticket based authentication systems as well. All that
is required of you is to write a Store module that can understand the contents of the ticket.
The Authentication plugin will require at least the 'username' to be retrieved from the
ticket. A Ticket based authentication scheme will not need a Driver module at all, since the
actual verification of credentials is done by an external authentication system, possibly
even on a different host. You will need to specify the location of the login page using
the LOGIN_URL configuration variable, and unauthenticated users will automatically
be redirected to your ticket authentication login page.
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
Here you can choose which authentication module(s) you want to use to perform the authentication.
For simplicity, you can leave off the CGI::Application::Plugin::Authentication::Driver:: part
when specifying the DRIVER name If this module requires extra parameters, you
can pass an array reference that contains as the first parameter the name of the module,
and the rest of the values in the array will be considered options for the driver. You can provide
multiple drivers which will be used, in order, to check the credentials until
a valid response is received.
DRIVER => 'Dummy' # let anyone in regardless of the password
- or -
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
# Check for CREDENTIALS
if ( defined $props->{CREDENTIALS} ) {
croak "authen config error: parameter CREDENTIALS is not a string or arrayref"
if ref $props->{CREDENTIALS} && Scalar::Util::reftype( $props->{CREDENTIALS} ) ne 'ARRAY';
$config->{CREDENTIALS} = delete $props->{CREDENTIALS};
# We will accept a string, but what we really want is an arrayref of the credentials
no warnings qw(uninitialized);
$config->{CREDENTIALS} = [ $config->{CREDENTIALS} ] if Scalar::Util::reftype( $config->{CREDENTIALS} ) ne 'ARRAY';
}
# Check for LOGIN_SESSION_TIMEOUT
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
$self->initialize;
return $self->{is_new_login};
}
=head2 credentials
This method will return the names of the form parameters that will be
looked for during a login. By default they are authen_username and authen_password,
but these values can be changed by supplying the CREDENTIALS parameters in the
configuration. Calling this function, will not itself generate cookies or session ids.
=cut
sub credentials {
my $self = shift;
my $config = $self->_config;
return $config->{CREDENTIALS} || [qw(authen_username authen_password)];
}
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
}
=head2 drivers
This method will return a list of driver objects that are used for
verifying the login credentials. Calling this function, will not itself generate cookies or session ids.
=cut
sub drivers {
my $self = shift;
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
# We do this before checking to see if the user is already logged in, since
# a logged in user may want to log in as a different user.
my $field_names = $config->{CREDENTIALS} || [qw(authen_username authen_password)];
my $query = $self->_cgiapp->query;
my @credentials = map { scalar $query->param($_) } @$field_names;
if ($credentials[0]) {
# The user is trying to login
# make sure if they are already logged in, that we log them out first
my $store = $self->store;
$store->clear if $store->fetch('username');
foreach my $driver ($self->drivers) {
if (my $username = $driver->verify_credentials(@credentials)) {
# This user provided the correct credentials
# so save this new login in the store
my $now = time();
$store->save( username => $username, login_attempts => 0, last_login => $now, last_access => $now );
$self->{is_new_login} = 1;
# See if we are remembering the username for this user
lib/CGI/Application/Plugin/Authentication.pm view on Meta::CPAN
sub authen_login_runmode {
my $self = shift;
my $authen = $self->authen;
my $credentials = $authen->credentials;
my $username = $credentials->[0];
my $password = $credentials->[1];
my $html;
if ( my $sub = $authen->_config->{RENDER_LOGIN} ) {
$html = $sub->($self);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Authen/Simple.pm view on Meta::CPAN
my $auth = CGI::Authen::Simple->new();
$auth->logged_in() || $auth->auth();
# do stuff here
# if you need it, you can access the user's credentials like so:
my $username = $auth->{'profile'}->{'username'};
# assume your account table had other attributes, like full_name char(64)
my $fullname = $auth->{'profile'}->{'full_name'};
view all matches for this distribution
view release on metacpan or search on metacpan
=head2 REMINDER
CGI::Authent doesn't validate the passwords. It cannot even see them. It
just does a few tests and if the tests fail it sends to the user a
request for authentication. But it's the server's task to validate the
credentials passed by the browser.
If you want for example to validate passwords against a database,
consult your servers documentation. You will probably have to install some filter or plugin.
It should be relatively easy to find such beasts on the net. I've written an ISAPI filter for this,
you may get it at http://jenda.krynicky.cz/authfilter.1.0.zip . Take it as an example, not as a solution!
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Ex/Auth.pm view on Meta::CPAN
$self->no_cookies_print;
return;
}
}
# oh - you're still here - well then - ask for login credentials
my $key_r = $self->key_redirect;
local $form->{$key_r} = $form->{$key_r} || $self->script_name . $self->path_info . (scalar(keys %$form) ? "?".$self->cgix->make_form($form) : '');
local $form->{'had_form_data'} = $args->{'had_form_data'} || 0;
$self->login_print;
my $data = $self->last_auth_data;
eval { die defined($data) ? $data : "Requesting credentials" };
# allow for a sleep to help prevent brute force
sleep($self->failed_sleep) if defined($data) && $data->error ne 'Login expired' && $self->failed_sleep;
$self->failure_hook;
view all matches for this distribution
view release on metacpan or search on metacpan
###########################################################
sub _login {
##
## check login credentials and load user profile
##
my $self = shift;
my ($username, $password) = @_;
view all matches for this distribution