Business-PinPayment

 view release on metacpan or  search on metacpan

lib/Business/PinPayment.pm  view on Meta::CPAN

our $VERSION = '0.04';

# build 4.1

sub new {
  my ($class, %args) = (@_);
  my $self = bless {}, $class;
  $args{config} ||= {};
  
  $self->{config} = {
    api_version => '1', # the '1' in the API endpoint host names, e.g. https://test-api.pin.net.au/1/charges
    api_key => undef, # Secret API Key
    api => 'charges', # 'customers', 'refunds'
    amount => '100', # 100 cents. Must be greater or equal to $1.00
    currency => 'AUD', # 'USD', 'NZD', or 'SGD'
    description => 'charges',
    email => 'tester@work.com.au',
    ip_address => undef,
    charge_token => undef, # for refunds API
    card_token => undef,
    customer_token => undef,

lib/Business/PinPayment.pm  view on Meta::CPAN

=head2 C<new>

Instantiates a new PinPayment object. By default, it runs a test transaction with the given API key.

=over

=item C<config>

A hashref of parameters accepted by the PinPayment API . See L<https://pin.net.au/docs/api>. Default values:

  api_version => '1', # the '1' in the API endpoint host names, e.g. https://test-api.pin.net.au/1/charges
  api_key => undef, # Secret API Key
  api => 'charges', # 'customers', 'refunds'
  amount => '100', # 100 cents. Must be greater or equal to $1.00
  currency => 'AUD', # 'USD', 'NZD', or 'SGD'
  description => 'charges',
  email => 'tester@work.com.au',
  ip_address => undef,
  charge_token => undef, # for refunds API
  card_token => undef,
  customer_token => undef,



( run in 0.356 second using v1.01-cache-2.11-cpan-b61123c0432 )