[ic] PayPalExpress Signature and Token?

Lyn St George lyn at zolotek.net
Tue Apr 28 21:46:31 UTC 2009

On Tuesday 28 April 2009 22:17:15 Thomas J.M. Burton wrote:
> 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

Good catch - odd that no-one has noticed this before. The better fix is :

my $amount = charge_param('amount') || Vend::Interpolate::total_cost() || 

(without linewrap) as it then defaults to the amount value inside the 
[charge ..] tag. Then it won't matter if you have the 
default "amount=[scratch tmp_remaining]" or your custom version, as either 
will be passed through. Just for the record, the 'values amount' is meant for 
a custom invoice/payment page where 'total_cost' is not used.

This is now in the downloadable one. My logs don't show any reason why you're 
unable to download it - perhaps you could try a different client?

Lyn St George

More information about the interchange-users mailing list