[freeside-commits] freeside/fs_selfservice/FS-SelfService SelfService.pm, 1.48, 1.49

Ivan,,, ivan at wavetail.420.am
Sun May 24 18:49:36 PDT 2009


Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService
In directory wavetail.420.am:/tmp/cvs-serv15684/fs_selfservice/FS-SelfService

Modified Files:
	SelfService.pm 
Log Message:
international self-service payments, RT#1592

Index: SelfService.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/SelfService.pm,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- SelfService.pm	18 May 2009 09:55:30 -0000	1.48
+++ SelfService.pm	25 May 2009 01:49:34 -0000	1.49
@@ -86,8 +86,9 @@
 );
 @EXPORT_OK = (
   keys(%autoload),
-  qw( regionselector regionselector_hashref
-      expselect popselector domainselector didselector )
+  qw( regionselector regionselector_hashref location_form
+      expselect popselector domainselector didselector
+    )
 );
 
 $ENV{'PATH'} ='/usr/bin:/usr/ucb:/bin';
@@ -550,6 +551,10 @@
 
 Zip or postal code
 
+=item country
+
+Two-letter country code
+
 =item payinfo
 
 Card number
@@ -1436,6 +1441,52 @@
   };
 }
 
+=item location_form HASHREF | LIST
+
+Takes as input a hashref or list of key/value pairs with the following keys:
+
+=over 4
+
+=item session_id
+
+Current customer session_id
+
+=item no_asterisks
+
+Omit red asterisks from required fields.
+
+=item address1_label
+
+Label for first address line.
+
+=back
+
+Returns an HTML fragment for a location form (address, city, state, zip,
+country)
+
+=cut
+
+sub location_form {
+  my $param;
+  if ( ref($_[0]) ) {
+    $param = shift;
+  } else {
+    $param = { @_ };
+  }
+
+  my $session_id = delete $param->{'session_id'};
+
+  my $rv = mason_comp( 'session_id' => $session_id,
+                       'comp'       => '/elements/location.html',
+                       'args'       => [ %$param ],
+                     );
+
+  #hmm.
+  $rv->{'error'} || $rv->{'output'};
+
+}
+
+
 #=item expselect HASHREF | LIST
 #
 #Takes as input a hashref or list of key/value pairs with the following keys:



More information about the freeside-commits mailing list