Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove OCBC PAO. #449

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion includes/class-omise-payment-factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class Omise_Payment_Factory {
'Omise_Payment_Kakaopay',
'Omise_Payment_TouchNGo',
'Omise_Payment_RabbitLinePay',
'Omise_Payment_OCBC_PAO',
'Omise_Payment_OCBC_Digital',
'Omise_Payment_GrabPay',
'Omise_Payment_GooglePay',
Expand Down
27 changes: 0 additions & 27 deletions includes/class-omise-rest-webhooks-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ class Omise_Rest_Webhooks_Controller {
*/
const PAYNOW_CHARGE_STATUS_ENDPOINT = 'paynow-payment-status';

/**
* @var string
*/
const OCBC_PAO_CALLBACK_ENDPOINT = 'ocbc-pao-callback';

/**
* @var string
*/
Expand Down Expand Up @@ -56,16 +51,6 @@ public function register_routes() {
'permission_callback' => self::RETURN_TRUE
)
);

register_rest_route(
self::ENDPOINT_NAMESPACE,
'/' . self::OCBC_PAO_CALLBACK_ENDPOINT . '/(?P<order_id>\d+)',
array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this, 'callback_ocbc_pao_callback' ),
'permission_callback' => self::RETURN_TRUE
)
);
}

/**
Expand Down Expand Up @@ -106,16 +91,4 @@ public function callback_paynow_payment_status($request) {
}
return rest_ensure_response( $data );
}

/**
* @param WP_REST_Request $request
*
* @return WP_Error|WP_REST_Response
*/
public function callback_ocbc_pao_callback($request) {
$order_id = $request->get_param('order_id');
$url = add_query_arg('order_id', $order_id, home_url('wc-api/omise_ocbc_pao_callback'));
wp_redirect($url);
exit();
}
}
3 changes: 1 addition & 2 deletions includes/gateway/class-omise-payment-mobilebanking.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ public function charge($order_id, $order)
* @return array|false
*/
public function is_capability_support( $available_payment_methods ) {
//filter ocbc pao out bc is no longer mobile banking payments
return preg_grep('/^mobile_banking_(?!ocbc_pao)/', $available_payment_methods);
return preg_grep('/^mobile_banking_/', $available_payment_methods);
}
}
81 changes: 0 additions & 81 deletions includes/gateway/class-omise-payment-ocbc-pao.php

This file was deleted.

2 changes: 1 addition & 1 deletion includes/libraries/omise-plugin/helpers/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static function validate_request($order_token = null)
{
$token = isset($_GET['token']) ? sanitize_text_field($_GET['token']) : null;

// For all payment except offline and OCBC PAO.
// For all payment except offline
if ($token) {
return $token === $order_token;
}
Expand Down
1 change: 0 additions & 1 deletion omise-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ private function include_classes()
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-rabbit-linepay.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-googlepay.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-grabpay.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-ocbc-pao.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-ocbc-digital.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-boost.php';
require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-duitnow-obw.php';
Expand Down
34 changes: 0 additions & 34 deletions tests/unit/includes/gateway/class-omise-payment-ocbc-pao-test.php

This file was deleted.

Loading