<<

NAME

Net::Simplify - Simplify Commerce Payments API

SYNOPSIS

  use Net::Simplify;

  # Set global API keys
  $Net::Simplify::public_key = 'YOUR PUBLIC KEY';
  $Net::Simplify::private_key = 'YOUR PRIVATE KEY';

  # Create a payment
  my $payment = Net::Simplify::Payment->create({
          amount => 1200,
          currency => 'USD',
          description => 'test payment',
          card => {
             number => "5555555555554444",
             cvc => "123",
             expMonth => 12,
             expYear => 19
          },
          reference => 'P100'
  });

  printf "Payment %s %s\n", $payment->{id}, $payment->{paymentStatus};



  # Use an Authentication object to hold credentials
  my $auth = Net::Simplify::Authentication->create({
        public_key => 'YOUR PUBLIC KEY',
        private_key => 'YOUR PRIVATE_KEY'
  };

  # Create a payment using the $auth object
  my $payment2 = Net::Simplify::Payment->create({
          amount => 2400,
          currency => 'USD',
          description => 'test payment',
          card => {
             number => "5555555555554444",
             cvc => "123",
             expMonth => 12,
             expYear => 19
          },
          reference => 'P101'
  }, $auth);

  printf "Payment %s %s\n", $payment2->{id}, $payment2->{paymentStatus};

DESCRIPTION

The Simplify module provides a convenient way of accessing the Simplify API. It allows global authentication keys to be set and imports all of the Simplify packages.

GLOBAL VARIABLES

$Net::Simplify::public_key

The public key to be used for all API calls where an Authentication object is not passed.

$Net::Simplify::private_key

The private key to be used for all API calls where an Authentication object is not passed.

$Net::Simplify::user_agent

The user agent string to be sent with all requests.

SEE ALSO

Net::Simplify::AccessToken, Net::Simplify::ApiException, Net::Simplify::Authentication, Net::Simplify::AuthenticationException, Net::Simplify::Authorization, Net::Simplify::BadRequestException, Net::Simplify::CardToken, Net::Simplify::Constants, Net::Simplify::Coupon, Net::Simplify::Customer, Net::Simplify::Event, Net::Simplify::Event, Net::Simplify::FieldError, Net::Simplify::FraudCheck, Net::Simplify::IllegalArgumentException, Net::Simplify::Invoice, Net::Simplify::InvoiceItem, Net::Simplify::Tax, Net::Simplify::TransactionReview, Net::Simplify::NotAllowedException, Net::Simplify::ObjectNotFoundException, Net::Simplify::Payment, Net::Simplify::Plan, Net::Simplify::Refund, Net::Simplify::Subscription, Net::Simplify::SystemException, Net::Simplify::Webhook, http://www.simplify.com

VERSION

1.6.0

LICENSE

Copyright (c) 2013 - 2024 MasterCard International Incorporated All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the MasterCard International Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

<<