Community Forums

Paypal Standard Improved Ongoing (v1.4.9.4+)

News, updates and important issues relating to OpenCart.

Re: Paypal Standard Improved Ongoing (v1.4.9.3+)

Postby maperdel » Fri Mar 25, 2011 11:00 pm

Hi Guys,

I'm having i little problem using paypal standard in sandbox mode. I have the following confguration:

1.-Using OpenCart 1.4.9.4
2.-Testing on localhost (Windows XP Machine + WAMP with PHP 5.2.11)
3.-Testing payments with paypal standard in sandbox mode.
4.-Have checked my test account configuration to match all the options recommended in the Paypal Configuration Documentation guide.

If I pay the order with a credit card via paypal in the login page (not logging into paypal) and complete the process, I get an order with a "missing order" status in the Sales->Orders section .
Is this normal in the sandbox mode? Has anyone had any problems with these type of payments? (I know that paypal is a pain in the arse!)

Thanks!
maperdel
 
Posts: 29
Joined: Fri Mar 25, 2011 10:38 pm

Re: Paypal Standard Improved Ongoing (v1.4.9.3+)

Postby Qphoria » Fri Mar 25, 2011 11:22 pm

maperdel wrote:2.-Testing on localhost (Windows XP Machine + WAMP with PHP 5.2.11)


You can stop right there. IPN doesn't work with localhost. You cannot test live payments on a localhost
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18200
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Paypal Standard Improved Ongoing (v1.4.9.3+)

Postby maperdel » Fri Mar 25, 2011 11:42 pm

Thanks Qphoria. I guess that's why I'm getting "Pending" status in orders I pay with a paypal account.

I'm sorry. I tested Magento a few months ago and I got a little confused with the status. I think Magento kept the status on "Processing" for this kind of tests.

By the way, congratulations on the software, it's simple, it's fast and light. Great job and great support.
maperdel
 
Posts: 29
Joined: Fri Mar 25, 2011 10:38 pm

Re: Paypal Standard Improved Ongoing (v1.4.9.3+)

Postby ritey » Tue Mar 29, 2011 9:21 pm

Q, should this line in the controller pp_standard (L-191):
Code: Select all
$this->data['fields']['zip'] = html_entity_decode($this->order_info['payment_postcode'], ENT_QUOTES, 'UTF-8');

actually be:
Code: Select all
$this->data['fields']['zip'] = html_entity_decode($this->order_info['shipping_postcode'], ENT_QUOTES, 'UTF-8');

:)
User avatar
ritey
 
Posts: 118
Joined: Thu Jan 21, 2010 8:28 pm
Location: Richmond

Re: Paypal Standard Improved Ongoing (v1.4.9.3+)

Postby Qphoria » Tue Mar 29, 2011 11:52 pm

ritey wrote:Q, should this line in the controller pp_standard (L-191):
Code: Select all
$this->data['fields']['zip'] = html_entity_decode($this->order_info['payment_postcode'], ENT_QUOTES, 'UTF-8');

actually be:
Code: Select all
$this->data['fields']['zip'] = html_entity_decode($this->order_info['shipping_postcode'], ENT_QUOTES, 'UTF-8');

:)


Good eye.. You are correct. And the line below it should be shipping_iso_code_2 instead of payment

Thanks ;)
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18200
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Paypal Standard Improved Ongoing (v1.4.9.3+)

Postby ritey » Wed Mar 30, 2011 12:03 am

I'm doing similar things to pp_pro.php, I might send it over once it's fully tested. Do you know what the reason was behind a UK version?
User avatar
ritey
 
Posts: 118
Joined: Thu Jan 21, 2010 8:28 pm
Location: Richmond

Re: Paypal Standard Improved Ongoing (v1.4.9.3+)

Postby Qphoria » Wed Mar 30, 2011 8:19 pm

It is now

UPDATED file in first post with fix for address zip and country code shown 2 posts up
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18200
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby Thomas » Fri Apr 01, 2011 9:19 am

Hey Qphoria,

I am currently having an issue with Paypal Standard. What happens is my orders will show up in Paypal but will remain with an order_status_id of 0. I have added a PDT Token because i was getting the same issue before i used the token. However, now im getting the same issue again? Would you have any idea why this is occuring?

Edit: Hey guys, just wanted to fill you all in, make sure you read the first post its got lots of good tid bits of information. Setting up IPN was the issue.

Thanks,
Thomas
Thomas
 
Posts: 16
Joined: Sat Nov 13, 2010 8:27 am

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby funkyou86 » Tue Apr 12, 2011 8:02 pm

Cheers, i tried to make a test order, and paypal wrote me this:

This invoice has already been paid. For more information, please contact the merchant.


How can that be? Any guess?

Iam using 1.4.9.3.
funkyou86
 
Posts: 9
Joined: Tue Mar 01, 2011 3:02 pm

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby Xsecrets » Tue Apr 12, 2011 8:39 pm

funkyou86 wrote:Cheers, i tried to make a test order, and paypal wrote me this:

This invoice has already been paid. For more information, please contact the merchant.


How can that be? Any guess?

Iam using 1.4.9.3.

Paypal by default is set to not accept payment on duplicate order id's so if you have a live store that you started at id #1 on and now you setup a test store it starts at order id #1 and paypal see's it as a duplicate. If you are just trying to test from a test server I would temporarily turn off the setting to block duplicate ids, if you are planning on moving to that new server live I would change it to start the order_id's to something higher than your highest order id on your current system.
Xsecrets
 
Posts: 5042
Joined: Sat Oct 24, 2009 7:51 pm
Location: FL US

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby funkyou86 » Tue Apr 12, 2011 8:46 pm

Thanks for your reply! I'll try it in a second :joker:
funkyou86
 
Posts: 9
Joined: Tue Mar 01, 2011 3:02 pm

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby Troy » Fri Apr 15, 2011 2:54 pm

Read the Paypal Configuration Documentation for info on how to setup your Paypal Account the preferred way.


I am using 1.4.9 and I followed the above and my orders are now showing at the "Admin Side", emails are sent to customers and payment received by paypal. Thanks :)
Troy
 
Posts: 1
Joined: Tue Apr 05, 2011 8:35 am

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby eka7a » Fri Apr 15, 2011 4:36 pm

Add Turkish Lira Support

catalog\controller\payment\pp_standart.php

FIND
Code: Select all
'THB');


REPLACE
Code: Select all
'THB','TRY');


@Qphoria Please you can add by default module?
User avatar
eka7a
 
Posts: 176
Joined: Sat Apr 11, 2009 4:59 pm
Location: Türkiye

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby Qphoria » Fri Apr 15, 2011 5:49 pm

Done.
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18200
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby clinton4 » Wed May 18, 2011 5:13 pm

Hi,

Is this patch included in version 1.4.9.5 ?
clinton4
 
Posts: 100
Joined: Sun Jan 17, 2010 3:54 am

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby Qphoria » Wed May 18, 2011 6:18 pm

clinton4 wrote:Hi,

Is this patch included in version 1.4.9.5 ?


yep
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18200
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby yiyinlah » Thu Jun 02, 2011 6:28 pm

Qphoria wrote:
clinton4 wrote:Hi,

Is this patch included in version 1.4.9.5 ?


yep


Hi Qphoria!

I wanted to update paypal on my store, using 1.4.9.5.

But before I began downloading, I saw this message,
Code: Select all
[color=#FF0000][background=][color=#FFFF00]The current version is NEWER than the one in v1.4.9.4
DO NOT USE if using an OpenCart version newer than v1.4.9.4 as it likely has this change and additional changes[/color][/background][/color]


It states DO NOT USE if using v.1.4.9.4 or newer, so can I use it in 1.4.9.5??? O_O
I'm using Opencart 1.5.4.1 & vQmod 2.3.2.
User avatar
yiyinlah
 
Posts: 169
Joined: Thu Sep 23, 2010 5:19 am
Location: Singapore

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby Qphoria » Thu Jun 02, 2011 8:23 pm

yiyinlah wrote:But before I began downloading, I saw this message,
Code: Select all
[color=#FF0000][background=][color=#FFFF00]The current version is NEWER than the one in v1.4.9.4
DO NOT USE if using an OpenCart version newer than v1.4.9.4 as it likely has this change and additional changes[/color][/background][/color]


It states DO NOT USE if using v.1.4.9.4 or newer, so can I use it in 1.4.9.5??? O_O


No.. it is already in 1.4.9.5 by default
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18200
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby yiyinlah » Fri Jun 03, 2011 7:33 am

Qphoria wrote:
yiyinlah wrote:But before I began downloading, I saw this message,
Code: Select all
[color=#FF0000][background=][color=#FFFF00]The current version is NEWER than the one in v1.4.9.4
DO NOT USE if using an OpenCart version newer than v1.4.9.4 as it likely has this change and additional changes[/color][/background][/color]


It states DO NOT USE if using v.1.4.9.4 or newer, so can I use it in 1.4.9.5??? O_O


No.. it is already in 1.4.9.5 by default


Ok! Thanks! :)
I'm using Opencart 1.5.4.1 & vQmod 2.3.2.
User avatar
yiyinlah
 
Posts: 169
Joined: Thu Sep 23, 2010 5:19 am
Location: Singapore

Re: Paypal Standard Improved Ongoing (v1.4.9.4+)

Postby CarpeNoctumDC » Thu Jul 28, 2011 3:59 am

Hey Q... Just a heads up that your file_get_contents_curl function isnt working...


If anybody else has problems with PDT failing:
(Attached is a patched version of the catalog pp_standard controller... I just grabbed Q's code from the IPN and shoved it into the file_get_contents_curl function and updated the call to it... It fixed the issue..)

Manual Instructions:
Find around line 329:
Code: Select all
$response = $this->file_get_contents_curl($url . '?' . $request);


Replace with:
Code: Select all
$response = $this->file_get_contents_curl($url,$request);




Find around line 576:
Code: Select all
   private function file_get_contents_curl($url) {
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_HEADER, 0);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);

      $data = curl_exec($ch);

      curl_close($ch);

      return $data;
   }


Replace With:

Code: Select all
   private function file_get_contents_curl($url, $request) {
         $ch = curl_init($url);

         curl_setopt($ch, CURLOPT_POST, 1);
         curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded", "Content-Length: " . strlen($request)));
         curl_setopt($ch, CURLOPT_HEADER, false);
         curl_setopt($ch, CURLOPT_VERBOSE, 1);
         curl_setopt($ch, CURLOPT_TIMEOUT, 30);
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

         $data = curl_exec($ch);

         curl_close($ch);   

      return $data;
   }
Attachments
pp_standard.php
(25.56 KiB) Downloaded 160 times
CarpeNoctumDC
 
Posts: 7
Joined: Fri Jan 28, 2011 7:17 pm

PreviousNext

Return to News & Announcements

Who is online

Users browsing this forum: No registered users and 8 guests

Hosted by Arvixe Web Hosting