Code Monkey home page Code Monkey logo

Comments (7)

gdespirito avatar gdespirito commented on May 26, 2024

¿Estás usando el CertificationBag de ambiente de desarrollo o tus certificados?

from transbank-web-services.

canizalezDaniel avatar canizalezDaniel commented on May 26, 2024

Los de ambiente de desarrollo asumo estimado, los mismos que trae el repositorio. O necesito descargar mis certificados?

from transbank-web-services.

gdespirito avatar gdespirito commented on May 26, 2024

from transbank-web-services.

canizalezDaniel avatar canizalezDaniel commented on May 26, 2024

Lo tengo en local, no se si es un problema asociado a mi entorno. Voy a montarlo en hosting y te paso la url y acceso para ver que esta pasando.

from transbank-web-services.

gdespirito avatar gdespirito commented on May 26, 2024

from transbank-web-services.

canizalezDaniel avatar canizalezDaniel commented on May 26, 2024

Estoy usando el repo de transkbank api con algunas modificaciones, esto son mis metodos:

public function initInscriptionOneClick(Request $request){

    $params=$request->all();

    if (!isset($params['email'], $params['username'])){
        return $this->errorResponse("Invalid parameters");
    }

    $username = $params['username'];
    $email = $params['email'];

    $certificationBag = CertificationBagFactory::integrationOneClick();
    $oneClick = TransbankServiceFactory::oneclick($certificationBag);
    $response = $oneClick->initInscription($username, $email, url('/api/transbank/finish'));

    echo RedirectorHelper::redirectHTML($response->urlWebpay, $response->token);
}

y el oneClickPayment

public function oneClickPayment(Request $request){

    $params=$request->all();

    /*if (!isset($params['amount'],$params['username'])){
        return $this->errorResponse("Invalid parameters");
    }*/

    $certificationBag = CertificationBagFactory::integrationOneClick();

    $oneClick = TransbankServiceFactory::oneclick($certificationBag);
    
    //$amount =intval($params['amount']);
    $tbkToken ='cbea1330-bac6-4a43-9b40-370d3126ae30';
    //$username =$params['username'];
    $buyorder = date('ymdhis') . str_pad(1, 3, '0', STR_PAD_LEFT);

    $response = $oneClick->authorize(1000, $buyorder,'username', $tbkToken);
    var_dump($response);

    return $this->successResponse($response,"Pago exitoso");

}

aca es donde está fallando:
TransbankWebService.php
metodo function callSoapMethod($method)
try{
//Call $this->getSoapClient()->$method($args[0], $arg[1]...)
$response = call_user_func_array([$this->getSoapClient(), $method], $args);
LogHandler::log($response,LoggerInterface::LEVEL_INFO, 'response_object');
} catch (\SoapFault $e) {
LogHandler::log('SOAP ERROR (' . $e->faultcode . '): ' . $e->getMessage(), LoggerInterface::LEVEL_ERROR, 'error');
throw new \SoapFault($e->faultcode, $e->faultstring);
}

from transbank-web-services.

gdespirito avatar gdespirito commented on May 26, 2024

from transbank-web-services.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.