Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/paypal/express/review/ displays all agreements and proceeds without having to confirm all #239

Open
tecjam opened this issue Nov 24, 2015 · 11 comments
Labels

Comments

@tecjam
Copy link

tecjam commented Nov 24, 2015

Magento 1.9.2.2 & Magesetup 2.2.2

We have 2 agreements in place. One is the usual AGB, which is set to be shown on checkout (default).
The other is Datenschutz, which is set to "On customer registration (or on checkout, if customer not registered before)".

A registered customer (who has already agreed to the datenschutz when registering) uses Paypal to check out, is redirected to the paypal review page, which displays both agreements instead of only the AGB.

If AGBs aren't ticked the page reloads with an error message 'Please accept our ...".
If AGBs are ticked, but Datenschutz is not, the order is placed and completed, but the administrator of the site receives an email claiming:

Zahlungstransaktion fehlgeschlagen.

Grund
Bitte stimmen Sie den Allgemeinen Geschäftsbedingungen zu, bevor Sie die Bestellung aufgeben.

Kassentyp
onepage

But the payment was actually made successfully.

So, I can see 2 errors here, one of which is probably due to magesetup.

The Datenschutz should not be displayed at all in the paypal review page for logged in users, if it is set to only display "On customer registration (or on checkout, if customer not registered before)".

The Validation does not seem to check for both or multiple checkboxes.

@KlausStangl
Copy link

Same problem here, Magento Version 1.9.1.1 with FireGento_MageSetup 2.2.2, Checkout breaks after payment!

@Schrank Schrank added the bug label Dec 4, 2015
@Schrank
Copy link
Member

Schrank commented Dec 4, 2015

Thanks for reporting. At the moment everyone is busy. If you need it faster then "when someone has time", priorities can be shifted, hiring someon like @sprankhub, @avstudnitz @therouv @diglin or me :-)

@MartinKonVis
Copy link

Hello,
We got the same problem here. Is this still open or are there any fixes out there?
Best regards

@Arn2014
Copy link

Arn2014 commented Jul 18, 2016

Hello,
Same issue here... a fix is appreciated!
Regards,

@MartinKonVis
Copy link

I found this fix with seem to work?
https://github.com/firegento/firegento-magesetup/blob/development/src/app/design/frontend/base/default/layout/magesetup.xml#L481

But the user got redirected first to paypal. After making payment on paypal got an error and get's redirected to the store. In the store he can accepted the 2 agreements and than click "order now". Than the order got finally placed.

It's kind of "not nice" and might confuse lot of users what's going on.

@Arn2014
Copy link

Arn2014 commented Jul 19, 2016

Hi,
thanks for your addition and mentioning the partial fix..
indeed ..any sort of confusion should be avoided

Does anyone know if the paypal - magesetup "payment agreement" behave "okay with no errors" when run trough/over a payment service provider, or does the same issue occur..?

With Regards,

@Arn2014
Copy link

Arn2014 commented Jul 22, 2016

Hi,
Just found an article from Mr. kerstner.at about solving this issue, but how to implement this into magestup?

Link

Check for required sales agreements at order submission runtime

You can also check at runtime which agreements are required to be able to submit orders by inspecting the Paypal Express Checkout controller: Mage_Paypal_Controller_Express_Abstract. There you find the method placeOrderAction which initially checks for required agreements and their submission value. We can easily inject a debug message there to retrieve the required sales agreements at runtime. Below you find the corresponding code snippet. All we need to do is

Mage::log(implode(', ', $requiredAgreements));

which will write the required agreements to system.log. As always, make sure to enable debug logging in Magento.

public function placeOrderAction()
{
  try {
    $requiredAgreements = Mage::helper('checkout')->getRequiredAgreementIds();

    Mage::log(implode(', ', $requiredAgreements)); // inject debug logging

    if ($requiredAgreements) {
      $postedAgreements = array_keys($this->getRequest()->getPost('agreement', array()));
      if (array_diff($requiredAgreements, $postedAgreements)) {
        Mage::throwException(Mage::helper('paypal')->__('Please agree to all the terms and conditions before placing the order.'));
      }
    }

this will print your required agreement ids in system.log.

Any help appreciated

Regards

@Schrank
Copy link
Member

Schrank commented Nov 22, 2016

I just have this problem myself. If I see this correctly the review.js is broken, but I don't see any reason to have them so I would just remove it.

@ghost
Copy link

ghost commented Dec 9, 2016

Is there any solution now? I don't understand why you get redirected to paypal before the order review page?

@Schrank
Copy link
Member

Schrank commented Dec 11, 2016

@barannd No solution yet. If you need one, you are welcome to find a maintaner and pay them - or be patience :-/

@Schrank
Copy link
Member

Schrank commented Dec 11, 2016

@barannd Or as I wrote earlier, deleting review.js should solve the problem (but I can't remember it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants