Plugin Directory

Changeset 2177299


Ignore:
Timestamp:
10/22/2019 07:44:21 AM (6 years ago)
Author:
spektrainc
Message:

Updated checkout page

Location:
spektra/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • spektra/trunk/readme.txt

    r2170429 r2177299  
    6262* Initial version.
    6363
     64= 1.0.2 =
     65* Updated checkout
     66
    6467== Upgrade Notice ==
    6568
     
    6770No upgrade needed, this is the initial version
    6871
     72= 1.0.1 =
     73Update checkout page
     74
    6975
    7076== Arbitrary section ==
    7177
    72 This plugin sends requests to https://api.spektra.co for production mode and https://api-test.spektra.co for test mode.
    73 The response received loads the checkout form to complete payment request to Spektra.
     78This plugin sends requests to https://api.spektra.co for production mode and https://api-test.spektra.co for test mode, for authentication and obtaining the checkout ID.
     79The response received redirects the user to https://checkout.spektra.co/{checkout-id} for production mode and https://demo-checkout.spektra.co/{checkout-id} for test mode.
     80The user completes the payment from this page.
     81
     82
  • spektra/trunk/spektra-wc-gatway.php

    r2170403 r2177299  
    6666                if ($this->livemode) {
    6767                    $this->urlprefix = 'https://api.spektra.co/';
     68                    $this->checkoutUrl = 'https://checkout.spektra.co/';
    6869                } else {
    6970                    $this->urlprefix = 'https://api-test.spektra.co/';
     71                    $this->checkoutUrl = 'https://demo-checkout.spektra.co/';
    7072                }
    7173           
    7274                add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
    73                 add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );
     75                // add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );
    7476                add_action('woocommerce_thankyou', array($this,'spektra_payment_complete'), 10, 1);
    7577                add_action('woocommerce_cancelled_order', array($this,'spektra_payment_cancelled'), 10, 1);
     
    259261                   
    260262                    return array(
    261                         'result'    => 'success',
     263                        'result'   => 'success',
    262264                        'checkout_id' => $chekout->checkoutID,
    263265                        'cancel_url' => $cancelUrl,
     266                        'redirect' => $this->checkoutUrl . $chekout->checkoutID,
    264267                    );
    265268                }
Note: See TracChangeset for help on using the changeset viewer.