[Catalyst-commits] r14434 - in trunk/Catalyst-Model-PayPal-IPN: . lib/Catalyst/Model/PayPal t

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Mon Feb 25 14:31:13 GMT 2013


Author: t0m
Date: 2013-02-25 14:31:13 +0000 (Mon, 25 Feb 2013)
New Revision: 14434

Modified:
   trunk/Catalyst-Model-PayPal-IPN/Changes
   trunk/Catalyst-Model-PayPal-IPN/README
   trunk/Catalyst-Model-PayPal-IPN/lib/Catalyst/Model/PayPal/IPN.pm
   trunk/Catalyst-Model-PayPal-IPN/t/pod.t
Log:
Version 0.03

Modified: trunk/Catalyst-Model-PayPal-IPN/Changes
===================================================================
--- trunk/Catalyst-Model-PayPal-IPN/Changes	2013-02-01 03:16:22 UTC (rev 14433)
+++ trunk/Catalyst-Model-PayPal-IPN/Changes	2013-02-25 14:31:13 UTC (rev 14434)
@@ -1,4 +1,7 @@
 Revision history for Catalyst-Model-PayPal-IPN
 
+0.03  2013-02-25 14:12:00
+    - Fix pod tests
+
 0.02  2009-05-01 22:55:12
     - First release.

Modified: trunk/Catalyst-Model-PayPal-IPN/README
===================================================================
--- trunk/Catalyst-Model-PayPal-IPN/README	2013-02-01 03:16:22 UTC (rev 14433)
+++ trunk/Catalyst-Model-PayPal-IPN/README	2013-02-25 14:31:13 UTC (rev 14434)
@@ -3,7 +3,7 @@
     PayPal Button Generation
 
 VERSION
-    This document describes Catalyst::Model::PayPal::IPN version 0.02
+    This document describes Catalyst::Model::PayPal::IPN version 0.03
 
 SYNOPSIS
         lib/MyApp/Model/Paypal/IPN.pm
@@ -23,22 +23,22 @@
             page_style: MyApp
             no_note: 1
             no_shipping: 1
-            lc: GB      
+            lc: GB
             bn: PP-BuyNowBF
 
-        Model::Paypal::IPN:    
+        Model::Paypal::IPN:
             debug_mode: 1
             encrypt_mode: 0
             business_email: ghenry_1188297224_biz at suretecsystems.com
             currency_code: GBP
             cert: /home/ghenry/MyApp/root/auth/paypal_certs/www.myapp.net.crt
             cert_key: /home/ghenry/MyApp/root/auth/paypal_certs/www.myapp.net.key
-            paypal_cert: /home/ghenry/MyApp/root/auth/paypal_certs/paypal_sandbox_cert.pem 
+            paypal_cert: /home/ghenry/MyApp/root/auth/paypal_certs/paypal_sandbox_cert.pem
             completion_action:
                 - Subscribe
                 - subscribe
                 - payment
-                - received 
+                - received
             postback_action:
                 - Subscribe
                 - subscribe
@@ -95,9 +95,9 @@
 
         sub cancelled : Path('payment/cancelled') {
             my ( $self, $c ) = @_;
-    
+
             Do stuff on cancel
-   
+
             $c->stash->{template} = 'user/subscribe/cancelled.tt';
         }
 
@@ -107,7 +107,7 @@
 
         sub generate_paypal_buttons : Private {
             my ( $self, $c ) = @_;
-    
+
             if ( $c->stash->{all_buttons} ) {
                 $c->stash->{subtypes} = [
                     $c->model('FTMAdminDB::FTMTariffs')->search(
@@ -134,7 +134,7 @@
                         bn          => $c->config->{paypal}->{bn},
                         custom      => $c->req->param('subid'),
                     );
-    
+
                     if ( $c->debug ) {
                         for my $param ( keys %data ) {
                             $c->log->debug( $param . '=' . $data{$param} );
@@ -142,16 +142,16 @@
                     }
                     $c->stash->{unencrypted_form_data} =
                       $c->model('Paypal::IPN')->form_info( \%data );
-    
+
                     my @button_info = (
                         $tariff->itemdesc, $tariff->peruser,
                         $c->stash->{unencrypted_form_data}
                     );
                     push @{ $c->stash->{unencrypted_buttons} }, \@button_info;
-                
+
                     #$c->stash->{encrypted_form_data} =
                     #  $c->model('Paypal::IPN')->encrypt_form( \%data );
-    
+
                     #my @button_info = (
                     #    $tariff->itemdesc, $tariff->peruser,
                     #    $c->stash->{encrypted_form_data}
@@ -160,7 +160,7 @@
                 }
             }
         }
-    
+
         buttons.tt
 
         <table>
@@ -168,7 +168,7 @@
                 <tr>
                     <td><b>[% button.0 %]</b></td>
                     <td><b>Price:</b> £[% button.1 %]</td>
-                    <td class="content">    
+                    <td class="content">
                         <form method="post" action="[% c.model('Paypal::IPN').paypal_gateway %]">
                         <input type="hidden" name="cmd" value="_xclick">
                         <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0"
@@ -201,6 +201,9 @@
 
     See Business::PayPal::IPN for more info.
 
+    WARNING: this module does not have real tests yet, if you encounter
+    problems please report them via <http://rt.cpan.org/> .
+
 INTERFACE
   build_paypal_gateway
     If debug_mode is on, returns sandbox url, otherwise normal PayPal
@@ -237,7 +240,7 @@
     The usual techniques for suppling model configuration data in Catalyst
     apply, but the follow should be present:
 
-        Model::Paypal::IPN:    
+        Model::Paypal::IPN:
             debug_mode: 1
             encrypt_mode: 0
             business_email: ghenry_1188297224_biz at suretecsystems.com
@@ -246,7 +249,7 @@
                 - Subscribe
                 - subscribe
                 - payment
-                - received 
+                - received
             postback_action:
                 - Subscribe
                 - subscribe

Modified: trunk/Catalyst-Model-PayPal-IPN/lib/Catalyst/Model/PayPal/IPN.pm
===================================================================
--- trunk/Catalyst-Model-PayPal-IPN/lib/Catalyst/Model/PayPal/IPN.pm	2013-02-01 03:16:22 UTC (rev 14433)
+++ trunk/Catalyst-Model-PayPal-IPN/lib/Catalyst/Model/PayPal/IPN.pm	2013-02-25 14:31:13 UTC (rev 14434)
@@ -4,7 +4,7 @@
 use Business::PayPal::IPN;
 use namespace::clean -except => ['meta'];
 
-our $VERSION   = '0.02';
+our $VERSION   = '0.03';
 our $AUTHORITY = 'cpan:MSTROUT';
 
 extends 'Catalyst::Model';
@@ -122,7 +122,7 @@
     shift->_check_encrypt_mode;
 }
 
-sub _check_encrypt_mode { 
+sub _check_encrypt_mode {
     Catalyst::Utils::ensure_class_loaded('Business::PayPal::EWP')
           if shift->encrypt_mode;
 }
@@ -253,13 +253,15 @@
 1;
 __END__
 
-=head1 NAME 
+=encoding utf8
 
+=head1 NAME
+
 Catalyst::Model::PayPal::IPN - Handle Instant Payment Notifications and PayPal Button Generation
 
 =head1 VERSION
 
-This document describes Catalyst::Model::PayPal::IPN version 0.02
+This document describes Catalyst::Model::PayPal::IPN version 0.03
 
 =head1 SYNOPSIS
 
@@ -280,22 +282,22 @@
         page_style: MyApp
         no_note: 1
         no_shipping: 1
-        lc: GB      
+        lc: GB
         bn: PP-BuyNowBF
 
-    Model::Paypal::IPN:    
+    Model::Paypal::IPN:
         debug_mode: 1
         encrypt_mode: 0
         business_email: ghenry_1188297224_biz at suretecsystems.com
         currency_code: GBP
         cert: /home/ghenry/MyApp/root/auth/paypal_certs/www.myapp.net.crt
         cert_key: /home/ghenry/MyApp/root/auth/paypal_certs/www.myapp.net.key
-        paypal_cert: /home/ghenry/MyApp/root/auth/paypal_certs/paypal_sandbox_cert.pem 
+        paypal_cert: /home/ghenry/MyApp/root/auth/paypal_certs/paypal_sandbox_cert.pem
         completion_action:
             - Subscribe
             - subscribe
             - payment
-            - received 
+            - received
         postback_action:
             - Subscribe
             - subscribe
@@ -352,9 +354,9 @@
 
     sub cancelled : Path('payment/cancelled') {
         my ( $self, $c ) = @_;
-    
+
         Do stuff on cancel
-   
+
         $c->stash->{template} = 'user/subscribe/cancelled.tt';
     }
 
@@ -364,7 +366,7 @@
 
     sub generate_paypal_buttons : Private {
         my ( $self, $c ) = @_;
-    
+
         if ( $c->stash->{all_buttons} ) {
             $c->stash->{subtypes} = [
                 $c->model('FTMAdminDB::FTMTariffs')->search(
@@ -391,7 +393,7 @@
                     bn          => $c->config->{paypal}->{bn},
                     custom      => $c->req->param('subid'),
                 );
-    
+
                 if ( $c->debug ) {
                     for my $param ( keys %data ) {
                         $c->log->debug( $param . '=' . $data{$param} );
@@ -399,16 +401,16 @@
                 }
                 $c->stash->{unencrypted_form_data} =
                   $c->model('Paypal::IPN')->form_info( \%data );
-    
+
                 my @button_info = (
                     $tariff->itemdesc, $tariff->peruser,
                     $c->stash->{unencrypted_form_data}
                 );
                 push @{ $c->stash->{unencrypted_buttons} }, \@button_info;
-                
+
                 #$c->stash->{encrypted_form_data} =
                 #  $c->model('Paypal::IPN')->encrypt_form( \%data );
-    
+
                 #my @button_info = (
                 #    $tariff->itemdesc, $tariff->peruser,
                 #    $c->stash->{encrypted_form_data}
@@ -417,7 +419,7 @@
             }
         }
     }
-    
+
     buttons.tt
 
     <table>
@@ -425,7 +427,7 @@
             <tr>
                 <td><b>[% button.0 %]</b></td>
                 <td><b>Price:</b> £[% button.1 %]</td>
-                <td class="content">    
+                <td class="content">
                     <form method="post" action="[% c.model('Paypal::IPN').paypal_gateway %]">
                     <input type="hidden" name="cmd" value="_xclick">
                     <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0"
@@ -448,14 +450,14 @@
                 </td>
             </tr>
     </table>
-  
-  
+
+
 =head1 DESCRIPTION
 
 This model handles all the latest PayPal IPN vars, and provides an
 easy method for checking that the transaction was successful.
 
-There are also convenience methods for generating encrypted and non-encrypted 
+There are also convenience methods for generating encrypted and non-encrypted
 PayPal forms and buttons.
 
 See L<Business::PayPal::IPN> for more info.
@@ -463,21 +465,21 @@
 B<WARNING:> this module does not have real tests yet, if you encounter problems
 please report them via L<http://rt.cpan.org/> .
 
-=head1 INTERFACE 
+=head1 INTERFACE
 
-=head2 build_paypal_gateway 
+=head2 build_paypal_gateway
 
 If debug_mode is on, returns sandbox url, otherwise normal PayPal gateway
 
-=head2 is_completed 
+=head2 is_completed
 
 Calls is_completed from L<Business::PayPal::IPN>
 
-=head2 error 
+=head2 error
 
 Calls error from L<Business::PayPal::IPN>
 
-=head2 buyer_info 
+=head2 buyer_info
 
 Returns IPN vars via L<Business::PayPal::IPN>
 
@@ -487,7 +489,7 @@
 
 Returns a hashref of amount, invoice and custom.
 
-=head2 form_info 
+=head2 form_info
 
 Takes a hashref and returns form data for looping through to create your form.
 
@@ -504,7 +506,7 @@
 The usual techniques for suppling model configuration data in Catalyst apply,
 but the follow should be present:
 
-    Model::Paypal::IPN:    
+    Model::Paypal::IPN:
         debug_mode: 1
         encrypt_mode: 0
         business_email: ghenry_1188297224_biz at suretecsystems.com
@@ -513,7 +515,7 @@
             - Subscribe
             - subscribe
             - payment
-            - received 
+            - received
         postback_action:
             - Subscribe
             - subscribe
@@ -525,7 +527,7 @@
             - payment
             - cancelled
 
-debug_mode switches form url to the PayPal sandbox url. If using encrypted 
+debug_mode switches form url to the PayPal sandbox url. If using encrypted
 buttons, i.e.
 
     encrypt_mode: 1
@@ -534,8 +536,8 @@
 
     cert: /home/ghenry/MyApp/root/auth/paypal_certs/www.myapp.net.crt
     cert_key: /home/ghenry/MyApp/root/auth/paypal_certs/www.myapp.net.key
-    paypal_cert: /home/ghenry/MyApp/root/auth/paypal_certs/paypal_sandbox_cert.pem 
- 
+    paypal_cert: /home/ghenry/MyApp/root/auth/paypal_certs/paypal_sandbox_cert.pem
+
 Catalyst::Model::PayPal::IPN requires:
 
 =head1 DEPENDENCIES

Modified: trunk/Catalyst-Model-PayPal-IPN/t/pod.t
===================================================================
--- trunk/Catalyst-Model-PayPal-IPN/t/pod.t	2013-02-01 03:16:22 UTC (rev 14433)
+++ trunk/Catalyst-Model-PayPal-IPN/t/pod.t	2013-02-25 14:31:13 UTC (rev 14434)
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use Test::More;
 eval "use Test::Pod 1.14";




More information about the Catalyst-commits mailing list