Skip to content

Conversation

@gertrude-paystack
Copy link
Contributor

  • Updated from Paystack v1 to v2
  • Added RequireJS configuration for external script loading
  • Fixed PHP 8.3 compatibility issues
  • Improved payment verification for inline mode
  • Update CSP configuration

- Upgrade from Paystack v1 to v2 JavaScript API
  * Update to https://js.paystack.co/v2/inline.js
  * Migrate from PaystackPop.setup() to new PaystackPop().newTransaction()
  * Update callbacks: callback→onSuccess, onClose→onCancel

- Add RequireJS configuration for external script loading
  * Create view/frontend/requirejs-config.js to load Paystack v2 CDN script
  * Add 'paystack' as RequireJS dependency in payment renderer

- Fix PHP 8.3 compatibility
  * Update vendor/yabacon/paystack-php Router.php: get_class() → get_class($this)
  * Fix protected property access in Controller/Payment/Setup.php

- Improve payment verification for inline mode
  * Update Model/PaymentManagement.php to return consistent response format
  * Handle double-encoded JSON responses in verification callback
  * Add proper error handling with try-catch for JSON parsing

- Update CSP configuration
  * Add Paystack domains to csp_whitelist.xml (js.paystack.co, api.paystack.co)
  * Add plugin-tracker.paystackintegrations.com for analytics
  * Remove insecure csp_mode.xml file

- Use modern jQuery methods
  * Replace deprecated .success() with .done()
  * Add .fail() handler for AJAX error handling

Both integration modes (inline popup and standard redirect) now fully functional with v2 API.
Update yabacon/paystack-php to version v2.2.0
updated version from 2.4.1 to 2.5.0
Update module version to 2.0.0
@gertrude-paystack gertrude-paystack merged commit d5dd77a into master Nov 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants