Forums / PayPal Website Payments Pro support / Re: Payflow Gateway Update

Re: Payflow Gateway Update

Locked

Started by need_help on 3 Jun 2009, 8:51 AM · Views: 2,508

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
3 Jun 2009, 8:51 AM
#1
need_help avatar

need_help

Zen Follower

Join Date:
Feb 2009
Posts:
205
Plugin Contributions:
0

Re: Payflow Gateway Update

I decided to make the changes to the two files today.

It says Edit your /includes/modules/payment/paypalwpp.php file and make the following changes at lines 1040-1041.
Edit your /includes/modules/payment/paypaldp.php file and make the following changes at lines 886-887.

I'm using CuteFTP Pro and i don't see the lines it asks me to change at 1040-1041 and 886-887.

At those lines i have for paypalwpp.php // if State is not supplied, repeat the city so that it's not blank, otherwise PayPal croaks

  if ((!isset($options['SHIPTOSTATE']) || trim($options['SHIPTOSTATE']) == '') && $options['SHIPTOCITY'] != '') $options['SHIPTOSTATE'] = $options['SHIPTOCITY'];

and for paypaldp.php

case -2:

    case -3:

I'm confused as to where the exact changes take place.

Would it not be easier to just let us download a complete file to upload to our server instead of asking us to mess around with code which we may make mistakes with ?

3 Jun 2009, 6:12 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Re: Payflow Gateway Update

The posted instructions note different line numbers for different versions of Zen Cart.
http://www.zen-cart.com/forum/showthread.php?t=123576

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Jun 2009, 6:35 PM
#3
need_help avatar

need_help

Zen Follower

Join Date:
Feb 2009
Posts:
205
Plugin Contributions:
0

Re: Re: Payflow Gateway Update

DrByte:

The posted instructions note different line numbers for different versions of Zen Cart.

Only just checked in to this thread after the last post i made.

What lines do i need to make the edits at on the two files if i'm using the latest current edition of Zen Cart ?

A rough estimate is all i need as there is a lot of code in there and i don't want to make a mistake.

16 Jun 2009, 8:32 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Re: Payflow Gateway Update

The posted instructions tell you the line numbers for the various versions.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Jun 2009, 12:44 PM
#5
need_help avatar

need_help

Zen Follower

Join Date:
Feb 2009
Posts:
205
Plugin Contributions:
0

Re: Re: Payflow Gateway Update

DrByte:

Details posted here: http://www.zen-cart.com/forum/showthread.php?t=123576

I have read the posted instructions and i am lost as to which part of the files they are found at.

Trust me in that i wouldn't be posting to ask you unless i was having difficulty locating the specific part of the file. Thats why i enquired about which line is it located on when using CuteFTP as your FTP.

Can you supply the two files with the line changes made in them so i don't need to edit. If not i assume this 1.39 version of Zencart being released will have the two files i require.

When is 1.39 being released ?

22 Jun 2009, 3:50 PM
#6
need_help avatar

need_help

Zen Follower

Join Date:
Feb 2009
Posts:
205
Plugin Contributions:
0

Re: Re: Payflow Gateway Update

DrByte:

The posted instructions tell you the line numbers for the various versions.

Hey DrByte i'm still really needing help on changing the two files.

Can i ask that you supply the two files as a download for people who do not want to alter code.

Thats just a thought but like i said in my last post i have read the instructions several times over and i cannot locate the code to change so i need additional help.

27 Jun 2009, 11:25 AM
#7
need_help avatar

need_help

Zen Follower

Join Date:
Feb 2009
Posts:
205
Plugin Contributions:
0

Re: Re: Payflow Gateway Update

Gee guys i'm not asking for much here. Just a little help please ?

27 Jun 2009, 12:47 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Re: Payflow Gateway Update

need_help:

What lines do i need to make the edits at on the two files if i'm using the latest current edition of Zen Cart ?

A rough estimate is all i need as there is a lot of code in there and i don't want to make a mistake.
Are you for real? The exact line numbers are already supplied in the original instructions. And, the code to be changed is supplied along with the new values, which thus gives you additional information on finding the part to edit if your line numbers happen to be different.

So, since the "latest" version of Zen Cart as of this writing is v1.3.8, that means that the following part of my original post on the topic is the section that applies, which I've copy-and-pasted here again for your convenience:> DrByte:

To upgrade your site, the following changes are required:

Zen Cart v1.3.8:
Edit your /includes/modules/payment/paypalwpp.php file and make the following changes at lines 1040-1041.
Edit your /includes/modules/payment/paypaldp.php file and make the following changes at lines 886-887.

Basically just changing the 2 references of "verisign.com/transaction" to "paypal.com":

  $doPayPal->_endpoints = array('live'    => 'https://payflowpro.[B]verisign.com/transaction[/B]',
                                'sandbox' => 'https://pilot-payflowpro.[B]verisign.com/transaction[/B]');

becomes
$doPayPal->_endpoints = array('live' => 'https://payflowpro.[B]paypal.com[/B]',
'sandbox' => 'https://pilot-payflowpro.[B]paypal.com[/B]');

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 Jun 2009, 12:10 AM
#9
need_help avatar

need_help

Zen Follower

Join Date:
Feb 2009
Posts:
205
Plugin Contributions:
0

Re: Re: Payflow Gateway Update

DrByte:

Are you for real? The exact line numbers are already supplied in the original instructions. And, the code to be changed is supplied along with the new values, which thus gives you additional information on finding the part to edit if your line numbers happen to be different.

So, since the "latest" version of Zen Cart as of this writing is v1.3.8, that means that the following part of my original post on the topic is the section that applies, which I've copy-and-pasted here again for your convenience:Everything you need is already there.

Which part of my post didn't you understand and why do you feel the need to insult with the "are you for real" comment.

We are not all programmers and html experts here and some of us are learning every single day.

You post what to do and tell us which part of the code but you fail to take into account there is a large amount of lines of html in those files and i could not locate the lines as you described.

Maybe my eyesight is failing but hell i thought this was the help forums and you seem to be having a right moan at me just because i'm having difficulty locating the lines. As i already explained they just don't match up when using CuteFTP.

Instead of making me feel part of a community you make me feel non existent and really you should take into account the fact we are not all html experts here and we will need a helping hand that sometimes goes the extra mile.

So hey i already asked why you haven't just supplied the changed files as a download but instead you ignore me and decide to ignore my posts for days and instead label me an idiot and basically don't help other than to say look we already told you how.

Well if you already told me exactly how i wouldn't be saying i have difficulty and asking for your help.

Sorry that asking for help these days seems too much trouble for you and i guess i won't bother asking again.

It seems the bigger some organizations get the less human they treat you.

Have a great day.

28 Jun 2009, 12:42 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Re: Payflow Gateway Update

Sorry.
What happened when you reduced the instructions to just this part: ?

DrByte:

Basically just changing the 2 references of "verisign.com/transaction" to "paypal.com"

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 Jun 2009, 2:37 PM
#11
need_help avatar

need_help

Zen Follower

Join Date:
Feb 2009
Posts:
205
Plugin Contributions:
0

Re: Re: Payflow Gateway Update

DrByte:

Sorry.
What happened when you reduced the instructions to just this part: ?

If i could locate the line you mention i would change it. It's just a long file and usually i have no trouble editing files but i cannot locate where the code is to change.

Perhaps it's easier if i used a program which will give me the exact line you mention.

Do you recommend a free FTP program that can locate the lines as mentioned in your posts ?

28 Jun 2009, 4:07 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Re: Payflow Gateway Update

A couple popular free editors ideal for working with PHP files include Notepad++ and Crimson Editor. Both show line numbers, offer good search capability, and even do syntax highlighting which helps make the code easier to read and even spot syntax errors when making changes.

Notepad++ can be set to be the default editor for .php files, and thus your FTP program might let you use it as the editor instead of its built-in editor (which sounds like is pretty weak).

Worst case, you may find that you'll have to download the file to your PC, then open the file with your editor, make changes, and then upload the file back to the server.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Jul 2009, 7:42 AM
#13
need_help avatar

need_help

Zen Follower

Join Date:
Feb 2009
Posts:
205
Plugin Contributions:
0

Re: Re: Payflow Gateway Update

As per DrBytes instructions i used Notepad II and pasted the information from the PayPalwpp file into it.

I then did a search for the information using Notepad II's search facility and located it on line 2079.

So i thought i would share this with people and if you are using CuteFTP or certain other FTP programs to edit your files directly on the server then the information to edit may in some circumstances be located at line 2079.

For the PayPaldpp file the code was found on line 1771 using Cute FTP.

13 Jul 2009, 7:52 AM
#14
need_help avatar

need_help

Zen Follower

Join Date:
Feb 2009
Posts:
205
Plugin Contributions:
0

Re: Re: Payflow Gateway Update

I must be using a modified PayPal file perhaps because i am using a module add on which overwrote the original files because i note on another zencart install i did that the file lines to edit are indeed exactly where DrByte mentions they should be on the instructions.

So ignore my advice above and i'm scratching my head as to why my PayPal files are modified.

13 Jul 2009, 7:54 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Re: Payflow Gateway Update

Perhaps fire up WinMerge?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Jul 2009, 8:04 AM
#16
need_help avatar

need_help

Zen Follower

Join Date:
Feb 2009
Posts:
205
Plugin Contributions:
0

Re: Re: Payflow Gateway Update

DrByte:

Perhaps fire up WinMerge?

I just had a quick look while changing the file in the new install for another site.

It seems there is a lot of line break spaces in the file which has the changes at line 2079 and line 1771 on my original site. The spaces come cleanly though and don't mess with any code.

Nothing has been altered just a lot of spaces between code.

Everything works though. Should i just upload a new file to cut out those spaces or leave it as it is ?

I have no idea how it got that way as i have not touched those files as far as i recall.

13 Jul 2009, 8:26 AM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Re: Payflow Gateway Update

Sometimes FTP programs will change the line-endings of files, resulting in double-spacing of everything. Sometimes this happens by using cheap editors built-in to some FTP programs. (That's not meant to be a slight at you, just a observation of fact from personal experience and numerous similar reports on the forum.)

If you're certain that the file is otherwise unchanged, uploading a fresh properly-formatted version of the file should be harmless, and will make life easier later if edits are required.

In the case of your PayPal file, if you do upload a replacement make sure you remember to make the appropriate edit to the file ... after all, that's why we're having this discussion in the first place, right? :)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.