Plugin Directory

Changeset 3399534


Ignore:
Timestamp:
11/20/2025 08:46:48 AM (5 months ago)
Author:
maalypay
Message:

feat: update callback url

Location:
maaly-pay/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • maaly-pay/trunk/includes/class-maaly-pay-gateway.php

    r3399516 r3399534  
    6868        $amount = $order->get_total();
    6969        $merchantTxId = 'order-' . $order_id . '-' . time();
    70         $callback_url = add_query_arg('wc-api', 'maaly_callback', home_url('/'));
     70        $callback_url = add_query_arg('merchantTxId', $merchantTxId, home_url('/'));
    7171
    7272        if (empty($api_key) || empty($merchantId)) {
  • maaly-pay/trunk/maaly-pay.php

    r3399516 r3399534  
    186186// -----------------------------------------------------------------------------
    187187add_action('woocommerce_api_maaly_callback', function () {
    188     $input = file_get_contents('php://input');
    189     $data = json_decode($input, true);
    190     if (!is_array($data)) {
    191         $data = $_POST;
    192     }
     188    $data = $_GET;
    193189
    194190    $merchantTxId = isset($data['merchantTxId'])
Note: See TracChangeset for help on using the changeset viewer.