Post by asdfowkw » Thu Jun 02, 2011 1:47 am

Hello peeps!

Im trying to get the Paypal pro running.
Ive filled in my api details and so and im not running in sandbox.

When i click on confirm on the payment during checkout it just stands "Please wait" and nothing more happens.

If i click again it will just add another line with another "Please Wait"

So is this a curl problem or ?

Anyone know how to fix this ? :P

Newbie

Posts

Joined
Thu Jun 02, 2011 1:45 am

Post by asdfowkw » Thu Jun 02, 2011 1:48 am

I see now that i did post it in the wrong forum section sry. Mod please move if you see.

Newbie

Posts

Joined
Thu Jun 02, 2011 1:45 am

Post by asdfowkw » Tue Jun 07, 2011 8:10 pm

bump ?

Newbie

Posts

Joined
Thu Jun 02, 2011 1:45 am

Post by colinsyu » Sun Aug 21, 2011 7:15 am

I have the same problem I am using v1.5.1.1 and everything seems to work well except when I try to checkout on Paypal pro. I have to hit submit twice for the successful page to appear but I also get double paypal transactions.

Opencart seems to be a wonderful product but I am stuck on this part..

Any solution to this problem? Thank you in advance.

Newbie

Posts

Joined
Sun Aug 21, 2011 7:11 am

Post by matt1982 » Thu Aug 25, 2011 6:46 pm

It is usually due to incorrect details being entered in the api area.

I would triple check those details first. I have had a nightmare trying to get paypal pro intergrated but I seem to be winning the battle slowly!

Which API are you using for it?

New member

Posts

Joined
Tue Sep 02, 2008 10:52 pm

Post by chrsdlmn » Tue Oct 25, 2011 6:42 am

Did any of you figure this out?
Transactions will post in OpenCart and on my paypal account, but on the customer side it just hangs on "Please Wait!".

I also am using 1.5.1

I've tried every single suggestion that's posted on the forums and nothing works, it is something with OpenCart though I'm sure. It looks like this has been an issue since 2010 and corrections are made, but it keeps coming up!

Newbie

Posts

Joined
Tue Oct 25, 2011 4:18 am

Post by chrsdlmn » Tue Oct 25, 2011 9:43 am

I figured it out! under catalog/view/theme/default/template/payment/pp_pro.tpl someone had told me to delete:

Code: Select all

 <tr>
      <td><?php echo $entry_cc_start_date; ?></td>
      <td><select name="cc_start_date_month">
          <?php foreach ($months as $month) { ?>
          <option value="<?php echo $month['value']; ?>"><?php echo $month['text']; ?></option>
          <?php } ?>
        </select>
        /
        <select name="cc_start_date_year">
          <?php foreach ($year_expire as $year) { ?>
          <option value="<?php echo $year['value']; ?>"><?php echo $year['text']; ?></option>
          <?php } ?>
        </select></td>
    </tr>
and:

Code: Select all

<tr>
      <td><?php echo $entry_cc_issue; ?></td>
      <td><input type="text" name="cc_issue" value="" size="3" /></td>
    </tr>
Since we don't use those in the States. I added them back in and hide them instead with

Code: Select all

<tr style="display:none">
and it worked!!

Newbie

Posts

Joined
Tue Oct 25, 2011 4:18 am

Post by chrsdlmn » Tue Oct 25, 2011 10:01 am

Nevermind, once I added the code back in I at least get an error message when the Credit Card is incorrect, but valid cards just sit on the "Please Wait" still... Crap I thought I had this resolved.

Newbie

Posts

Joined
Tue Oct 25, 2011 4:18 am

Post by chrsdlmn » Tue Oct 25, 2011 10:29 am

Sorry to keep posting and re-posting. I downloaded opencart again and copied pp_pro.tpl and pp_pro.php and overwrote and didn't work. Cleared my cookies and Viola! it worked.

Newbie

Posts

Joined
Tue Oct 25, 2011 4:18 am

Post by jamilkhan » Tue Feb 14, 2012 2:44 pm

Previously I was getting "Invalid security header" message. After doing the modification in pp_pro.tpl I am not getting that message any more but "please wait" message is keep loading. I am using OC 1.5.1.3. Any help would be highly appreciated.

Newbie

Posts

Joined
Tue Feb 14, 2012 3:51 am

Post by rwenve » Thu Feb 16, 2012 7:14 am

Has anyone solved this? I have been looking around the files and it looks more like this is using ajax and xhr to authorize? I did take out the issue date for the tpl and also cleared my cache and cookies but nothing. I tried it in every browser as well but it still just spins "please wait"

Its on OC Version 1.5.1.3 and the PayPal Pro - and I have confirmed my API's are correct. I dont want the client to be paying $35/mo for nothing

Newbie

Posts

Joined
Wed Feb 08, 2012 5:40 am

Post by rwenve » Fri Feb 17, 2012 3:59 am

I have been trying to figure out why this keeps spinning "Please wait" and I think I have narrowed it down to this ajax call

<script type="text/javascript"><!--
$('#button-confirm').bind('click', function() {
$.ajax({
type: 'POST',
url: 'index.php?route=payment/pp_pro/send',
data: $('#payment :input'),
dataType: 'json',
beforeSend: function() {
$('#button-confirm').attr('disabled', true);

$('#payment').before('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
},
success: function(json) {
if (json['error']) {
alert(json['error']);

$('#button-confirm').attr('disabled', false);
}


$('.attention').remove();

if (json['success']) {
location = json['success'];
}
}
});
});
//--></script>
I dont really know JSON but does something need to be installed or turned on in a config file somewhere? In order for it to remove the spinning icon its supposed to at least alert me to errors. I thought it would be easy to test so in the form I didn't fill out any of it and there was nothing returned (error message) - so it's like JSON isnt functioning? Anybody think that sounds logical and can help me?
Thanks

Newbie

Posts

Joined
Wed Feb 08, 2012 5:40 am

Post by JNeuhoff » Wed Feb 29, 2012 9:24 pm

rwenve wrote:I have been trying to figure out why this keeps spinning "Please wait" and I think I have narrowed it down to this ajax call

<script type="text/javascript"><!--
$('#button-confirm').bind('click', function() {
$.ajax({
type: 'POST',
url: 'index.php?route=payment/pp_pro/send',
data: $('#payment :input'),
dataType: 'json',
beforeSend: function() {
$('#button-confirm').attr('disabled', true);

$('#payment').before('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
},
success: function(json) {
if (json['error']) {
alert(json['error']);

$('#button-confirm').attr('disabled', false);
}


$('.attention').remove();

if (json['success']) {
location = json['success'];
}
}
});
});
//--></script>
I dont really know JSON but does something need to be installed or turned on in a config file somewhere? In order for it to remove the spinning icon its supposed to at least alert me to errors. I thought it would be easy to test so in the form I didn't fill out any of it and there was nothing returned (error message) - so it's like JSON isnt functioning? Anybody think that sounds logical and can help me?
Thanks
Did you ever find a solution for this? I am having the same issue. It usually happens when the Ajax response is corrupted by PHP error messages which are also logged in system/logs/error.txt.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JNeuhoff » Wed Feb 29, 2012 11:19 pm

JNeuhoff wrote:
rwenve wrote:I have been trying to figure out why this keeps spinning "Please wait" and I think I have narrowed it down to this ajax call

<script type="text/javascript"><!--
$('#button-confirm').bind('click', function() {
$.ajax({
type: 'POST',
url: 'index.php?route=payment/pp_pro/send',
data: $('#payment :input'),
dataType: 'json',
beforeSend: function() {
$('#button-confirm').attr('disabled', true);

$('#payment').before('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
},
success: function(json) {
if (json['error']) {
alert(json['error']);

$('#button-confirm').attr('disabled', false);
}


$('.attention').remove();

if (json['success']) {
location = json['success'];
}
}
});
});
//--></script>
I dont really know JSON but does something need to be installed or turned on in a config file somewhere? In order for it to remove the spinning icon its supposed to at least alert me to errors. I thought it would be easy to test so in the form I didn't fill out any of it and there was nothing returned (error message) - so it's like JSON isnt functioning? Anybody think that sounds logical and can help me?
Thanks
Did you ever find a solution for this? I am having the same issue. It usually happens when the Ajax response is corrupted by PHP error messages which are also logged in system/logs/error.txt.
I think I found a solution, by catching all PHP errors (which can corrupt the json array) in an exception handler, ensuring there is always a proper json array in the response to the ajax call. Will write up a VQmod XML script for this bugfix.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by rwenve » Thu Mar 01, 2012 12:13 am

That would be awesome Neuhoff!

Newbie

Posts

Joined
Wed Feb 08, 2012 5:40 am

Post by JNeuhoff » Thu Mar 01, 2012 1:02 am

rwenve wrote:That would be awesome Neuhoff!
Well, here it is, try the following bugfixes-payment-pp-pro.xml:

Code: Select all

<modification>
	<id>Opencart core file modifications: Bugfixes for Paypal PRO payment</id>
	<version>1.5.1.3</version>
	<vqmver>1.2.3</vqmver>
	<author>mhccorp.com</author>
	
	<file name="catalog/controller/payment/pp_pro.php">
		<operation>
			<search position="before"><![CDATA[class ControllerPaymentPPPro extends Controller {]]></search>
			<add><![CDATA[
class PaymentPPProErrorHandler  
{  
	/** 
	* catches php errors / warnings / notices and throws 
	* an exception instead 
	* 
	* @param int $errNo 
	* @param string $errStr 
	*/  
	public static function handle($errNo, $errStr=NULL)  
	{  
		switch ($errNo) {  
			case E_WARNING:  
				throw new RuntimeException($errStr,$errNo);  
				break;  
			default:  
				throw new Exception($errStr,$errNo);  
				break;  
		}  
	}  
	
	/** 
	* Overwrites the PHP error handler and uses our own 
	* 
	*/  
	public static function set()  
	{  
		set_error_handler(array(__CLASS__ , 'handle'));  
	}      
}  
			]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[public function send() {]]></search>
			<add><![CDATA[
		PaymentPPProErrorHandler::set();
		try {
			]]></add>
		</operation>
		<operation>
			<search position="before"><![CDATA[$this->response->setOutput(json_encode($json));]]></search>
			<add><![CDATA[
		}
		catch (Exception $e) {
			$msg = "PHP Exception: ".($e->getMessage())." in ".($e->getFile())." on line ".($e->getLine())."\n";
			$this->log->write( $msg );
			if (!isset($json)) {
				$json = array();
			}
			$json['exception'] = $msg;
			if (!isset($json['success'])) {
				if (!isset($json['error'])) {
					$json['error'] = "Payment could not be processed because of server error:\n".$msg;
				}
			}
		}
		restore_error_handler();
			]]></add>
		</operation>
	</file>
</modification>

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by rwenve » Thu Mar 01, 2012 4:17 am

I uploaded the bugfixes-pp-pro into the xml folder and when I tried a transaction I got this error:

PHP Exception: Undefined index: cc_start_date_month in /homepages/41/d400055205/htdocs/vqmod/vqcache/vq2-catalog_controller_payment_pp_pro.php on line 19

because its in the vqmod folder I'm not sure what I should change first.

I deleted the lines in the tpl file that actually ask for the cc start date. (in above comments) Is that throwing this error?

Newbie

Posts

Joined
Wed Feb 08, 2012 5:40 am

Post by JNeuhoff » Thu Mar 01, 2012 4:59 am

rwenve wrote:I uploaded the bugfixes-pp-pro into the xml folder and when I tried a transaction I got this error:

PHP Exception: Undefined index: cc_start_date_month in /homepages/41/d400055205/htdocs/vqmod/vqcache/vq2-catalog_controller_payment_pp_pro.php on line 19

because its in the vqmod folder I'm not sure what I should change first.

I deleted the lines in the tpl file that actually ask for the cc start date. (in above comments) Is that throwing this error?
Well, at least you don't get the endless 'Please Wait' problem anymore, and the customer won't do double payments :)

One of the following files were modified by you or by one of the other VQMod XML scripts you use:

catalog/controller/payment/pp_pro.php
language/english/payment/pp_pro.php
catalog/view/theme/your-web-theme/payment/pp_pro.tpl

Perhaps your form doesn't submit the 'cc_start_date_month' anymore, yet the controller still tries to use it.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by rwenve » Thu Mar 01, 2012 5:12 am

thats what I was thinking also (both a new error and about the cc start date) - I'll go in and make up my mind to take it all out (start date) or put it back in the tpl - thanks

Newbie

Posts

Joined
Wed Feb 08, 2012 5:40 am

Post by rwenve » Sat Mar 03, 2012 4:21 am

I am getting passed that step but now I'm receiving a message that says "This transaction cannot be processed due to an invalid merchant configuration." I have seen people having the same problem elsewhere in the forum but they don't have any answers. I have checked my API's for any small typo or white-space and all looks fine there. Anyone have ideas?

Thanks

Newbie

Posts

Joined
Wed Feb 08, 2012 5:40 am
Who is online

Users browsing this forum: No registered users and 22 guests