Business::PayPal::EWP - Perl extension for PayPal's Encrypted Website Payments
use Business::PayPal::EWP qw(SignAndEncrypt); ... my $form="cert_id=123ABC,cmd=_xclick,business=..."; my $cert="/path/to/mycert.crt"; my $key="/path/to/mycert.key"; my $ppcert="/path/to/paypalcert.pem"; my $encrypted=SignAndEncrypt($form,$key,$cert,$ppcert); print <<EOF; <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick" /> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" /><input type="hidden" name="encrypted" value="$encrypted" /></form> EOF
This module wraps the sample C++/C# code which PayPal provides for working with Encrypted Web Payments. It contains a single function, SignAndEncrypt which takes the plaintext form code, private key file, public key file, and PayPal's public certificate, and will return the signed and encrypted code needed by paypal.
Copyright (c) 2004, 2005 Issac Goldstand <firstname.lastname@example.org> - All rights reserved.
This library includes code copied from Net::SSLeay and PayPal's sample code. More information about those projects' authors can be found at the respective project websites.
This library is free software. It can be redistributed and/or modified under the same terms as Perl itself.