File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,11 +15,12 @@ public function __construct() {
1515
1616 public function execute (\Magento \Framework \Event \Observer $ observer )
1717 {
18- //Observer execution code...
1918 /** @var \Magento\Sales\Model\Order $order **/
2019 $ order = $ observer ->getEvent ()->getOrder ();
21-
22- if ($ order ) {
20+
21+ if ($ order && $ order ->getPayment ()
22+ && $ order ->getPayment ()->getMethod () === \Pstk \Paystack \Model \Payment \Paystack::CODE
23+ ) {
2324 $ order ->setCanSendNewEmailFlag (false )
2425 ->setCustomerNoteNotify (false );
2526 }
Original file line number Diff line number Diff line change 44 <!-- API -->
55 <preference for =" Pstk\Paystack\Api\PaymentManagementInterface" type =" Pstk\Paystack\Model\PaymentManagement" />
66
7- <!-- CSP: register Paystack domains via PHP collector (backward-compatible across Magento versions) -->
8- <type name =" Magento\Csp\Model\CompositePolicyCollector" >
9- <arguments >
10- <argument name =" collectors" xsi : type =" array" >
11- <item name =" pstk-paystack-csp" xsi : type =" object" sortOrder =" 10" >Pstk\Paystack\Model\CspPolicyCollector</item >
12- </argument >
13- </arguments >
14- </type >
157
168</config >
Original file line number Diff line number Diff line change 1010 <type name =" Magento\Framework\App\Request\CsrfValidator" >
1111 <plugin name =" csrf_validator_skip" type =" Pstk\Paystack\Plugin\CsrfValidatorSkip" />
1212 </type >
13+
14+ <!-- CSP: register Paystack domains via PHP collector (frontend only - Paystack is not used in admin) -->
15+ <type name =" Magento\Csp\Model\CompositePolicyCollector" >
16+ <arguments >
17+ <argument name =" collectors" xsi : type =" array" >
18+ <item name =" pstk-paystack-csp" xsi : type =" object" >Pstk\Paystack\Model\CspPolicyCollector</item >
19+ </argument >
20+ </arguments >
21+ </type >
1322</config >
File renamed without changes.
You can’t perform that action at this time.
0 commit comments