Plugin Directory

Changeset 3426123


Ignore:
Timestamp:
12/23/2025 11:03:54 AM (3 months ago)
Author:
stitchexpress
Message:

1.3.2

Location:
stitch-express
Files:
5 edited
6 copied

Legend:

Unmodified
Added
Removed
  • stitch-express/tags/1.3.0/readme.txt

    r3241711 r3426123  
    3737* 2% on Capitec Pay transactions*
    3838
    39 For customers who transact more than R100K per month, we offer custom pricing. Please contact jayde@stitch.money to discuss this.
     39For customers who transact more than R100K per month, we offer custom pricing. Please contact express-support@stitch.money to discuss this.
    4040
    4141*All pricing is VAT exclusive
  • stitch-express/tags/1.3.1/readme.txt

    r3386994 r3426123  
    3737* 2% on Capitec Pay transactions*
    3838
    39 For customers who transact more than R100K per month, we offer custom pricing. Please contact jayde@stitch.money to discuss this.
     39For customers who transact more than R100K per month, we offer custom pricing. Please contact express-support@stitch.money to discuss this.
    4040
    4141*All pricing is VAT exclusive
  • stitch-express/tags/1.3.2/includes/stitch-express-client.php

    r3386994 r3426123  
    3838
    3939class Stitch_Express_Client {
     40    private const PLUGIN_VERSION = '1.3.2';
    4041    private string $baseUrl = 'https://express.stitch.money';
    4142    private string $client_id;
     
    5152     * @throws Stitch_Express_Failed_Authentication_Exception
    5253     */
    53     public function get_payment_status(string $payment_id): ?string {
    54         $response = $this->make_request('/api/v1/payments/'.$payment_id, 'GET');
     54    public function get_payment_status(string $payment_id, ?string $merchant_reference = null): ?string {
     55        $path = '/api/v1/payments/'.$payment_id;
     56        if ($merchant_reference !== null) {
     57            $path .= '?merchantReference='.urlencode($merchant_reference);
     58        }
     59
     60        $response = $this->make_request($path, 'GET');
    5561
    5662        if ($response->status_code === 404) {
     
    132138        bool $withToken = true
    133139    ): Stitch_Express_Response {
    134         $headers = ['Content-Type' => 'application/json', 'X-IS-WC' => 'true'];
     140        $headers = [
     141            'Content-Type' => 'application/json',
     142            'X-IS-WC' => 'true',
     143            'X-Stitch-Express-WC-Plugin-Version' => self::PLUGIN_VERSION,
     144        ];
    135145
    136146        if ($withToken) {
  • stitch-express/tags/1.3.2/readme.txt

    r3386994 r3426123  
    33Tags: woocommerce, card, payments, south africa, apple pay, google pay, stitch, express, stitch express
    44Tested up to: 6.7
    5 Stable tag: 1.3.1
     5Stable tag: 1.3.2
    66License: GPLv3
    77License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    3737* 2% on Capitec Pay transactions*
    3838
    39 For customers who transact more than R100K per month, we offer custom pricing. Please contact jayde@stitch.money to discuss this.
     39For customers who transact more than R100K per month, we offer custom pricing. Please contact express-support@stitch.money to discuss this.
    4040
    4141*All pricing is VAT exclusive
     
    8383
    8484== Changelog ==
     85= 1.3.2 =
     86* Minor improvements
     87
    8588= 1.3.1 =
    8689* Minor improvements
     
    155158
    156159== Upgrade Notice ==
     160= 1.3.2 =
     161* Minor improvements
     162
    157163= 1.3.1 =
    158164* Minor improvements
  • stitch-express/tags/1.3.2/stitch-express.php

    r3386994 r3426123  
    99 * Description:          Use Stitch Express to easily and securely accept Card payment on your WooCommerce store.
    1010 * Plugin URI:           https://wordpress.org/plugins/stitchexpress/
    11  * Version:              1.3.1
     11 * Version:              1.3.2
    1212 * Requires at least:    6.5
    1313 * Requires PHP:         8.0
     
    9191
    9292    try {
    93         $payment_status = $stitch_express_client->get_payment_status($payment_id);
     93        $payment_status = $stitch_express_client->get_payment_status($payment_id, $reference);
    9494    } catch (Exception $exception) {
    9595        $logger->error($exception, ['source' => 'stitch-express']);
    9696        wc_add_notice('Failed to check status of your payment. Please contact the store.', 'error');
     97
     98        return stitch_express_generate_webhook_response($order->get_view_order_url());
     99    }
     100
     101    if ($payment_status === null) {
     102        $logger->error("Payment link not found for payment ID: {$payment_id} and reference: {$reference}", ['source' => 'stitch-express']);
     103        wc_add_notice('Payment not found', 'error');
    97104
    98105        return stitch_express_generate_webhook_response($order->get_view_order_url());
  • stitch-express/trunk/includes/stitch-express-client.php

    r3386994 r3426123  
    3838
    3939class Stitch_Express_Client {
     40    private const PLUGIN_VERSION = '1.3.2';
    4041    private string $baseUrl = 'https://express.stitch.money';
    4142    private string $client_id;
     
    5152     * @throws Stitch_Express_Failed_Authentication_Exception
    5253     */
    53     public function get_payment_status(string $payment_id): ?string {
    54         $response = $this->make_request('/api/v1/payments/'.$payment_id, 'GET');
     54    public function get_payment_status(string $payment_id, ?string $merchant_reference = null): ?string {
     55        $path = '/api/v1/payments/'.$payment_id;
     56        if ($merchant_reference !== null) {
     57            $path .= '?merchantReference='.urlencode($merchant_reference);
     58        }
     59
     60        $response = $this->make_request($path, 'GET');
    5561
    5662        if ($response->status_code === 404) {
     
    132138        bool $withToken = true
    133139    ): Stitch_Express_Response {
    134         $headers = ['Content-Type' => 'application/json', 'X-IS-WC' => 'true'];
     140        $headers = [
     141            'Content-Type' => 'application/json',
     142            'X-IS-WC' => 'true',
     143            'X-Stitch-Express-WC-Plugin-Version' => self::PLUGIN_VERSION,
     144        ];
    135145
    136146        if ($withToken) {
  • stitch-express/trunk/readme.txt

    r3386994 r3426123  
    33Tags: woocommerce, card, payments, south africa, apple pay, google pay, stitch, express, stitch express
    44Tested up to: 6.7
    5 Stable tag: 1.3.1
     5Stable tag: 1.3.2
    66License: GPLv3
    77License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    3737* 2% on Capitec Pay transactions*
    3838
    39 For customers who transact more than R100K per month, we offer custom pricing. Please contact jayde@stitch.money to discuss this.
     39For customers who transact more than R100K per month, we offer custom pricing. Please contact express-support@stitch.money to discuss this.
    4040
    4141*All pricing is VAT exclusive
     
    8383
    8484== Changelog ==
     85= 1.3.2 =
     86* Minor improvements
     87
    8588= 1.3.1 =
    8689* Minor improvements
     
    155158
    156159== Upgrade Notice ==
     160= 1.3.2 =
     161* Minor improvements
     162
    157163= 1.3.1 =
    158164* Minor improvements
  • stitch-express/trunk/stitch-express.php

    r3386994 r3426123  
    99 * Description:          Use Stitch Express to easily and securely accept Card payment on your WooCommerce store.
    1010 * Plugin URI:           https://wordpress.org/plugins/stitchexpress/
    11  * Version:              1.3.1
     11 * Version:              1.3.2
    1212 * Requires at least:    6.5
    1313 * Requires PHP:         8.0
     
    9191
    9292    try {
    93         $payment_status = $stitch_express_client->get_payment_status($payment_id);
     93        $payment_status = $stitch_express_client->get_payment_status($payment_id, $reference);
    9494    } catch (Exception $exception) {
    9595        $logger->error($exception, ['source' => 'stitch-express']);
    9696        wc_add_notice('Failed to check status of your payment. Please contact the store.', 'error');
     97
     98        return stitch_express_generate_webhook_response($order->get_view_order_url());
     99    }
     100
     101    if ($payment_status === null) {
     102        $logger->error("Payment link not found for payment ID: {$payment_id} and reference: {$reference}", ['source' => 'stitch-express']);
     103        wc_add_notice('Payment not found', 'error');
    97104
    98105        return stitch_express_generate_webhook_response($order->get_view_order_url());
Note: See TracChangeset for help on using the changeset viewer.