• Resolved chrillep

    (@chrillep)


    im trying to use \Braintree_Test_Transaction::settle( $transaction_id );
    this worked in v2
    now in v3 of the plugin i get
    Xdebug: Fatal error: Uncaught Braintree\Exception\SSLCertificate: SSL certificate problem: unable to get local issuer certificate in plugins/woo-payment-gateway/Braintree/Http.php:196

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter chrillep

    (@chrillep)

    solved it by

    
    $settings     = get_option( 'woocommerce_braintree_api_settings' );
    $test_gateway = new \Braintree_TestingGateway(new \Braintree_Gateway([
        'environment' => $settings['environment'],
        'merchantId'  => $settings['sandbox_merchant_id'],
        'publicKey'   => $settings['sandbox_public_key'],
        'privateKey'  => $settings['sandbox_private_key'],
    ]));
    $test_gateway->settle( $transaction_id );
    
    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @chrillep,

    Thanks for the update. The reason your old method didn’t work is because the 3.0.0 version uses instance classes instead of setting the api settings statically.

    Kind regards,

    Thread Starter chrillep

    (@chrillep)

    yeah. thanks for the clarification =). id like to add that the method i used -> \Braintree_Test_Transaction::settle is in the braintree SDK located in the plugin.

    woo-payment-gateway/Braintree/Test/Transaction.php

    But either way i got it working.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Settle’ is closed to new replies.