Payments fail when submitting a payment form from a list of nodes in a page that display multiple standalone payment forms.

Notice: Trying to get property of non-object in PaymentEntityController->save() (line 394 of payment.classes.inc)

Steps to Reproduce:
Install the modules payment and paypal_payment.
Add a payment form field to a content type (ex: Product) and create several of these products.
Add a "PayPal Payments Standard" payment method, name it Paypal for example.
Create a view that list these products where each of them display a standalone payment form.

If you click Pay from the first product of the list, you will be redirected to Paypal as expected.
But if you click on Pay from any other element of the list, you get the notice above and a payment failed message.

On the payment form submit function I notice the values array does contain the correct mpid, but $payment->method is null, therefore not executing the payment when the $payment->execute function is called. Line 156 of payment.classes.inc, and instead the payment status is set to PAYMENT_STATUS_FAILED.

Attached is an image of a list created on a vanilla Drupal site. Any help is much appreciated!

CommentFileSizeAuthor
product_list.png124.73 KBmarcosdr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcosdr created an issue. See original summary.

marcosdr’s picture

Issue summary: View changes