Plugin Directory

Changeset 2968783


Ignore:
Timestamp:
09/19/2023 02:21:51 PM (3 years ago)
Author:
dbargain
Message:

domain registration api updated

Location:
d-bargain
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • d-bargain/tags/4.0.0/include/class-dbargain.php

    r2964146 r2968783  
    7575        $current_user_name = $current_user->first_name;
    7676        $domain = home_url('/');
     77
    7778        $xml = http_build_query(
    7879            array(
     
    8081                'domain' => $domain,
    8182                'email' => $current_user_email,
     83                'platform' => 'wordpress',
    8284            )
    8385        );
     
    8587        $add = 'api/auth/register';
    8688
    87         $url = 'https://kz3r4ehy21.execute-api.us-east-1.amazonaws.com/dev/' . $add;
     89        $url = 'https://backend.d-bargain.link/' . $add;
    8890
    8991        $ch = curl_init($url);
     
    9395        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    9496
    95         curl_exec($ch);
     97        $resultt = curl_exec($ch);
    9698
    9799        curl_close($ch);
     100        $responset = json_decode($resultt, true);
     101
     102
     103       
    98104        $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    99105        $dbargain_session_id = '';
    100 
    101106
    102107        if (get_option('dbargain_session_id')) {
     
    108113            add_option('dbargain_session_id', $dbargain_session_id);
    109114        }
    110 
    111115
    112116        $xml1 = http_build_query(
     
    195199                    $data = http_build_query(['order_data' => ['session_id' => $_SESSION['dbargain'][$item['product_id']]['session_id'], 'order_id' => $order_id, 'product_id' => $item['product_id'], 'final_price' => $_SESSION['dbargain'][$item['product_id']]['dbargain_price'], 'status' => 1]]);
    196200                    $add = 'api/order/store';
    197                     $url = 'https://kz3r4ehy21.execute-api.us-east-1.amazonaws.com/dev/' . $add;
     201                    $url = 'https://backend.d-bargain.link/' . $add;
    198202                    $curl = curl_init();
    199203                    curl_setopt($curl, CURLOPT_POST, 1);
     
    9971001        $data = http_build_query(array('domain' => $domain));
    9981002        $add = 'api/auth/login';
    999         $url = 'https://kz3r4ehy21.execute-api.us-east-1.amazonaws.com/dev/' . $add;
     1003        $url = 'https://backend.d-bargain.link/' . $add;
    10001004        $ch = curl_init($url);
    10011005
  • d-bargain/trunk/include/class-dbargain.php

    r2964146 r2968783  
    7575        $current_user_name = $current_user->first_name;
    7676        $domain = home_url('/');
     77
    7778        $xml = http_build_query(
    7879            array(
     
    8081                'domain' => $domain,
    8182                'email' => $current_user_email,
     83                'platform' => 'wordpress',
    8284            )
    8385        );
     
    8587        $add = 'api/auth/register';
    8688
    87         $url = 'https://kz3r4ehy21.execute-api.us-east-1.amazonaws.com/dev/' . $add;
     89        $url = 'https://backend.d-bargain.link/' . $add;
    8890
    8991        $ch = curl_init($url);
     
    9395        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    9496
    95         curl_exec($ch);
     97        $resultt = curl_exec($ch);
    9698
    9799        curl_close($ch);
     100        $responset = json_decode($resultt, true);
     101
     102
     103       
    98104        $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    99105        $dbargain_session_id = '';
    100 
    101106
    102107        if (get_option('dbargain_session_id')) {
     
    108113            add_option('dbargain_session_id', $dbargain_session_id);
    109114        }
    110 
    111115
    112116        $xml1 = http_build_query(
     
    195199                    $data = http_build_query(['order_data' => ['session_id' => $_SESSION['dbargain'][$item['product_id']]['session_id'], 'order_id' => $order_id, 'product_id' => $item['product_id'], 'final_price' => $_SESSION['dbargain'][$item['product_id']]['dbargain_price'], 'status' => 1]]);
    196200                    $add = 'api/order/store';
    197                     $url = 'https://kz3r4ehy21.execute-api.us-east-1.amazonaws.com/dev/' . $add;
     201                    $url = 'https://backend.d-bargain.link/' . $add;
    198202                    $curl = curl_init();
    199203                    curl_setopt($curl, CURLOPT_POST, 1);
     
    9971001        $data = http_build_query(array('domain' => $domain));
    9981002        $add = 'api/auth/login';
    999         $url = 'https://kz3r4ehy21.execute-api.us-east-1.amazonaws.com/dev/' . $add;
     1003        $url = 'https://backend.d-bargain.link/' . $add;
    10001004        $ch = curl_init($url);
    10011005
Note: See TracChangeset for help on using the changeset viewer.