I'm trying to create a sale with Cielo SDK 3.0 PHP without automatically capturing the value.
I give the value of capture
how false
However, as noted in the documentation, capture will automatically resume when the sale is created.
Object that I use in the request:
{
"serviceTaxAmount": null,
"installments": 1,
"interest": null,
"capture": false,
"authenticate": false,
"recurrent": null,
"recurrentPayment": null,
"creditCard": {
"cardNumber": null,
"holder": null,
"expirationDate": null,
"securityCode": 123,
"saveCard": false,
"brand": "Visa",
"cardToken": "f60f7790-02de-44ee-b420-10195ebd7886",
"customerName": null,
"links": null
},
"debitCard": null,
"authenticationUrl": null,
"tid": null,
"proofOfSale": null,
"authorizationCode": null,
"softDescriptor": "",
"returnUrl": null,
"provider": null,
"paymentId": null,
"type": "CreditCard",
"amount": 10,
"receivedDate": null,
"capturedAmount": null,
"capturedDate": null,
"voidedAmount": null,
"voidedDate": null,
"currency": null,
"country": null,
"returnCode": null,
"returnMessage": null,
"status": null,
"links": null,
"extraDataCollection": null,
"expirationDate": null,
"url": null,
"number": null,
"boletoNumber": null,
"barCodeNumber": null,
"digitableLine": null,
"address": null,
"assignor": null,
"demonstrative": null,
"identification": null,
"instructions": null
}
Answer:
{
"serviceTaxAmount": 0,
"installments": 1,
"interest": 0,
"capture": false,
"authenticate": false,
"recurrent": false,
"recurrentPayment": null,
"creditCard": {
"cardNumber": null,
"holder": "NOME DO DONO DO CARTÃO",
"expirationDate": null,
"securityCode": null,
"saveCard": false,
"brand": "Visa",
"cardToken": "6d3fd4e3-b9e4-4be4-9072-b6c0b3bcdc5a",
"customerName": null,
"links": {}
},
"debitCard": null,
"authenticationUrl": null,
"tid": "11022957178FAO66KLGD",
"proofOfSale": "002002",
"authorizationCode": "817837",
"softDescriptor": "",
"returnUrl": null,
"provider": "Cielo",
"paymentId": "c9c6dd85-9f33-4ced-9c88-0d836937527f",
"type": "CreditCard",
"amount": 10,
"receivedDate": "2019-11-19 17:45:46",
"capturedAmount": null,
"capturedDate": null,
"voidedAmount": null,
"voidedDate": null,
"currency": "BRL",
"country": "BRA",
"returnCode": "00",
"returnMessage": "Transacao autorizada",
"status": 1,
"links": [
{
"Method": "GET",
"Rel": "self",
"Href": "https://apiquery.cieloecommerce.cielo.com.br/1/sales/c9c6dd85-9f33-4ced-9c88-0d836937527f"
},
{
"Method": "PUT",
"Rel": "capture",
"Href": "https://api.cieloecommerce.cielo.com.br/1/sales/c9c6dd85-9f33-4ced-9c88-0d836937527f/capture"
},
{
"Method": "PUT",
"Rel": "void",
"Href": "https://api.cieloecommerce.cielo.com.br/1/sales/c9c6dd85-9f33-4ced-9c88-0d836937527f/void"
}
],
"extraDataCollection": null,
"expirationDate": null,
"url": null,
"number": null,
"boletoNumber": null,
"barCodeNumber": null,
"digitableLine": null,
"address": null,
"assignor": null,
"demonstrative": null,
"identification": null,
"instructions": null
}