[ic] PayPalExpress Signature and Token?

Thomas J.M. Burton tom at globalfocusdm.com
Tue Apr 28 21:17:15 UTC 2009

Lyn St George wrote:
> On Wednesday 22 April 2009 07:56:14 Stefan Hornburg wrote:
>>> I'm installing the PayPalExpress module for a client of mine. Once I got
>>> everything configured and started testing, I cam across the same issue
>>> that was reported in this thread. I'm wondering if the newer version of
>>> the module is available somewhere other than Lyn's client sites at this
>>> time.
>>> If it's not, I'm wondering if Lyn can provide me with a copy of the
>>> newer version he mentioned in this thread.
>> I committed the last version Lyn sent me to Interchange unstable:
>> http://www.icdevgroup.org/cgi-bin/cvsweb/~checkout~/interchange/lib/Vend/Pa
>> yment/PaypalExpress.pm?rev=1.1;content-type=text%2Fx-perl;only_with_tag=HEAD
>> Regards
>>         Racke
> Or you can try this one (v1.0.3) which includes functions for refunds and mass 
> pay. It also moves the function for fail-safe order logging into a usertag.
> http://kiwi.zolotek.net
> There will also be German giropay in the next version, when I've overcome the 
> sandbox limitations and got it properly tested.
Thank you, Lyn. I appreciate you posting that information. I've been
working with the version Racke posted to the CVS and just about have
things ready for production. There is one thing that I noticed while
configuring this, and wanted to let you know about. Your timing with
this post is perfect.

For the catalog in which I'm using this module, I'm running a
custom-modified version of the [total-cost] tag that works with a gift
certificate system I created a few years ago. I noticed when testing the
PaypalExpress module that if a gift certificate was used in the
purchase, the resulting total was not being passed to PayPal.

In my log_transaction file, I have the following:

    [charge route="paypalexpress" pprequest="dorequest"
amount="[total-cost noformat=1]" order_id="[value mv_transaction_id]"]

which, evidently, is not correctly registering the amount attribute
value when interacting with the PaypalExpress module.

I traced this to line 317 in v1.0.2d of PaypalExpress.pm, which looks like:

    my $amount =  Vend::Interpolate::total_cost() ||
$::Values->{amount}; # required

Accessing total_cost in that manner was bypassing the revised total_cost
tag loaded in the catalog's catalog.cfg file. My workaround was to
change this line to:

    my $amount =  $Tag->total_cost({name => 'main', noformat => 1,}) ||
$::Values->{amount}; # required

though I'm not sure if that was the best way to address the issue or
not. It does work now, and I thought I should bring this to your
attention since for some reason the amount attribute isn't being
utilized in that line and the Vend::Interpolate::total_cost() value is
taking precedence. Perhaps you have already addressed this in the latest

On a related note, I am not able to download the latest version of the
PaypalExpress module at your site. I get a "425 Security: Bad IP
connecting." alert when attempting to download any of the files.

Thanks and best regards,

Global Focus Digital Media, LLC


More information about the interchange-users mailing list