AMF-Perl

 view release on metacpan or  search on metacpan

doc/examples/petmarket/petmarket.sql  view on Meta::CPAN

  homestate char(2) default NULL,
  homecountry varchar(50) default NULL,
  homezip varchar(10) default NULL,
  homephone varchar(20) default NULL,
  shippingstreet1 varchar(50) default NULL,
  shippingstreet2 varchar(50) default NULL,
  shippingcity varchar(50) default NULL,
  shippingcountry varchar(50) default NULL,
  shippingzip varchar(10) default NULL,
  shippingphone varchar(20) default NULL,
  creditcardnumber varchar(50) default NULL,
  creditcardtype varchar(50) default NULL,
  creditcardexpiry varchar(50) default NULL
) TYPE=MyISAM;

--
-- Dumping data for table 'user_details'
--


doc/examples/petmarket/petmarket/api/cartservice.pm  view on Meta::CPAN


use AMF::Perl::Util::Object;

sub methodTable
{
    return {
        "getStatesAndCountries" => {
            "description" => "Returns list of states and countries.",
            "access" => "remote", 
        },
        "getCreditCards" => {
            "description" => "Returns list of allowed credit cards.",
            "access" => "remote", 
        },
        "getShippingMethods" => {
            "description" => "Returns list of shipping methods.",
            "access" => "remote", 
			"returns" => "AMFObject"
        },
        "validateCartOID" => {
            "description" => "Validate that the supplied rat OID is good.",
            "access" => "remote", 

doc/examples/petmarket/petmarket/api/cartservice.pm  view on Meta::CPAN

            "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"
    );
    my @countries = ("USA");
            
    $locations{"STATES_array"} = \@states;
    $locations{"COUNTRIES_array"} = \@countries;
            
    return \%locations;
}

sub getCreditCards 
{
    my ($self) = @_;
    my @cards = ("American Express", "Discover/Novus", "MasterCard", "Visa");
    return \@cards;
}
	
sub getShippingMethods 
{
    my @columns = ("shippingoid", "shippingname", "shippingdescription", "shippingprice", "shippingdays");
    my @names = ("Ground", "2nd Day Air", "Next Day Air", "3 Day Select");

doc/examples/petmarket/petmarket/api/stringresourcesservice.pm  view on Meta::CPAN

        $strings{"REQUIRED_FIELD_INDICATOR_str"}="*";
        $strings{"ERROR_FIELD_INDICATOR_str"}="<";
        $strings{"NUMBER_SYMBOL_str"}="-";
        $strings{"DATE_SEPARATOR_str"}="/";
        $strings{"ADDRESS_LBL_str"}="Address:";
        $strings{"CITY_LBL_str"}="City:";
        $strings{"STATE_LBL_str"}="State:";
        $strings{"ZIP_LBL_str"}="Zip / Postal Code:";
        $strings{"EMAIL_LBL_str"}="E-mail:";
        $strings{"PHONE_LBL_str"}="Phone:";
        $strings{"CC_NUMBER_LBL_str"}="Credit Card Number:";
        $strings{"CC_EXPIRATION_DATE_LBL_str"}="Expiration Date:";
        $strings{"PROFILE_FLDS_HINT_str"}="If you're a new customer, please provide your email address and a password in order to create your account.  Returning customers, log in using your email address and password.";
        $strings{"PROFILE_FLDS_LOGOUT_1_HINT_str"}="You are currently logged in with the E-mail address: ";
        $strings{"PROFILE_FLDS_LOGOUT_2_HINT_str"}="If this is not correct, you may log in to your existing account or create a new one.";
        $strings{"PROFILE_FLDS_LOGOUT_EDIT_LBL_str"}="Edit";
        $strings{"PASSWORD_LBL_str"}="Password:";
        $strings{"PASSWORD_CONFIRM_LBL_str"}="Confirm Password:";
        $strings{"CREATE_ACCOUNT_BTN_LBL_str"}="Create Account";
        $strings{"LOGIN_BTN_LBL_str"}="Login";
        $strings{"CONTINUE_BTN_LBL_str"}="Continue";

doc/examples/petmarket/petmarket/api/stringresourcesservice.pm  view on Meta::CPAN

        $strings{"CHECKOUT_USER_HD_str"}="1) Welcome";
        $strings{"CHECKOUT_BILLING_HD_str"}="2) Customer Details / Billing Address";
        $strings{"CHECKOUT_SHIPPING_HD_str"}="3) Shipping Address";
        $strings{"CHECKOUT_SHIPPING_METHOD_HD_str"}="4) Shipping Options & Promotions";
        $strings{"CHECKOUT_PAYMENT_HD_str"}="5) Payment Method & Confirmation";
        $strings{"SHIPPING_METHODS_FLDS_HINT_str"}="Please select your preferred shipping method.  If you were provided a promotional code, enter it here.";
        $strings{"SHIPPING_METHOD_LBL_str"}="Shipping Method:";
        $strings{"PROMOTION_CODE_LBL_str"}="Promotion Code:";
        $strings{"EST_DELIVERY_DATE_LBL_str"}="Estimated delivery date:";
        $strings{"CHECKOUT_SUBMIT_BTN_LBL_str"}="Place Order";
        $strings{"PAYMENT_METHOD_LBL_str"}="Credit Card Type:";
        $strings{"PAYMENT_METHODS_HINT_str"}="Please review the billing and shipping information you entered above.  Make changes by clicking the Edit button.\n\nComplete your purchase by clicking the Place Order button.";
        $strings{"CHECKOUT_EXIT_BTN_LBL_str"}="Exit Checkout";
        $strings{"ADD_TO_CART_BTN_LBL_str"}="Add To Cart";
        $strings{"HISTORY_WIDGET_LBL_str"}="history";
        $strings{"SEARCH_WIDGET_LBL_str"}="search";
        $strings{"SEARCH_WIDGET_BTN_LBL_str"}="go";
        $strings{"CART_WIDGET_LBL_str"}="cart";
        $strings{"CART_REMOVE_BTN_LBL_str"}="Remove Item";
        $strings{"CART_CHECKOUT_BTN_LBL_str"}="Checkout";
        $strings{"CART_CONTINUE_BTN_LBL_str"}="Shop More";

doc/examples/petmarket/petmarket/api/stringresourcesservice.pm  view on Meta::CPAN

        $strings{"VALIDATE_LAST_NAME_ERROR_MSG_STR"}="Please type in your last name.";
        $strings{"VALIDATE_LAST_NAME_ERROR_TITLE_STR"}="Invalid last name";
        $strings{"VALIDATE_ADDRESS_ERROR_MSG_str"}="Please type in an address.";
        $strings{"VALIDATE_ADDRESS_ERROR_TITLE_str"}="Invalid address";
        $strings{"VALIDATE_CITY_ERROR_MSG_str"}="Please type in a city.";
        $strings{"VALIDATE_CITY_ERROR_TITLE_str"}="Invalid city";
        $strings{"VALIDATE_ZIPCODE_ERROR_MSG_str"}="Please enter a valid 5 digit Zip code.";
        $strings{"VALIDATE_ZIPCODE_ERROR_TITLE_str"}="Invalid Zip code";
        $strings{"VALIDATE_PHONE_ERROR_MSG_str"}="Please enter a valid 10 digit telephone number.";
        $strings{"VALIDATE_PHONE_ERROR_TITLE_str"}="Invalid phone number";
        $strings{"VALIDATE_SELECT_CC_TYPE_ERROR_MSG_str"}="Please select a credit card from the list.";
        $strings{"VALIDATE_SELECT_CC_MO_ERROR_MSG_str"}="Please select a credit card expiry month from the list.";
        $strings{"VALIDATE_SELECT_CC_YR_ERROR_MSG_str"}="Please select a credit card expiry year from the list.";
        $strings{"VALIDATE_CC_EXPIRED_ERROR_MSG_str"}="Please select a credit card expiry date that is not in the past.";
        $strings{"VALIDATE_INVALID_CC_ERROR_MSG_str"}="Invalid credit card number.  Please enter valid credit card number.";
        $strings{"VALIDATE_PAYMENT_ERROR_TITLE_str"}="Payment Method Error";
        $strings{"CREATE_USER_PROGRESS_TITLE_str"}="Creating account";
        $strings{"CREATE_USER_PROGRESS_MSG_str"}="Account creation in progress, please wait.";
        $strings{"LOGIN_USER_PROGRESS_TITLE_str"}="Logging in";
        $strings{"LOGIN_USER_PROGRESS_MSG_str"}="Login in progress, please wait.";
        $strings{"SUBMITTING_ORDER_PROGRESS_TITLE_str"}="Submitting order";
        $strings{"SUBMITTING_USER_PROGRESS_MSG_str"}="Order submission in progress: sending user data.\n\nPlease wait.";
        $strings{"SUBMITTING_ORDER_PROGRESS_MSG_str"}="Order submission in progress: sending order info.\n\nPlease wait.";
        $strings{"CONFIRM_ORDER_TITLE_str"}="Thank You";
        $strings{"CONFIRM_ORDER_MSG_str"}="Thank you for shopping at Pet Market.  If this were a real pet store, your order would be completed.";

doc/examples/petmarket/petmarket/api/userservice.pm  view on Meta::CPAN

            "access" => "remote", 
        },
        "updateUser" => {
            "description" => "Add a user with the given credentials",
            "access" => "remote", 
        },
    };
    
}

my @userFields = ("firstname", "lastname", "homestreet1", "homestreet2", "homecity", "homestate", "homecountry", "homezip", "homephone", "creditcardnumber", "creditcardtype", "creditcardexpiry");

my @shippingFields = ("shippingstreet1", "shippingstreet2", "shippingcity", "shippingcountry", "shippingzip", "shippingphone"); 

my @fields = ("email", "password", @userFields, @shippingFields);

sub authenticate
{
    my ($self, $email, $password) = @_;
    my $ary_ref = $self->dbh->selectall_arrayref("SELECT count(*) FROM user_details where email='$email' AND password='$password'");

doc/index.html  view on Meta::CPAN

<li><a href=examples/basic/basic.html>Service discovery example</a>. It sends data from client to server and back. Now with exception handling!
	<br><br>
<li><a href=examples/sql/park.html>Accessing a Mysql database</a> 
	<br><br>
<li><a href=examples/petmarket/index.html><font color=red>PETMARKET!!!</font></a> 
</ul>
<h2>Applications</h2>
<ul>
<li>AMF::Perl is used for <a href=http://www.dnai.org/geneboy/>Geneboy</a>, a genetics educational tool written in Flash.
<li><a href=http://www.artificially-intelligent.com/lyrics/
>Collaborative music lyrics editor</a> by Dave Waller
<li><a href=http://www.greetme.com>Animated greetings</a> by Jonathan Buhacoff.
</ul>
      <br>
<h2>Administrivia</h2>
<p>Authors:<br>
      <br>
      <a href="mailto:simonf@simonf.com"><span
 style="font-style: italic;">Simon Ilyushchenko</span></a><br
 style="font-style: italic;">
      <a href="mailto:arva@cshl.edu"><span style="font-style: italic;">Adrian



( run in 0.663 second using v1.01-cache-2.11-cpan-de7293f3b23 )