<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Refund Error: Trying to access array offset on null (PayPal Smart Button)]]></title><description><![CDATA[<p dir="auto">Hello Support Team,</p>
<p dir="auto">I’m encountering an issue when creating a refund in Bagisto using the PayPal Smart Button payment method.</p>
<p dir="auto">Error Message:<br />
Trying to access array offset on value of type null</p>
<p dir="auto">File:<br />
packages/Webkul/Admin/src/Listeners/Refund.php (line 46)</p>
<p dir="auto">Relevant Code:</p>
<p dir="auto">$paypalOrderID = $order-&gt;payment-&gt;additional['orderID'];</p>
<p dir="auto">Issue Description:<br />
When I attempt to create a refund from the admin panel, the system throws the above error. It appears that $order-&gt;payment-&gt;additional is null, which causes the failure when trying to access the orderID.</p>
<p dir="auto">Expected Behavior:<br />
The system should either:</p>
<p dir="auto">Process the refund correctly via PayPal, or<br />
Gracefully handle missing payment additional data without throwing an error</p>
<p dir="auto">Actual Behavior:<br />
The refund process crashes due to accessing a null value.</p>
<p dir="auto">Environment Details:</p>
<p dir="auto">Bagisto Version: 2.1<br />
Laravel Version: 11<br />
PHP Version: 8.0<br />
Payment Method: PayPal Smart Button</p>
<p dir="auto">Steps to Reproduce:</p>
<p dir="auto">Place an order using PayPal Smart Button<br />
Go to Admin Panel → Orders<br />
Create a refund<br />
Error appears</p>
<p dir="auto">Additional Notes:<br />
It seems that the additional field in the payment record does not always contain orderID. Please advise whether this should always be stored, or if additional validation is required before accessing it.</p>
<p dir="auto">I would appreciate your guidance on the correct handling of this case.</p>
<p dir="auto">Best regards,<br />
Ahed</p>
]]></description><link>https://forums.bagisto.com/topic/4254/refund-error-trying-to-access-array-offset-on-null-paypal-smart-button</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 17:45:01 GMT</lastBuildDate><atom:link href="https://forums.bagisto.com/topic/4254.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 10 May 2026 08:06:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Refund Error: Trying to access array offset on null (PayPal Smart Button) on Mon, 11 May 2026 13:15:24 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="https://forums.bagisto.com/uid/29209">@Zeryab</a></p>
<p dir="auto">We have already raised this issue. You can track and review it through the following link, and also share your observations there:</p>
<p dir="auto"><a href="https://github.com/bagisto/bagisto/issues/11294" rel="nofollow ugc">https://github.com/bagisto/bagisto/issues/11294</a></p>
<p dir="auto">Regards</p>
]]></description><link>https://forums.bagisto.com/post/14903</link><guid isPermaLink="true">https://forums.bagisto.com/post/14903</guid><dc:creator><![CDATA[rishabh-webkul]]></dc:creator><pubDate>Mon, 11 May 2026 13:15:24 GMT</pubDate></item></channel></rss>