Business-OnlinePayment-Vindicia-Select

 view release on metacpan or  search on metacpan

lib/Business/OnlinePayment/Vindicia/Select.pm  view on Meta::CPAN


Returns the complete response from the server.  The response has been stripped of card_num, cvv2, and password.  So it should be safe to log.

=cut

sub server_response {
    my ( $self, $val, $tf ) = @_;
    if ($val) {
        $self->{server_response} = scrubber $val;
        $self->server_response_dangerous($val,1) unless $tf;
    }
    return $self->{server_response};
}

=head2 server_response_dangerous

Returns the complete response from the server.  This could contain data that is NOT SAFE to log.  It should only be used in a test environment, or in a PCI compliant manner.

=cut

sub server_response_dangerous {
    my ( $self, $val, $tf ) = @_;
    if ($val) {
        $self->{server_response_dangerous} = $val;
        $self->server_response($val,1) unless $tf;
    }
    return $self->{server_response_dangerous};
}

=head1 Handling of content(%content) data:

=head2 action

The following actions are valid

  normal authorization
  authorization only
  post authorization
  credit
  void
  auth reversal

=head1 TESTING

The test suite runs using mocked data results.
All tests are run using MOCKED return values.
If you wish to run REAL tests then add these ENV variables.

 export PERL_BUSINESS_VINDICIA_USERNAME=your_test_user
 export PERL_BUSINESS_VINDICIA_PASSWORD=your_test_password

If you would like to create your own tests, or mock your own responses you can do the following

  use Business::OnlinePayment;
  my $tx = Business::OnlinePayment->new(
     "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

=head2 _info

Return the introspection hash for BOP 3.x

=cut

sub _info {
    return {
        info_compat       => '0.01',
        gateway_name      => 'Vindicia Select - SOAP API',
        gateway_url       => 'http://www.vindicia.com',
        module_version    => $VERSION,
        supported_types   => ['CC','ECHECK'],
        supported_actions => {
            CC => [

                #non-standard bop actions
                'billTransactions',
                'fetchBillingResults',
                'fetchByMerchantTransactionId',
                'refundTransactions',
            ],
        },
    };
}

=head2 set_defaults

Used by BOP to set default values during "new"

=cut

sub set_defaults {
    my ($self, %opts) = @_;

    $self->build_subs(
        qw( order_number md5 avs_code cvv2_response card_token cavv_response failure_status verify_SSL )
    );

    $self->test_transaction(0);
    $self->{_scrubber} = \&_default_scrubber;
}

=head2 test_transaction

Get/set the server used for processing transactions.  Possible values are Live, Certification, and Sandbox
Default: Live

  #Live
  $self->test_transaction(0);

  #Test
  $self->test_transaction(1);

  #Read current value

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.159 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )