close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PP Express Checkout need to return FEEAMT variable

Thread began 8/03/2010 2:55 pm by Dave Buchholz | Last modified 8/05/2010 11:23 am by Dave Buchholz | 1211 views | 7 replies |

Dave BuchholzBeta Tester

PP Express Checkout need to return FEEAMT variable

I need to return the FEEAMT as display in the FULL RESPONSE like so

RESULT=0&PNREF=EUJP5D317BEF&RESPMSG=Approved&AVSADDR=Y&AVSZIP=Y&TOKEN=EC-56J8431826888421H&PAYERID=CTY5D5PM9UPQN&PPREF=3JY551007S2876314&CORRELATIONID=247541067846&FEEAMT=0.51&TAXAMT=1.93&PAYMENTTYPE=instant&PENDINGREASON=completed

as an individual amount so I can log it in the database. How can I achieve this please as for the life of me I cannot get it to return.

Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

use the explode function on the & character to create an array of each response, the explode on the = character to get the value:

example:

php:
<?php

$response 
"RESULT=0&PNREF=EUJP5D317BEF&RESPMSG=Approved&AVSAD DR=Y&AVSZIP=Y&TOKEN=EC-56J8431826888421H&PAYERID=CTY5D5PM9UPQN&PPREF=3JY5 51007S2876314&CORRELATIONID=247541067846&FEEAMT=0. 51&TAXAMT=1.93&PAYMENTTYPE=instant&PENDINGREASON=completed";
$tFee 0;
$responses explode("&"$response);
for (
$n=0$n<sizeof($responses); $n++) {
    
$tResponse explode("="$responses[$n]);
    if (
$tResponse[0] == "FEEAMT") {
        
$tFee $tResponse[1];
        break;
    }
}

echo 
$tFee;
?>
Sign in to reply to this post

Dave BuchholzBeta Tester

you know sometimes I think I should beat myself over the head for being so dense, of course that's the way to do it

been staring at the wood and can't see the trees

thanks as ever Jason

Sign in to reply to this post

Eric Mittman

This value should be returned by the Express Checkout. Have you used the binding for this value in your code? If so what result do you get with it?

When I add this binding to the page it looks like this:

php:
<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_DoResult"FeeAmount"); ?>
Sign in to reply to this post

Dave BuchholzBeta Tester

Where is this binding available from ?

This is what I can see

Sign in to reply to this post

Dave BuchholzBeta Tester

I see now that the binding you are referring to is available on the pp_confirm.php page but is not available on the pp_checkout_success.php page

it would appear that the sb that provides this binding is the post to paypal ?

Sign in to reply to this post

Eric Mittman

Yes, exactly. The PayPal server behaviors that are on the confirm and pp_confirm pages set the bindings on those pages for the response values. I usually just drag them onto the confirm page and then cut and paste them onto the success or failure page if they are needed there.

Sign in to reply to this post

Dave BuchholzBeta Tester

OK I see your methodology now, thanks

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...