Jump to content

Regiane Primoni

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Comum

About Regiane Primoni

  1. Regiane Primoni

    Integração API Cielo 3.0

    Fiz toda integração da API 3.0 da Cielo utilizando o ambiente de teste deu tudo certo, quando coloquei url e credenciais de produção retorna erro 405. O certificado + os 3 arquivos cielo estão instalados. O código: <?php $array = array( "MerchantOrderId" => "2014111703", "Payment" => array( "Type"=> "CreditCard", "Amount"=> "15700", "Installments"=> "1", "SoftDescriptor"=> "123456789ABCD", "CreditCard" => array( "CardNumber" => "4551870000000183", "Holder" => "Teste Holder", "ExpirationDate" => "10/2030", "SecurityCode" => "123", "Brand" => "Visa" ), ), ); echo $json = json_encode($array); $ch = curl_init('https://api.cieloecommerce.cielo.com.br/'); curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $json); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'MerchantId: ' . '8b08ea04-951e-414e-9541-d2d19c36fdf6', 'MerchantKey: ' . 'QJCRZAUKNODFHXBISETYIJXSTMNTAKSDVEKCISGI', 'Content-Length: ' . strlen($json)) ); $result = curl_exec ($ch); $novo = json_decode($result); echo "TID ". $novo->Payment->Tid; O erro: {"MerchantOrderId":"2014111703","Payment":{"Type":"CreditCard","Amount":"15700","Installments":"1","SoftDescriptor":"123456789ABCD","CreditCard":{"CardNumber":"4551870000000183","Holder":"Teste Holder","ExpirationDate":"10\/2030","SecurityCode":"123","Brand":"Visa"}}} Server Error 405 - HTTP verb used to access this page is not allowed. The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access. Alguem consegue me ajudar por favor
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.