Git Product home page Git Product logo

checkout-transparente's People

Contributors

lamaralmp avatar lucaskewin avatar

Stargazers

 avatar  avatar

checkout-transparente's Issues

Erro 17 - invalid credentials #233

Criei um checkout personalizado que interage com a API do mercado pago vi SDK php.
Para isto, criei 2 usuários de teste (vendedor e comprador) , e estou usando o token de teste do vendedor para fazer a conexão com a API. Entretanto, quando envio um pagamento, tenho um retorno do objeto com o seguinte erro:

17 - Invalid credentials. Segue abaixo script que recebe os dados do formulario e se faz o envio dos dados:

require_once 'vendor/autoload.php';
//token do usuario de teste
MercadoPago\SDK::setAccessToken("TEST-6801982578233727-111918-fea7e708ea07dddf3f681204a6ec74ae-491086120");

$email = "[email protected]"; //email do comprador

$payment = new MercadoPago\Payment();
$payment->transaction_amount = round((float)$_REQUEST['amount'],2);
$payment->token = $_REQUEST['token'];
$payment->description = $_REQUEST['description'];
$payment->installments = (int)$_REQUEST['installmentsOption'];
$payment->payment_method_id = $_REQUEST['paymentMethodId'];
$payment->payer = array("email" => $_REQUEST['email']);
// $payment->payer = array("email" => $email);

// e("payment:");
// e($payment);

$payment->save();

print_r($payment);

Pode me ajudar a resolver isto?

Grato

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.