Post by Howence » Mon Feb 10, 2020 9:26 pm

I currently upgraded to Version 3.0.3.2, but now the "PayPal Payments Standard" extension is giving me errors.

Everything looks normal when checking out, but at the last step of completing checkout, it gives this error message:
Things don't appear to be working at the moment. Please try again later.
Everything was working just fine before upgrading to OC 3, I'm not sure what I did wrong. I spent the whole night trying to figure it out and I just now realized the sun came up. Any one has any idea whats wrong?

Image
Last edited by Howence on Mon Feb 10, 2020 9:38 pm, edited 1 time in total.

User avatar
Newbie

Posts

Joined
Thu Jan 12, 2017 12:06 pm

Post by straightlight » Mon Feb 10, 2020 9:29 pm

Use the debug mode in your paypal standard extension payment module from the OC admin. Then, put your store under maintenance mode and see what the logs provides on the back-end for those errors.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Howence » Mon Feb 10, 2020 9:44 pm

I turned on debug mode and checked the error log, but there nothing there. I updated my first post with a screenshot of the error message i get from paypal.

I'm not sure if this will help, but notice the AMOUNT_ERROR in the URL

Code: Select all

https://www.paypal.com/webapps/shoppingcart/error?flowlogging_id=17cf6ed12f76a&code=AMOUNT_ERROR&mfid=1581342044193_17cf6ed12f76a

User avatar
Newbie

Posts

Joined
Thu Jan 12, 2017 12:06 pm

Post by thekrotek » Mon Feb 10, 2020 10:10 pm

Well, error says for itself: amount error.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Howence » Mon Feb 10, 2020 10:15 pm

Yes, but where is it coming from? How do I fix it?

User avatar
Newbie

Posts

Joined
Thu Jan 12, 2017 12:06 pm

Post by thekrotek » Mon Feb 10, 2020 10:26 pm

There's no generic solution for this issue, you need to debug it or hire someone to do this for you.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Howence » Tue Feb 11, 2020 1:24 am

Understood, thanks for your quick response though.

I'm not 100% sure, but if anyone else is having the same issue, i think it was because my server didn't have "mCrypt" installed.

I don't want to go in to details, but the database wasn't restoring via ACP nor was it working via phpMyAdmin (said missing tables) *shrug*
I just accept the fact that I lost everything and decided to just start over again. After making an attempt to do a fresh install, it said one of the requirement was mCrypt. It's too late for me to check now, but I think that might had been what was causing the problem.

User avatar
Newbie

Posts

Joined
Thu Jan 12, 2017 12:06 pm

Post by FrankR » Sat Apr 04, 2020 12:56 am

I am also have this same issue with the error after upgrading to Version 3.0.3.2:
https://www.sandbox.paypal.com/webapps/ ... b7c14dd4f2 >>> code=AMOUNT_ERROR
Things don't appear to be working at the moment. Please try again later.

I set Total = 0 so that any amount will trigger PayPal. When I change Total = 0.01 or Total = 1.00, the PayPal option disappears in checkout and I get:
Warning: No Payment options are available. Please contact us for assistance!

mCrypt appears to come from the server and I'm running ea-php73. I don't see any option for enabling mCrypt in PHP INI.

Any advice?

OpenCart Version 3.0.3.6


New member

Posts

Joined
Wed Apr 08, 2015 3:18 am

Post by IP_CAM » Sat Apr 04, 2020 7:24 am

You could try this system/library/encryption.php file, it's the only one, still
containing some routine for the outdated mcrypt_encrypt standard, and
it should work on all OC Versions.
Good Luck! ;)
Ernie

Code: Select all

<?php
// *	@copyright	OPENCART.PRO 2011 - 2020.
// *	@forum		http://forum.opencart.pro
// *	@source		See SOURCE.txt for source and other copyright.
// *	@license	GNU General Public License version 3; see LICENSE.txt

final class Encryption {
	private $key;

	public function __construct($key) {
		$this->key = hash('sha256', $key, true);
	}

	public function encrypt($value) {
		if (version_compare(phpversion(), '7.1.0', '>') == true || !function_exists('mcrypt_encrypt')) {
			return strtr(base64_encode(openssl_encrypt($value, 'aes-128-cbc', $this->key)), '+/=', '-_,');
		} else {
			return strtr(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $this->key, true), $value, MCRYPT_MODE_ECB)), '+/=', '-_,');
		}
	}

	public function decrypt($value) {
		if (version_compare(phpversion(), '7.1.0', '>') == true || !function_exists('mcrypt_encrypt')) {
			return trim(openssl_decrypt(base64_decode(strtr($value, '-_,', '+/=')), 'aes-128-cbc', $this->key));
		} else {
			return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $this->key, true), base64_decode(strtr($value, '-_,', '+/=')), MCRYPT_MODE_ECB));
		}
	}
}
?>

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by FrankR » Mon Apr 06, 2020 11:58 pm

Thanks! I renamed my old encryption.php file to encryption-old.php and created a new encryption.php file with the above code. However, it didn't appear to make a difference. I've also contacted PayPal and they're also helping me to resolve this issue.

OpenCart Version 3.0.3.6


New member

Posts

Joined
Wed Apr 08, 2015 3:18 am

Post by daymobrew » Wed Apr 29, 2020 1:56 am

@FrankR: Did you get a solution from PayPal?
I tried the suggested encryption.php but it did not fix the issue.
I am on PHP 7.2 and mCrypt is enabled (I checked with phpinfo).

New member

Posts

Joined
Wed Dec 22, 2010 7:36 am

Post by FrankR » Fri May 22, 2020 9:37 pm

PayPal did try to resolve this issue but we could not get it to work so I gave up on PayPal Payments Standard and tried PayPal Express Checkout. PEC did appear to work but the module broke my store because it would not let me access orders placed through it, which I could only access when I disabled the PEC module. It also did not include shipping so I had to send my customers a follow-up invoice via PayPal for freight.

I gave the PayPal Commerce Platform integration a try and it seems to be working. However, checkout doesn't work now because, although the shopping cart contents correctly appear, the order total does not.

So ... still not able to accept payments yet directly through OpenCart but at least PCPI doesn't appear to have broken my store so far.

OpenCart Version 3.0.3.6


New member

Posts

Joined
Wed Apr 08, 2015 3:18 am

Post by FrankR » Wed Nov 18, 2020 8:02 am

To followup on this topic, I have PayPal Commerce Platform as my payment module and it seems to be working fine. My store was broken until recently because I was using the OC USPS extension. After switching to weight-based shipping, my store is back in operation again.

OpenCart Version 3.0.3.6


New member

Posts

Joined
Wed Apr 08, 2015 3:18 am

Post by jasminsandlas24 » Sat Mar 26, 2022 9:04 pm

IP_CAM wrote:
Sat Apr 04, 2020 7:24 am
You could try this system/library/encryption.php file, it's the only one, still
containing some routine for the outdated mcrypt_encrypt standard, and
it should work on all OC Versions.
Good Luck! ;)
Ernie

Code: Select all

<?php
// *	@copyright	OPENCART.PRO 2011 - 2020.
// *	@forum		http://forum.opencart.pro
// *	@source		See SOURCE.txt for source and other copyright.
// *	@license	GNU General Public License version 3; see LICENSE.txt

final class Encryption {
	private $key;

	public function __construct($key) {
		$this->key = hash('sha256', $key, true);
	}

	public function encrypt($value) {
		if (version_compare(phpversion(), '7.1.0', '>') == true || !function_exists('mcrypt_encrypt')) {
			return strtr(base64_encode(openssl_encrypt($value, 'aes-128-cbc', $this->key)), '+/=', '-_,');
		} else {
			return strtr(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $this->key, true), $value, MCRYPT_MODE_ECB)), '+/=', '-_,');
		}
	}

	public function decrypt($value) {
		if (version_compare(phpversion(), '7.1.0', '>') == true || !function_exists('mcrypt_encrypt')) {
			return trim(openssl_decrypt(base64_decode(strtr($value, '-_,', '+/=')), 'aes-128-cbc', $this->key));
		} else {
			return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, hash('sha256', $this->key, true), base64_decode(strtr($value, '-_,', '+/=')), MCRYPT_MODE_ECB));
		}
	}
}
?>
I tried this but there is no results
still showing code=BAD_INPUT_ERROR


Posts

Joined
Sun Sep 02, 2018 3:37 pm

Post by ADD Creative » Sat Mar 26, 2022 10:35 pm

jasminsandlas24 wrote:
Sat Mar 26, 2022 9:04 pm
I tried this but there is no results
still showing code=BAD_INPUT_ERROR
You will need to provide more information than that. What version of OpenCart? What version of PHP? What issue you were trying to solve? In what context you see that error?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 354 guests