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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

paypal express confirm - store transaction ID

Thread began 9/29/2009 9:23 am by mail13206 | Last modified 10/02/2009 4:23 pm by Eric Mittman | 6325 views | 5 replies |

mail13206

paypal express confirm - store transaction ID

I've got my site working and processing transactions using ecart 4 (ASP VB - yeee haaa).

One thing I'm having problems with is getting the paypal express Transaction ID and storing it in my database so our accounting people can reconcile the web transaction with the paypal account.

I have set up a session variable as follows which I'm not entirely sure is correct - I've set up the 'Store Summary in db' behavior to get a value from session("PP_Express_TransactionID") and save it in the summary table already but nothing is saving and i'm guessing that i've not requested the pp transactionid properly.

<%
'Transaction ID from PayPal

if ("" = "") then
Session("PP_Express_TransactionID") = "" & cStr(WA_PP_ECO_GetValue(WA_PP_ECO_GetResult, "TransactionID", false)) & ""
end if
%>

Any pointers absolutely appreciated - this is the final bug I need to fix before the job is totally signed off.

thanks

Sign in to reply to this post

Eric Mittman

The code that you are using to get the transaction id looks correct to me. I can see that in the PP_ECO_VB.asp page near line 460 is where it identifies this variable:

elseif (testVal = "TRANSACTIONID") then
tValue = "PNREF"



So what you have should do the trick. If you can check the PP_ECO_VB.asp page in the eCart folder to see if you have this line of code in there. If it is not there then you may need to update your eCart. I created my example with the latest 4.5.1 release that is available on the site. Please check this and let us know what you find, if further debugging is needed I can open a ticket for you.

Sign in to reply to this post

mail13206

Thanks Eric.

I'm using ecart 4.5.0

I checked the PP_ECO_VB.asp file and that code does exist at line 460.

On one hand I'm glad I'm on the right track, but then frustrated that it doesn't work. I've tried writing out the pp express transaction id session variable to the page and I don't get anything displayed so it's either not coming back from paypal or i'm not using the correct code to retrieve it.

On a side note, our pp direct payments are functioning perfectly with all fields returning and storing in the summary table.

Sign in to reply to this post

Eric Mittman

Ok, thanks for checking on that for me. I have been investigating this a bit further and it seems that you are on the right track but the setting of the session variable has just not been implemented correctly.

The transaction id is returned by PayPal and our code is parsing for it. The way that you reference it however must be changed. Since it only comes after the Express Checkout Do Result it will need to be referenced like this:

WA_PP_ECO_GetValue(WA_PP_ECO_DoResult, "TransactionID", false)



The other issue is where you are trying to capture it, since it only is available after the Do Result the code at the top of the page will not have access to it. You must add this in somewhere after this:

set WA_PP_ECO_DoResult = WA_PP_ECO_Do_Post(WA_PP_ECO_Do_required,WA_PP_ECO_Do_itemized,WA_PP_ECO_Do_optional)



If you use this reference and make sure it is set after the Do Result code then it should capture the transaction id and allow you to store it in a session variable. You can then use that session variable in your Store Order Summary. You should also be able to reference the value directly in the server behaviors with the correct reference.

Please give this a try and let us know if there are any problems.

Sign in to reply to this post

mail13206

Indeed that did work and I'm now capturing a PP express id of some sort and storing it successfully. BUT - (and this should be easy!) i'm getting back a different number than the transaction id that is shown in the paypal email.

It looks like I may be getting 'pnref' rather than 'transactionid'. I'm not sure and it seems a little confusing.

The value I'd like to get is the one that is shown in the pp email and in the pp account that is badged up as 'Unique Transaction ID' and is 17 characters (rather than the 12 character one I'm currently receiving).

Hopefully you'll know what I'm talking about. :)

Sign in to reply to this post

Eric Mittman

This PNREF variable is the transaction id that PayPal passes back. I do know what you mean though about the other transaction id that you see in the email. I have looked into this issue recently and found that this is just the internal PayPal transaction id and is not a value that is passed back to you. It is just present on any email receipts that they send so that there is a reference for the transaction in there system.

It may be possible that things have changed in the last few weeks but this was how I remembered it working when I last looked into this. There should be more details about this in the PayPal developer forums.

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...