Plugin Directory

Changeset 2289637


Ignore:
Timestamp:
04/22/2020 09:32:45 PM (6 years ago)
Author:
postpay
Message:

v0.1.4

Location:
postpay
Files:
6 edited
21 copied

Legend:

Unmodified
Added
Removed
  • postpay/tags/0.1.4/includes/request/class-wc-postpay-request-checkout.php

    r2267104 r2289637  
    3030        $order = wc_get_order( $order_id );
    3131
    32         if ( is_user_logged_in() ) {
    33             $customer = WC_Postpay_Request_Customer::build( $order->get_user_id() );
    34         } else {
    35             $customer = WC_Postpay_Request_Guest::build( $order );
    36         }
    37 
    38         return array(
     32        $data = array(
    3933            'order_id'        => $order_id . '-' . uniqid(),
    4034            'total_amount'    => WC_Postpay_Adapter::decimal( $order->get_total() ),
    4135            'tax_amount'      => WC_Postpay_Adapter::decimal( $order->get_total_tax() ),
    4236            'currency'        => $order->get_currency(),
    43             'shipping'        => WC_Postpay_Request_Shipping::build( $order ),
    4437            'billing_address' => WC_Postpay_Request_Address::build( $order->get_address( 'billing' ) ),
    4538            'customer'        => $customer,
     
    6053            'metadata'        => WC_Postpay_Request_Metadata::build(),
    6154        );
     55
     56        if ( is_user_logged_in() ) {
     57            $data['customer'] = WC_Postpay_Request_Customer::build( $order->get_user_id() );
     58        } else {
     59            $data['customer'] = WC_Postpay_Request_Guest::build( $order );
     60        }
     61
     62        if ( $order->get_shipping_method() ) {
     63            $data['shipping'] = WC_Postpay_Request_Shipping::build( $order );
     64        }
     65
     66        return $data;
    6267    }
    6368
  • postpay/tags/0.1.4/includes/wc-postpay-settings.php

    r2287781 r2289637  
    4848        'desc_tip'    => true,
    4949    ),
    50     'testmode'           => array(
     50    'sandbox'            => array(
    5151        'title'       => __( 'Postpay Sandbox', 'postpay' ),
    5252        'type'        => 'checkbox',
  • postpay/tags/0.1.4/languages/postpay.pot

    r2287781 r2289637  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.3\n"
     5"Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.4\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • postpay/tags/0.1.4/postpay.php

    r2287781 r2289637  
    22/**
    33 * Plugin Name: WooCommerce Postpay Payment Gateway
    4  * Version: 0.1.3
     4 * Version: 0.1.4
    55 * Plugin URI: https://github.com/postpayio/woocommerce
    66 * Description: Buy now and pay later with zero interest and zero fees.
  • postpay/tags/0.1.4/readme.txt

    r2287781 r2289637  
    7373== Changelog ==
    7474
     75= 0.1.4 - 2020-04-23 =
     76* Fixed sandbox setting name
     77* Allowed empty shipping method
     78
    7579= 0.1.3 - 2020-04-21 =
    7680* Added max amount and min amount settings
  • postpay/trunk/includes/request/class-wc-postpay-request-checkout.php

    r2267104 r2289637  
    3030        $order = wc_get_order( $order_id );
    3131
    32         if ( is_user_logged_in() ) {
    33             $customer = WC_Postpay_Request_Customer::build( $order->get_user_id() );
    34         } else {
    35             $customer = WC_Postpay_Request_Guest::build( $order );
    36         }
    37 
    38         return array(
     32        $data = array(
    3933            'order_id'        => $order_id . '-' . uniqid(),
    4034            'total_amount'    => WC_Postpay_Adapter::decimal( $order->get_total() ),
    4135            'tax_amount'      => WC_Postpay_Adapter::decimal( $order->get_total_tax() ),
    4236            'currency'        => $order->get_currency(),
    43             'shipping'        => WC_Postpay_Request_Shipping::build( $order ),
    4437            'billing_address' => WC_Postpay_Request_Address::build( $order->get_address( 'billing' ) ),
    4538            'customer'        => $customer,
     
    6053            'metadata'        => WC_Postpay_Request_Metadata::build(),
    6154        );
     55
     56        if ( is_user_logged_in() ) {
     57            $data['customer'] = WC_Postpay_Request_Customer::build( $order->get_user_id() );
     58        } else {
     59            $data['customer'] = WC_Postpay_Request_Guest::build( $order );
     60        }
     61
     62        if ( $order->get_shipping_method() ) {
     63            $data['shipping'] = WC_Postpay_Request_Shipping::build( $order );
     64        }
     65
     66        return $data;
    6267    }
    6368
  • postpay/trunk/includes/wc-postpay-settings.php

    r2287781 r2289637  
    4848        'desc_tip'    => true,
    4949    ),
    50     'testmode'           => array(
     50    'sandbox'            => array(
    5151        'title'       => __( 'Postpay Sandbox', 'postpay' ),
    5252        'type'        => 'checkbox',
  • postpay/trunk/languages/postpay.pot

    r2287781 r2289637  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.3\n"
     5"Project-Id-Version: WooCommerce Postpay Payment Gateway 0.1.4\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/postpay\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • postpay/trunk/postpay.php

    r2287781 r2289637  
    22/**
    33 * Plugin Name: WooCommerce Postpay Payment Gateway
    4  * Version: 0.1.3
     4 * Version: 0.1.4
    55 * Plugin URI: https://github.com/postpayio/woocommerce
    66 * Description: Buy now and pay later with zero interest and zero fees.
  • postpay/trunk/readme.txt

    r2287781 r2289637  
    7373== Changelog ==
    7474
     75= 0.1.4 - 2020-04-23 =
     76* Fixed sandbox setting name
     77* Allowed empty shipping method
     78
    7579= 0.1.3 - 2020-04-21 =
    7680* Added max amount and min amount settings
Note: See TracChangeset for help on using the changeset viewer.