Skip to content

Commit

Permalink
Merge branch 'master' of ssh://git.icdevgroup.org/var/git/interchange
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Heins committed Mar 15, 2014
2 parents 415be04 + 01b3df9 commit af0fbd5
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 23 deletions.
4 changes: 2 additions & 2 deletions MANIFEST
Expand Up @@ -75,6 +75,7 @@ code/Filter/strftime.filter
code/Filter/strikeout.filter
code/Filter/strip.filter
code/Filter/strip_html.filter
code/Filter/strip_path.filter
code/Filter/tabbed.filter
code/Filter/text2html.filter
code/Filter/textarea_get.filter
Expand Down Expand Up @@ -1060,6 +1061,7 @@ eg/jedit/catalog
eg/jedit/interchange.xml
eg/jedit/README
eg/merge-tab-files
eg/migrate-sessions-to-dbi
eg/news_feature/dbconf/default_db/news.dbm
eg/news_feature/dbconf/mysql/news.mysql
eg/news_feature/dbconf/oracle/news.ora
Expand Down Expand Up @@ -1205,8 +1207,6 @@ LICENSE
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
MYMETA.json
MYMETA.yml
README
README-DEVELOPMENT
README.debian
Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Expand Up @@ -154,7 +154,7 @@ sub copyright_prompt {
Interchange V$VERSION
Copyright (C) 2002-2013 Interchange Development Group.
Copyright (C) 2002-2014 Interchange Development Group.
Copyright (C) 1996-2002 Red Hat, Inc.
Interchange is free under the terms of the GNU General Public License.
Expand Down
2 changes: 1 addition & 1 deletion README
Expand Up @@ -4,7 +4,7 @@

Interchange 5.8.1

Copyright (C) 2002-2013 Interchange Development Group
Copyright (C) 2002-2014 Interchange Development Group
Copyright (C) 1996-2002 Red Hat, Inc.

Originally based on Vend 0.2 and 0.3, copyright 1995-96 by Andrew M. Wilcox.
Expand Down
51 changes: 50 additions & 1 deletion WHATSNEW-5.7
Expand Up @@ -8,7 +8,56 @@
------------------------------------------------------------------------------


Interchange 5.8.1 not yet released.
Interchange 5.8.1 released on 2014-03-12.

Core
----

* Improved Unicode support in core: improvements to [area] tag, email.tag

* Fixed a bug in session cookie parsing which could result in lost sessions.

* Add strip_path filter.

* Improvements in UserTag Alias handling of embedded hyphens

* Added new full-page caching features

* Fixed one-off [item-increment] bug when passing fm (jump) parameter to a search.

* [weight] UserTag now supports "adder" options.

* Re-connect session variables when doing an su.

* Fix XSS in error tag display of failed submissions


Payments
--------

* Fixes for a change in behavior with Authorize.net's handling of AUTH and CAPTURE transaction types.

* Fixes to PayPal alternate address handling.

* Allow Union Pay cards to skip luhn-10

* Update Cardsave payment module to 0.9.8.


Standard Demo
-------------

* Updated checkout to recognise Internet Explorer 10

* Optimized lookup of order items for ship notice.


External Tools
--------------

* Added script to migrate sessions from Storable to DBI.

* Use su directive in Debian's logrotate file to avoid skipping due to permissions issues.


------------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion code/UserTag/email.tag
Expand Up @@ -147,7 +147,7 @@ sub {
$msg->attach(
Type => $opt->{body_mime},
Encoding => $opt->{body_encoding},
Data => $body,
Data => ($utf8 ? utf8_to_other($body, 'utf-8') : $body),
Disposition => $opt->{body_disposition} || 'inline',
Format => $opt->{body_format} || $att1_format,
);
Expand Down Expand Up @@ -189,6 +189,7 @@ sub {
my %encoding_types = (
'text/plain' => ($utf8 ? 'quoted-printable' : '8bit'),
'text/html' => 'quoted-printable',
'text/html; charset=UTF-8' => 'quoted-printable',
);

for my $ref (@$att) {
Expand Down
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -4,7 +4,7 @@ cat <<EOF
Interchange
Copyright 2002-2013 Interchange Development Group (http://www.icdevgroup.org/)
Copyright 2002-2014 Interchange Development Group (http://www.icdevgroup.org/)
Copyright 1996-2002 Red Hat, Inc.
Interchange was originally based on Vend 0.2 and 0.3
Expand Down
2 changes: 1 addition & 1 deletion dist/standard/variables/COPYRIGHT
Expand Up @@ -2,6 +2,6 @@
[if variable MV_DEMO_MODE]
<p>[page admin/index][L]Admin[/L]</a></p>
[/if]
<p style="font-size: 10px; color: #000000">Portions copyright 2002-2013 Interchange Development Group, freely redistributable under GPL</p>
<p style="font-size: 10px; color: #000000">Portions copyright 2002-2014 Interchange Development Group, freely redistributable under GPL</p>
</div>

10 changes: 10 additions & 0 deletions lib/Vend/Order.pm
Expand Up @@ -22,6 +22,7 @@
# MA 02110-1301 USA.

package Vend::Order;
use Vend::Error;
require Exporter;

$VERSION = '2.110';
Expand Down Expand Up @@ -2063,6 +2064,15 @@ my @Scan_modifiers = qw/
sub update_quantity {
return 1 unless defined $CGI::values{"quantity0"}
|| $CGI::values{mv_quantity_update};

if ( my $n = $CGI::values{mv_nlines} ) {
my $check = scalar(@$Vend::Items);
if ( $n != $check ) {
Vend::Error::interaction_error();
return undef;
}
}

my ($h, $i, $quantity, $modifier, $cart, $cartname, %altered_items, %old_items);

if ($CGI::values{mv_cartname}) {
Expand Down
30 changes: 20 additions & 10 deletions lib/Vend/Payment/PayflowPro.pm
Expand Up @@ -615,25 +615,32 @@ sub payflowpro {
if($tender eq 'P') {
@query{keys %paypal_query} = values %paypal_query;
my $i = 0;
for my $it (@{$::Carts->{main}}) {
$query{'L_PAYMENTREQUEST_0_NAME' .$i} = $it->{description} || Vend::Data::item_description($it);
$query{'L_PAYMENTREQUEST_0_NUMBER' .$i} = $it->{code};
$query{'L_PAYMENTREQUEST_0_DESC' .$i} = Vend::Data::item_description($it);
$query{'L_PAYMENTREQUEST_0_AMT' .$i} = Vend::Data::item_price($it);
$query{'L_PAYMENTREQUEST_0_QTY' .$i} = $it->{quantity};
##$query{'L_PAYMENTREQUEST_0_TAXAMT'.$i} = (Vend::Data::item_price($it)/$itemTotal * $taxTotal);
$i++;
if ($action ne 'D') {
for my $it ( @{ $::Carts->{main} } ) {
my $it_price = Vend::Data::item_price($it);
my $disc_price = Vend::Interpolate::discount_price( $it, $it_price, $it->{quantity} );
#::logDebug("payflowpro: prices for $it->{code}: it_price=$it_price, disc_price=$disc_price");
$query{ 'L_PAYMENTREQUEST_0_NAME' . $i } = $it->{description} || Vend::Data::item_description($it);
$query{ 'L_PAYMENTREQUEST_0_NUMBER' . $i } = $it->{code};
$query{ 'L_PAYMENTREQUEST_0_DESC' . $i } = Vend::Data::item_description($it);
$query{ 'L_PAYMENTREQUEST_0_AMT' . $i } = $disc_price;
$query{ 'L_PAYMENTREQUEST_0_QTY' . $i } = $it->{quantity};
##$query{'L_PAYMENTREQUEST_0_TAXAMT' .$i} = ($disc_price/$itemTotal * $taxTotal);
$i++;
}
}
$opt->{check_sub} = undef;
}
else {
my $i = 1;
for my $it (@{$::Carts->{main}}) {
my $it_price = Vend::Data::item_price($it);
my $disc_price = Vend::Interpolate::discount_price($it, $it_price, $it->{quantity});
$query{'L_NAME' . $i} = $it->{description} || Vend::Data::item_description($it);
$query{'L_COST' . $i} = Vend::Data::item_price($it);
$query{'L_COST' . $i} = $disc_price;
$query{'L_QTY' . $i} = $it->{quantity};
$query{'L_SKU' . $i} = $it->{code};
##$query{'L_TAXAMT'.$i} = (Vend::Data::item_price($it)/$itemTotal * $taxTotal);
##$query{'L_TAXAMT'.$i} = ($disc_price/$itemTotal * $taxTotal);
$i++;
}
}
Expand All @@ -655,6 +662,9 @@ sub payflowpro {
}
}
else {
if ( $Vend::Session->{admin} and $::Values->{order_desk_entry} ) {
delete $query{CUSTIP}; # prevent 'IP/Address Mismatch' fraud reports for UI orders
}
## these not for PayPal authorizations, only capture/void (and credit cards):
$query{ORIGID} = $order_id;
$query{EXPDATE} = $exp;
Expand Down
13 changes: 11 additions & 2 deletions lib/Vend/Payment/PaypalExpress.pm
Expand Up @@ -955,7 +955,7 @@ return $Tag->deliver({ location => $redirecturl });
# populate the billing address rather than shipping address when the basket is being shipped to
# another address, eg it is a wish list.
if (($result{'Ack'} eq "Success") and ($::Values->{'pp_use_billing_address'} == 1)) {
$::Values->{'b_phone_day'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'ContactPhone'};
$::Values->{'b_phone_day'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'ContactPhone'} || $::Values->{b_phone} || $::Values->{phone_day} || $::Values->{phone_night};
$::Values->{'email'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'Payer'};
$::Values->{'payerid'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'PayerID'};
$::Values->{'payerstatus'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'PayerStatus'};
Expand All @@ -966,7 +966,7 @@ return $Tag->deliver({ location => $redirecturl });
$::Values->{'b_lname'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'PayerName'}{'LastName'};
$::Values->{'suffix'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'PayerName'}{'Suffix'};
$::Values->{'address_status'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'Address'}{'AddressStatus'};
$::Values->{'b_name'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'PayerName'}{'PayerName'};
$::Values->{'b_name'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'Address'}{'Name'};
$::Values->{'b_address1'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'Address'}{'Street1'};
$::Values->{'b_address2'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'Address'}{'Street2'};
$::Values->{'b_city'} = $result{'GetExpressCheckoutDetailsResponseDetails'}{'PayerInfo'}{'Address'}{'CityName'};
Expand Down Expand Up @@ -1009,10 +1009,19 @@ return $Tag->deliver({ location => $redirecturl });
# If shipping address and name are chosen at Paypal to be different to the billing address/name, then {name} contains
# the shipping name but {fname} and {lname} still contain the billing names.
### In this case the returned 'name' may be a company name as it turns out, so what should we do?
if ($::Values->{pp_use_billing_address}) {
if (($::Values->{'b_fname'} !~ /$::Values->{'b_name'}/) and ($::Values->{'b_name'} =~ /\s/)) {
$::Values->{'b_name'} =~ /(\S*)\s+(.*)/;
$::Values->{'b_fname'} = $1;
$::Values->{'b_lname'} = $2;
}
}
else {
if (($::Values->{'fname'} !~ /$::Values->{'name'}/) and ($::Values->{'name'} =~ /\s/)) {
$::Values->{'name'} =~ /(\S*)\s+(.*)/;
$::Values->{'fname'} = $1;
$::Values->{'lname'} = $2;
}
}

$::Session->{'errors'}{'PaypalExpress'} = $result{'Errors'}{'LongMessage'} if ($result{'Errors'} !~ /ARRAY/);
Expand Down
6 changes: 6 additions & 0 deletions lib/Vend/Util.pm
Expand Up @@ -189,6 +189,12 @@ sub escape_chars_url {
my($c, $r);

$r = '';
if ($::Variable->{MV_UTF8} || $Global::Variable->{MV_UTF8}) {
# check if it's decoded
if (is_utf8($in)) {
$in = encode_utf8($in);
}
}
foreach $c (split(m{}, $in)) {
$r .= $ESCAPE_CHARS::translate_url[ord($c)];
}
Expand Down
6 changes: 3 additions & 3 deletions scripts/interchange.PL
Expand Up @@ -3,7 +3,7 @@
#
# Interchange version 5.8.1
#
# Copyright (C) 2002-2013 Interchange Development Group
# Copyright (C) 2002-2014 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
# http://www.icdevgroup.org/
#
Expand Down Expand Up @@ -347,7 +347,7 @@ sub dontwarn {
}

sub version {
print "Interchange version $VERSION copyright 2002-2013 Interchange Development Group and others.\n";
print "Interchange version $VERSION copyright 2002-2014 Interchange Development Group and others.\n";
}

=head1 NAME
Expand Down Expand Up @@ -986,7 +986,7 @@ GNU General Public License.
=head1 COPYRIGHT
Copyright (C) 2002-2013 Interchange Development Group
Copyright (C) 2002-2014 Interchange Development Group
Copyright (C) 1995-2002 Red Hat, Inc.
All rights reserved except those granted in the license.
Expand Down

0 comments on commit af0fbd5

Please sign in to comment.