Post by maperdel » Sat Mar 26, 2011 7:00 am

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!

Zapatos Andrea - Andrea Zapatos


New member

Posts

Joined
Sat Mar 26, 2011 6:38 am


Post by Qphoria » Sat Mar 26, 2011 7:22 am

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
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by maperdel » Sat Mar 26, 2011 7:42 am

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.

Zapatos Andrea - Andrea Zapatos


New member

Posts

Joined
Sat Mar 26, 2011 6:38 am


Post by ritey » Wed Mar 30, 2011 5:21 am

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');
:)

Dave
www.coderstudios.com


User avatar
Active Member

Posts

Joined
Fri Jan 22, 2010 4:28 am
Location - Richmond

Post by Qphoria » Wed Mar 30, 2011 7:52 am

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
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ritey » Wed Mar 30, 2011 8: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?

Dave
www.coderstudios.com


User avatar
Active Member

Posts

Joined
Fri Jan 22, 2010 4:28 am
Location - Richmond

Post by Qphoria » Thu Mar 31, 2011 4:19 am

It is now

UPDATED file in first post with fix for address zip and country code shown 2 posts up

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Thomas » Fri Apr 01, 2011 5:19 pm

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

Newbie

Posts

Joined
Sat Nov 13, 2010 4:27 pm

Post by funkyou86 » Wed Apr 13, 2011 4:02 am

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.

Newbie

Posts

Joined
Tue Mar 01, 2011 11:02 pm

Post by Xsecrets » Wed Apr 13, 2011 4:39 am

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.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by funkyou86 » Wed Apr 13, 2011 4:46 am

Thanks for your reply! I'll try it in a second :joker:

Newbie

Posts

Joined
Tue Mar 01, 2011 11:02 pm

Post by Troy » Fri Apr 15, 2011 10: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 :)

Newbie

Posts

Joined
Tue Apr 05, 2011 4:35 pm

Post by eka7a » Sat Apr 16, 2011 12:36 am

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
Active Member

Posts

Joined
Sun Apr 12, 2009 12:59 am
Location - Türkiye

Post by Qphoria » Sat Apr 16, 2011 1:49 am

Done.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by clinton4 » Thu May 19, 2011 1:13 am

Hi,

Is this patch included in version 1.4.9.5 ?

Spam blocking PHP script, use it!


Active Member

Posts

Joined
Sun Jan 17, 2010 11:54 am

Post by Qphoria » Thu May 19, 2011 2:18 am

clinton4 wrote:Hi,

Is this patch included in version 1.4.9.5 ?
yep

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by yiyinlah » Fri Jun 03, 2011 2:28 am

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
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by Qphoria » Fri Jun 03, 2011 4:23 am

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
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by yiyinlah » Fri Jun 03, 2011 3:33 pm

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
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by CarpeNoctumDC » Thu Jul 28, 2011 11: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;
	}

Newbie

Posts

Joined
Sat Jan 29, 2011 3:17 am
Who is online

Users browsing this forum: No registered users and 8 guests