0

I am trying to get the back and forth with PayPal working. I am using PayPal Website Payments Standard and it is configured like: PayPal Config

When I place an order it gets processed correctly, the transaction appears in PayPal and the payment gets debited from my account and deposited to the company account.

On PayPal I have configured IPN to be Enabled and the Notification URL is https://www.my-site.com/paypal/ipn/ I have also tried to set this to https://www.my-site.com/paypal/ipn/index/ but both IPN status are constantly Retrying.

An example IPN message is:

mc_gross=0.20&invoice=100000073&protection_eligibility=Eligible&address_status=confirmed&item_number1=1&payer_id=UDRGS3QP5FEEW&tax=0.00&address_street=13 Old Drive&payment_date=12:19:26 Jul 24, 2019 PDT&payment_status=Completed&charset=windows-1252&address_zip=BT66 6JS&first_name=Peter&mc_fee=0.20&address_country_code=GB&address_name=Peter Bear&notify_version=3.9&custom=&payer_status=verified&[email protected]&address_country=United Kingdom&num_cart_items=1&address_city=Belfast&verify_sign=AVKF91NKB8nqPQ86vcDt9PrSFBcfArsuGma.Sr8yXCBvd5zYcqyYCBzv&[email protected]&txn_id=5CV84837FR063293F&payment_type=instant&last_name=Bear&address_state=Antrim&item_name1=Cheap Test&[email protected]&payment_fee=&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&receiver_id=MEAUFW4MCPDPG&txn_type=cart&discount=0.00&mc_gross_1=0.20&mc_currency=GBP&residence_country=GB&shipping_method=Default&transaction_subject=&payment_gross=&ipn_track_id=b71b6a024227d

Checking the payment_paypal_standard.log it contains:

2019-07-24T19:18:55+00:00 DEBUG (7): Array
(
    [request] => Array
        (
            [business] => ****
            [invoice] => 100000073
            [currency_code] => GBP
            [paymentaction] => sale
            [return] => https://www.my-site.com/paypal/standard/success/
            [cancel_return] => https://www.my-site.com/paypal/standard/cancel/
            [notify_url] => https://www.my-site.com/paypal/ipn/
            [bn] => Magento_Cart_Community
            [item_name] => My Site
            [lc] => en_GB
            [charset] => utf-8
            [amount] => 0.20
            [tax] => 0.00
            [shipping] => 0.00
            [discount_amount] => 0.00
            [item_number_1] => 1
            [item_name_1] => Cheap Test
            [quantity_1] => 1
            [amount_1] => 0.20
            [cmd] => _cart
            [upload] => 1
            [tax_cart] => 0.00
            [discount_amount_cart] => 0.00
            [city] => Belfast
            [country] => GB
            [email] => [email protected]
            [first_name] => Peter
            [last_name] => Bear
            [zip] => BT9 7BT
            [state] => Antrim
            [address1] => 13 Old Drive
            [address2] => 
            [address_override] => 1
        )

    [__pid] => 4685
)

The only entry in system.log is below, but I don't know it's relevance:

2019-07-24T19:59:31+00:00 ERR (3): Warning: SimpleXMLElement::__construct(): Entity: line 9: parser error : Opening and ending tag mismatch: hr line 7 and body  in /home/admin/my-site.com/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2019-07-24T19:59:31+00:00 ERR (3): Warning: SimpleXMLElement::__construct(): </body></html>  in /home/admin/my-site.com/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2019-07-24T19:59:31+00:00 ERR (3): Warning: SimpleXMLElement::__construct():        ^  in /home/admin/my-site.com/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2019-07-24T19:59:31+00:00 ERR (3): Warning: SimpleXMLElement::__construct(): Entity: line 9: parser error : Opening and ending tag mismatch: body line 4 and html  in /home/admin/my-site.com/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2019-07-24T19:59:31+00:00 ERR (3): Warning: SimpleXMLElement::__construct(): Entity: line 9: parser error : Premature end of data in tag html line 2  in /home/admin/my-site.com/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2019-07-24T19:59:51+00:00 ERR (3): Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Space required after the Public Identifier  in /home/admin/my-site.com/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2019-07-24T19:59:51+00:00 ERR (3): Warning: SimpleXMLElement::__construct(): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">  in /home/admin/my-site.com/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2019-07-24T19:59:51+00:00 ERR (3): Warning: SimpleXMLElement::__construct():                                                  ^  in /home/admin/my-site.com/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173

All of this means that the order status sits at Pending Payment and I only have an option to change it to Processing manually. This does not kick in the email workflow and so no emails are sent to let us know a new order has occurred.

Is there anything that I have missed? I am not a Magento developer, I deal with .Net, but this was made for us by a local company that is not available anymore and there isn't really the money to get someone else to look at it.

1 Answer 1

0

Absolute rookie mistake. The site was in maintenance mode and was blocking all requests not from approved IP addresses or to specific directories (admin, etc). So it was returning 503 when sending the request to https://www.my-site.com/paypal/ipn/. I allowed access to this url and it works!

This has led to another issue, the order status changes to Processing after it receives the message but doesn't send the New Order email. But I have asked another question to cover this. Order status changes to Processing after completed PayPal payment - but doesn't send New Order email

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.