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

2.1.0rc - Paypal Website Payments Standard module doesn't work #4785

Closed
commcad opened this issue May 30, 2016 · 56 comments
Closed

2.1.0rc - Paypal Website Payments Standard module doesn't work #4785

commcad opened this issue May 30, 2016 · 56 comments
Assignees
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@commcad
Copy link

commcad commented May 30, 2016

Steps to reproduce

  1. Install Magento from 2.0.7 > Upgrade to 2.1.0rc using Web Setup Wizard (no sample data)
  2. Store > Configuration > Sales > Payment Method > Enable Website Payments Standard
  3. Insert valid facilitator (merchant) email + API credentials > Save > Clear cache

  4. Products > Category > Add New Category
  5. Products > Catalog > Add New Product
  6. Save everything, go get a coffee, let the cron do their thing every minutes
  7. Go to frontend, register as a new customer, place an order, checkout using Paypal

Expected result

  1. Succeed page/we have received your order confirmation, order created, qty adjustment, etc

Actual result

  1. Error message "We can't place the order."
  2. The PP sandbox works fine as I can see the payments in both buyer & facilitator paypal accounts.

4magebugrep

Trace in TXT format
trace for pp bug.txt

@commcad
Copy link
Author

commcad commented May 30, 2016

Loaded sample data and carried the same frontend steps > same error and trace.

Cache emptied > reindexed > stats refreshed > Redis-cli flushall/flushdb, everything I could do to set this back to a ootb stance.

Let me know if you need me to do anything else (I'll archive this VM in a meantime)

@commcad
Copy link
Author

commcad commented May 31, 2016

Thanks for looking into this Alena. YOU have to make this PP work ;)

Any workaround that you know of (temp fix) please let me know as I plan on putting RC1 in prod in a week (i know i know, not for prod etc) We just can't delay too much longer here so we'll make use of it. Everything else works flawlessly (for us anyway). We'll upgrade to a stable version in Aug or Sept.

Ubuntu 16.04
NGINX 1.10.0
MariaDB 10.0.24
PHP 7.0.4
PhpRedis Extension
REDIS 3.2.0 (for session & page cache)

@alena-marchenko
Copy link

Hi @commcad

Please provide us with debug.log that contains response from PayPal (debug can be enabled in Advanced Settings section for PayPal Website Payments Standard), this should help to identify the cause of the issue.

@commcad
Copy link
Author

commcad commented Jun 5, 2016

Hello @alena-marchenko

Sure. Attaching the entire sys i/o from 2.07 composer-project install > update to 2.1.0rc using Web Setup. TestBuy/sandboxed performed with the paypal debug mode On as requested.

system.txt

See line no. 1435
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base_grand_total' in 'field list', query was: INSERT INTO sales_invoice_grid

@commcad
Copy link
Author

commcad commented Jun 5, 2016

MariaDB [storedB]> show columns from sales_invoice_grid;
+-----------------------+----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+----------------------+------+-----+---------+-------+
| entity_id | int(10) unsigned | NO | PRI | NULL | |
| increment_id | varchar(50) | YES | MUL | NULL | |
| state | int(11) | YES | MUL | NULL | |
| store_id | smallint(5) unsigned | YES | MUL | NULL | |
| store_name | varchar(255) | YES | | NULL | |
| order_id | int(10) unsigned | NO | MUL | NULL | |
| order_increment_id | varchar(50) | YES | MUL | NULL | |
| order_created_at | timestamp | YES | MUL | NULL | |
| customer_name | varchar(255) | YES | | NULL | |
| customer_email | varchar(255) | YES | | NULL | |
| customer_group_id | smallint(6) | YES | | NULL | |
| payment_method | varchar(128) | YES | | NULL | |
| store_currency_code | varchar(3) | YES | | NULL | |
| order_currency_code | varchar(3) | YES | | NULL | |
| base_currency_code | varchar(3) | YES | | NULL | |
| global_currency_code | varchar(3) | YES | | NULL | |
| billing_name | varchar(255) | YES | MUL | NULL | |
| billing_address | varchar(255) | YES | | NULL | |
| shipping_address | varchar(255) | YES | | NULL | |
| shipping_information | varchar(255) | YES | | NULL | |
| subtotal | decimal(12,4) | YES | | NULL | |
| shipping_and_handling | decimal(12,4) | YES | | NULL | |
| grand_total | decimal(12,4) | YES | MUL | NULL | |
| created_at | timestamp | YES | MUL | NULL | |
| updated_at | timestamp | YES | MUL | NULL | |
+-----------------------+----------------------+------+-----+---------+-------+
25 rows in set (0.00 sec)

@commcad
Copy link
Author

commcad commented Jun 5, 2016

MariaDB [storedB]>
> ALTER TABLE sales_invoice_grid ADD base_grand_total decimal(12,4) AFTER grand_total;

pp_test

;)

@alena-marchenko
Copy link

Hi @commcad

Please provide us with debug.log file that is located in var/log directory under magento root folder. Please als ensure that "Debug: option is set to Yes Under PayPal Payments Standard configuration.

@commcad
Copy link
Author

commcad commented Jun 12, 2016

@alena-marchenko

Sure, see attached debug.txt below.

All looking very good on the paypal side of things having success ack and all. I also have the payment registered and issued to the seller. Can't be a paypal bug...been using Paypal for the last 12 years with litle over $500,000 in sales and never came across a payment failure.

See above post no 6 where I highlighted the bug. The mage's database column aren't named properly. Easy fix is to rename the column to what it should be but I am unaware of other possible crashes that could occur while doing/renaming this table column.

Same bug on Magento 2.1.0rc2 by the way. Can't run a shop using the Paypal payment option :/

debug.txt

@alena-marchenko
Copy link

Hi @commcad

We've created MAGETWO-54787 internal ticket regarding this issue.
Thank you.

@Nerogee
Copy link

Nerogee commented Jul 5, 2016

I used fresh installed magento2.1 and still having unable to place order issue. column base_grand_total is there in sales_invoice_grid table.

@maderlock
Copy link

Do we have visibility on these MAGETWO-54787 tickets? They keep being mentioned, so I assume they can be viewed somewhere?

@commcad
Copy link
Author

commcad commented Jul 5, 2016

@maderlock MAGETWO-54787 internal ticket.

Let's hope for this to be included in the upcoming release. In a meantime the ALTER table fix works like a charm. I haven't had any complications amending the column name (both dev & prod).

@maderlock
Copy link

Thanks @commcad. Not happy with having to adjust the schema, but without any idea of timescales I've used your fix.

@BigBri41
Copy link

BigBri41 commented Jul 6, 2016

What commcad said. I placed the column in a different place based on the insert query that errored, but I imagine both would work. Here's the query i ran to fix the issue.

ALTER TABLE magento.sales_invoice_grid
ADD COLUMN base_grand_total DECIMAL(12,4) NULL DEFAULT NULL AFTER shipping_and_handling;

@maderlock
Copy link

@BigBri41 Did you try the alter statement by @commcad? Is the nullable part important?

@Nerogee
Copy link

Nerogee commented Aug 9, 2016

I still have the same issue with message in system.log
main.CRITICAL: Exception message: Warning: Invalid argument supplied for foreach() in /var/www/public_html/test.com/vendor/magento/module-catalog/Model/Product.php on line 1910

@romeof1980
Copy link

Thanks @commcad for posting the fix, works for us too with Magento 2.1.0

@maderlock
Copy link

Sounds like we need a patch release asap.

@blizam
Copy link

blizam commented Aug 19, 2016

Can someone please clarify if I use the ALTER statement here to patch my 2.1.0 install... will that cause any issues when the next prod ver of mage is released/when I upgrade mage?

The same issue occurs on PayPal Express if you have it set to not skip the review page... which is necessary if you need to add carrier fetched shipping method/cost...

@elenleonova
Copy link

The issue has been fixed in 2.1.1

@usertwelve
Copy link

Upgraded to 2.1.1 and still getting this issue. The upgrade did not solved this issue for me.
Paypal pay now is still sending me back to the review order page with error "We can't place order" even if it should have skip the review order page. Paypal should send me to the success page with option to create account. I am using Paypal Standard Payments.

@NadiyaS
Copy link
Contributor

NadiyaS commented Sep 12, 2016

Hi @usertwelve ,
the cause of this bug was that DB table sales_invoice_grid did not have base_grand_total column.
If you really still have the same problem you will have error message on Invoice grid page. To check it go to Sales > Invoices. If this grid opens correctly and you see all invoice data, then you have another cause of your problem and please create additional ticket for this if it have not been already created.

@usertwelve
Copy link

It's a new installation 2.1.0 and just updated to 2.1.1. Not sure what you mean by Invoice "grid" page but no I don't see errors in the sales/invoice page. Maybe it is because I don't have any invoices yet? Each time I try to make a purchase I end up with this "We can't place order" message. I've tried a few different set-up with Paypal and I get this message each single time.

@blizam
Copy link

blizam commented Sep 12, 2016

If you switch to Authorize Only instead of Authorize and Capture, does it work? Are the payments actually going through on the PayPal side?

With the bug in 2.1.0 that was the case... but if setting it to just Authorize only still doesn't work then you've definitely got another issue

@usertwelve
Copy link

I am assuming you are referring to Authorize.net configuration (since there is no such authorize options with Paypal) but I am only accepting payments with Paypal. I am trying to configure either Paypal Website Payments Standard or Paypal Express Checkout as the only option for payments. (I am already using this setup with 2 other older Magento site with no problems.) Both Paypal options seems to work as supposed but when I clic "Pay now" in Paypal it redirect me to the order review page with the alert "We can't place the order". Even when I select yes to "Skip Order Review Step". No invoice is created and no payments.

@romeof1980
Copy link

No, he is not referring to that. Look again and pay attention where in PayPal config you see a drop down menu with "Authorize" and "Authorize and Capture".
Double check it if you can find it until you see it..

---- On Mon, 12 Sep 2016 19:07:31 +0200 [email protected] wrote ----

I am assuming you are referring to Authorize.net configuration (since there is no such authorize options with Paypal) but I am only accepting payments with Paypal. I am trying to configure either Paypal Website Payments Standard or Paypal Express Checkout as the only option for payments. (I am already using this setup with 2 other older Magento site with no problems.) Both Paypal options seems to work as supposed but when I clic "Pay now" in Paypal it redirect me to the order review page with the alert "We can't place the order". Even when I select yes to "Skip Order Review Step". No invoice is created and no payments.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@usertwelve
Copy link

usertwelve commented Sep 12, 2016

You're right this config is available in Paypal also but only with Paypal Payflow. Can't find it in Paypal Website Payments Standard nor in the Paypal Express checkout.
By the way thanks for your help guys.

@romeof1980
Copy link

Basic setting -> advanced settings -> billing agreement

Check then double check again
It is indeed present

---- On Mon, 12 Sep 2016 20:16:26 +0200 [email protected] wrote ----

You're right this config is available in Paypal also but only with Paypal Payflow. Can't find it in Paypal Website Payments Standard nor in the Paypal Express checkout.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@usertwelve
Copy link

I have set the Billing Agreement Signup to "Never" and the Paypal Billing Agreement Setting is disabled.
There is an option "Payment Action" which I can choose either "Authorization" or "Sale". It is set to Authorization but I can't see why it is important since the whole option (Paypal Billing Agreement Settings) is disabled.

@usertwelve
Copy link

Sorry Guys looks like my problem is not related to this issues. I have tried again with an other very basic test product and it worked this time. It was related to the product itself.. Maybe because of the customizable option. Thanks for your help.

@commcad
Copy link
Author

commcad commented Sep 13, 2016

Still doesn't work with configurable products; especially those having both swatches + custom options. You will get that same Cannot place order error.

However, it works fine if you use a configurable product having either one. Can't have both unfortunately ;)

in 2.1.0 and 2.1.1 @usertwelve

@neilrd
Copy link

neilrd commented Sep 13, 2016

@commcad

I've got the same issue that you initially highlighted. I am pretty inexperienced with MySQL. However I have logged into the MySQL monitor via SSH as the root user. What are the exact commands I need to run to solve this problem - please explain step by step.

I copied and pasted this command:

MariaDB [storedB]>

ALTER TABLE sales_invoice_grid ADD base_grand_total decimal(12,4) AFTER grand_total;

but the following error was flagged:
screen shot 2016-09-14 at 00 00 23

Appreciate any support with this. Apologies for my lack of experience.

Kind Regards

@commcad
Copy link
Author

commcad commented Sep 14, 2016

Hey Neil

Change pwd and database name (magentodB) with yours

From the Command Line Terminal:

$ sudo mysql -u root -p
$ (enter pwd)
$ USE magentodB;
$ ALTER TABLE sales_invoice_grid ADD base_grand_total decimal(12,4) AFTER grand_total;
$ quit
$ sudo service mysql restart

@neilrd

@plauge
Copy link

plauge commented Oct 18, 2016

The problem is stil in Magento 2.1.1 if the product have a Custom Option fields.
The base_grand_total is in the table.

Im getting an error like this:

Integrity constraint violation: 1062 Duplicate entry for key 'SALES_ORDER_INCREMENT_ID_STORE_ID', query was: INSERT INTOsales_order``

@NadiyaS
Copy link
Contributor

NadiyaS commented Oct 18, 2016

Hi @plauge ,
the problem of current issue is not in sales_order. If you have another issue, please create new ticket with all necessary information and steps to reproduce.

@shahankitb997
Copy link

Have same issue in Magento 2.1.2 for Some Orders

@nes710
Copy link

nes710 commented Jan 11, 2017

Have the same issues in Magento 2.1.3 with certain customers. "We can't place the order"

@NadiyaS NadiyaS removed their assignment Jan 11, 2017
@LucScu
Copy link

LucScu commented Jan 13, 2017

THERE IS AN ERROR WITH CONFIGURABLE PRODUCTS OR PRODUCTS WITH OPTIONS.
Please fix it!

@amansilla
Copy link

amansilla commented Feb 17, 2017

Still having same issue on Magento 2.1.4 after payment with Paypal Express Checkout returned to the review page although "Skip review Step" is on with the following error message "We can't place the order".

In order to reproduce the problem, take into account that only happens when Paypal is configured with live credentials.

@s00071609
Copy link

As LucScu pointed out - Have you guys tried to open the configurable product and save it again. It might give the error- SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1922-1..........
In my case I was using two stores and changed google analytics - turned it off and this issue got fixed. I believe that "We cant place order" may have to do with this error. Disabling Experiment code in Google Analytic in Sales-- GOogle API might fix the issue. No harm trying. Do let us know.

@s00071609
Copy link

Looks like this issue is not fixed with magento 2.1.7 either. Amazing, this issue is still there and not fixed for over a year now. Its being carried over with every new upgrade

@jer23jk
Copy link

jer23jk commented Aug 1, 2017

Any solution for this bug?

Magento 2.1.7 > Order Variable product with custom option Date > Pay with Paypal

Transaction in successful, but after redirecting from paypal there is a red statement We can't place the order.

magento-engcom-team pushed a commit that referenced this issue Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests