?php /* * Plugin Name: B2PAY.IO WooCommerce Payment Gateway * Plugin URI: https://eesoftwares.com/ * Description: A custom payment gateway integration for B2PAY.IO in WooCommerce. * Version: 1.0 * Author: Your Name * Author URI: https://eesoftwares.com/ * License: GPL-2.0+ */ // Hook to add our payment gateway add_filter('woocommerce_payment_gateways', 'b2pay_add_gateway_class'); function b2pay_add_gateway_class($gateways) { $gateways[] = 'WC_B2PAY_Gateway'; return $gateways; } // Register our custom gateway class add_action('plugins_loaded', 'b2pay_init_gateway_class'); function b2pay_init_gateway_class() { class WC_B2PAY_Gateway extends WC_Payment_Gateway { public function __construct() { $this->id = 'b2pay'; $this->icon = ''; // URL for custom payment icon $this->has_fields = true; $this->method_title = 'B2PAY.IO'; $this->method_description = 'Pay securely via B2PAY.IO.'; // Load the settings $this->init_form_fields(); $this->init_settings(); $this->title = $this->get_option('title'); $this->description = $this->get_option('description'); $this->enabled = $this->get_option('enabled'); // Hooks add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options')); } // Initialize form fields public function init_form_fields() { $this->form_fields = array( 'enabled' => array( 'title' => 'Enable/Disable', 'type' => 'checkbox', 'label' => 'Enable B2PAY.IO Payment', 'default' => 'yes' ), 'title' => array( 'title' => 'Title', 'type' => 'text', 'default' => 'B2PAY.IO' ), 'description' => array( 'title' => 'Description', 'type' => 'textarea', 'default' => 'Pay securely using B2PAY.IO payment gateway.' ) ); } // Process payment public function process_payment($order_id) { $order = wc_get_order($order_id); // Insert the API call to B2PAY.IO here, using the script from the PDF. // After the payment is successful, you can update the order status like this: $order->payment_complete(); $order->add_order_note('B2PAY.IO payment successful.'); // Return success and redirect to thank you page return array( 'result' => 'success', 'redirect' => $this->get_return_url($order) ); } } } ?> Cloanto Amiga Forever 2024 Plus Edition Full Version for Windows - EESOFTWARES

Cloanto Amiga Forever 2024 Plus Edition Full Version for Windows

Original price was: £39.99.Current price is: £12.99.

  • Full Version Software
  • ONE-TIME Purchase
  • Unlimited PC Installation
  • Instant Delivery
  • Multilingual Version
  • No Extra Payment or Subscription
  • if you receive any problem contact us via Chat
SKU: A000123 Category:
YOUR CART
  • No products in the cart.
Select your currency
Home
Account
Cart
Wishlist