125 lines
4.6 KiB
RPMSpec
125 lines
4.6 KiB
RPMSpec
#
|
|
# spec file for package perl-Business-PayPal-API
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name Business-PayPal-API
|
|
Name: perl-Business-PayPal-API
|
|
Version: 0.770.0
|
|
Release: 0
|
|
# 0.77 -> normalize -> 0.770.0
|
|
%define cpan_version 0.77
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: PayPal SOAP API client with sandbox support
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/O/OA/OALDERS/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(Data::Printer)
|
|
BuildRequires: perl(List::AllUtils)
|
|
BuildRequires: perl(SOAP::Lite) >= 0.67
|
|
BuildRequires: perl(Test::Most)
|
|
BuildRequires: perl(autodie)
|
|
Requires: perl(Data::Printer)
|
|
Requires: perl(SOAP::Lite) >= 0.67
|
|
Provides: perl(Business::PayPal::API) = %{version}
|
|
Provides: perl(Business::PayPal::API::AuthorizationRequest) = %{version}
|
|
Provides: perl(Business::PayPal::API::CaptureRequest) = %{version}
|
|
Provides: perl(Business::PayPal::API::DirectPayments) = %{version}
|
|
Provides: perl(Business::PayPal::API::ExpressCheckout) = %{version}
|
|
Provides: perl(Business::PayPal::API::GetBalance) = %{version}
|
|
Provides: perl(Business::PayPal::API::GetTransactionDetails) = %{version}
|
|
Provides: perl(Business::PayPal::API::MassPay) = %{version}
|
|
Provides: perl(Business::PayPal::API::ReauthorizationRequest) = %{version}
|
|
Provides: perl(Business::PayPal::API::RecurringPayments) = %{version}
|
|
Provides: perl(Business::PayPal::API::RefundTransaction) = %{version}
|
|
Provides: perl(Business::PayPal::API::TransactionSearch) = %{version}
|
|
Provides: perl(Business::PayPal::API::VoidRequest) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
*Business::PayPal::API* supports both certificate authentication and the
|
|
new 3-token "Signature" authentication.
|
|
|
|
It also supports PayPal's development _sandbox_ for testing. See the
|
|
*sandbox* parameter to *new()* below for details.
|
|
|
|
*Business::PayPal::API* can import other *API* derived classes:
|
|
|
|
use Business::PayPal::API qw( RefundTransaction );
|
|
|
|
This allows for much more concise and intuitive usage. For example, these
|
|
two statements are equivalent:
|
|
|
|
use Business::PayPal::API::RefundTransaction;
|
|
my $pp = Business::PayPal::API::RefundTransaction->new( ... );
|
|
$pp->RefundTransaction( ... );
|
|
|
|
and more concisely:
|
|
|
|
use Business::PayPal::API qw( RefundTransaction );
|
|
my $pp = Business::PayPal::API->new( ... );
|
|
$pp->RefundTransaction( ... );
|
|
|
|
The advantage of this becomes clear when you need to use multiple API calls
|
|
in your program; this allows you to use the same object to invoke the
|
|
various methods, instead of creating a new object for each subclass. Here
|
|
is an example of a *API* object used to invoke various PayPal APIs with the
|
|
same object:
|
|
|
|
use Business::PayPal::API qw( GetTransactionDetails
|
|
TransactionSearch
|
|
RefundTransaction );
|
|
my $pp = Business::PayPal::API->new( ... );
|
|
my $records = $pp->TransactionSearch( ... );
|
|
|
|
my %details = $pp->GetTransactionDetails( ... );
|
|
|
|
my %resp = $pp->RefundTransaction( ... );
|
|
|
|
However, you may certainly use just the subclass if that's all you need.
|
|
Every subclass should work as its own self-contained API.
|
|
|
|
For details on *Business::PayPal::API::** subclasses, see each subclass's
|
|
individual documentation.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
%make_build
|
|
|
|
%check
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc auth.sample.3token auth.sample.cert Changes CONTRIBUTING.md CONTRIBUTORS README.md
|
|
%license LICENSE
|
|
|
|
%changelog
|