konduto / php-sdk Goto Github PK
View Code? Open in Web Editor NEWKonduto PHP SDK
Home Page: https://www.konduto.com
License: MIT License
Konduto PHP SDK
Home Page: https://www.konduto.com
License: MIT License
In Address Model the function setName are setting the wrong attribute.
public function setName($value) {
$this->set("zip", $value);
}
Instead
public function setName($value) {
$this->set("name", $value);
}
SDK does not support newer events fields in orders API yet.
Here's an example of an order with the events field that can be provided using POST /v1/orders
.
{
"id": "Pedido000005",
"total_amount": 123.45,
"shipping_amount": 10.01,
"tax_amount": 0.01,
"installments": 2,
"ip": "123.123.123.123",
"currency": "BRL",
"payment": [
{
"type": "credit",
"sha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"bin": "490172",
"last4": "1234",
"expiration_date": "92017",
"cvv_result": "A",
"avs_result": "X",
"status": "approved",
"number_of_retries": 1,
"amount": 123.45,
"description": "pagamento via cartão de crédito"
}
],
"customer": {
"id": "2937293",
"name": "Fulano's de Tal",
"tax_id": "283938282893",
"phone1": "+551112344321",
"email": "[email protected]",
"dob": "1970-02-02"
},
"events": [
{
"name": "Safadão no Maracanã",
"date": "2021-01-01T03:00:00Z",
"type": "show",
"subtype": "sertanejo",
"venue": {
"name": "Estádio do Maracanã",
"capacity": 80000,
"address": "Av. Maracanã s/n",
"city": "Rio de Janeiro",
"state": "RJ",
"country": "BR"
},
"tickets": [
{
"category": "regular",
"premium": true,
"section": "Pista Premium",
"attendee": {
"document": "12345678900",
"document_type": "cpf",
"dob": "1990-10-28"
}
},
{
"category": "student",
"premium": false
}
]
},
{
"name": "Heat @ Knicks",
"date": "2020-11-21T01:00:00Z",
"type": "sports",
"subtype": "NBA",
"tickets": [
{
"category": "regular",
"premium": true,
"section": "general"
},
{
"category": "regular",
"section": "general",
"premium": true
}
]
}
]
}
boa noite!
Estou tentando setar o Payment para o objeto Order. No entanto, está sendo retornado para sempre a seguinte mensagem: "send orderArray ( [status] => error [message] => stdClass Object ( [where] => /payment [why] => stdClass Object ( [expected] => Array ( [0] => array ) [found] => object ) ) ) "
Estou setando um array no método setPayment da Order. Segue o código:
$orderKonduto = new Models\Order();
$paymentKonduto = array(
"type" => Models\Payment::TYPE_CREDIT,
"bin" => substr($payment["credit_card_number"], 0, 6), // 6 primeiros digitos do cartao de credito
"last4" => substr($payment["credit_card_number"], strlen($payment["credit_card_number"]) - 4, strlen($payment["credit_card_number"])),
"expiration_date" => $ed_month.$ed_year
);
$orderKonduto->setPayment($paymentKonduto);
A mensagem diz que estou setando um objeto, mas estou setando um array mesmo.
There's a possible error in Order.php model.
When the returned object from request call "toJsonArray" data of score, recomendation and device are lost in conversion.
Hi guys, I found an issue here.
Class 'Konduto\Models\BusTravelLeg' not found in /var/www/brazil/vendor/konduto/sdk/src/Models/Model.php
When it tries instantiate the BusTravelLeg, it doesn't works, because the autoload is seeking for a BusTravelLeg file to be included.
Regards,
https://github.com/konduto/php-sdk/blob/master/src/Exceptions/KondutoSDKError.php
I think this is not used and are with conflict.
Theres an Exception in file HttpResponse.php that not exist.
file: HttpResponse.php
Line: 36
exception: CommunicationErrorException
Exception file name:
CommunicationError.php
SDK does not support newer vehicle
fields in orders API yet.
Here's an example of an order with the vehicle
field that can be provided by POST /v1/orders
.
{
"id": "Pedido000001",
"visitor": "1234567890123456789012345678901234567890",
"total_amount": 123.45,
"shipping_amount": 10.01,
"tax_amount": 0.01,
"installments": 2,
"ip": "123.123.123.123",
"currency": "BRL",
"customer": {
"id": "2937593",
"name": "Fulano's de Tal",
"tax_id": "283938282893",
"phone1": "+551112344321",
"email": "[email protected]",
"dob": "1970-02-02"
},
"payment": [
{
"type": "credit",
"bin": "490172",
"last4": "1234",
"expiration_date": "92017"
}
],
"vehicle": {
"make": "Fiat",
"model": "Palio",
"renavam": "12593696135",
"registration": "ABC1234",
"owner": {
"name": "Alfredo",
"tax_id": "12345678900"
},
"type": "car"
}
}
Fatal error: Undefined constant 'Konduto\Models\STATUS_APPROVED' in /app/vendor/konduto/sdk/src/Core/Konduto.php on line 144
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.