This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Conta Criada em: 2022-01-10 11:49:08 | |
Cadastro completo em: 2022-01-10 11:56:01 | |
Cadastro completo IP: 187.19.254.34 | |
Nome: RODRIGO COSTA | |
Telefone: (83) 99810-4836 | |
E-mail: anjospks@gmail.com | |
CPF: 00762131101 | |
Endereço: Travessa 19 de agosto, 130, Jardim Maria Estela, São Paulo - SP, 04180-112 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can use throw new Error() normally | |
throw new Error('My error message'); | |
You can give a id to the error like so | |
let error = new Error('My error message'); | |
error.name = 'my_error_id'; | |
throw error; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error Handling | |
The pattern of error return is: | |
{ | |
status: 500, | |
errors: [ | |
{ message: '......' }, //message will always be present | |
{ message: '......', id: '...' } //id may not always be present so check the existence before usage | |
{ message: '......', id: '...', stack_trace: '' } //its used for exception stack trace on dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function cardLinkHolder($userWalletCard, $user, $token) { | |
$toolsSvc = $this->sc->get('tools'); | |
$userWalletCardSvc = $this->sc->get('rp_user_wallet_card'); | |
$userBirthdate = $user->getBirthdate(); | |
$userGender = $user->getGender(); | |
if($userGender) { | |
if($userGender == "M") { | |
$userGender = "male"; | |
} else if($userGender == "F") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"error": { | |
"message": "aaaa is not defined", | |
"name": "ReferenceError", | |
"frames": [ | |
{ | |
"file": "src/app/strategies/provider/loggi/loggi-strategy.js", | |
"filePath": "/var/www/newtail/newtail-logistic-hub/src/app/strategies/provider/loggi/loggi-strategy.js", | |
"method": "LoggiStrategy.deliveryOrderCreate", | |
"line": 167, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation CreateOrder( | |
$externalId: String!, | |
$trackingKey: String! | |
$pickups: [Pickup]!, | |
$packages: [Packages]! | |
$paymentMethod: Int! | |
) { | |
createOrder(input: { | |
externalId: $externalId | |
trackingKey: $trackingKey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request { | |
"url": "https://staging.loggi.com/graphql/?", | |
"method": "post", | |
"data": { | |
"query": "\n mutation CreateOrder(\n $externalId: String!, \n $trackingKey: String!\n $pickups: [Pickup]!, \n $packages: [Packages]!\n $paymentMethod: Int!\n ) {\n createOrder(input: {\n externalId: $externalId\n trackingKey: $trackingKey\n pickups: $pickups\n packages: $packages\n paymentMethod: $paymentMethod\n }) {\n success\n shop {\n pk\n name\n }\n orders {\n pk\n trackingKey\n packages {\n pk\n status\n pickupWaypoint {\n index\n indexDisplay\n eta\n legDistance\n }\n waypoint {\n index\n indexDispla |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request { | |
"url": "/?", | |
"method": "post", | |
"data": { | |
"query": "\n mutation CreateOrder(\n $externalId: String!, \n $trackingKey: String!\n $pickups: [Pickup]!, \n $packages: [Packages]!\n $paymentMethod: Int!\n ) {\n createOrder(input: {\n externalId: $externalId\n trackingKey: $trackingKey\n pickups: $pickups\n packages: $packages\n paymentMethod: $paymentMethod\n }) {\n success\n shop {\n pk\n name\n }\n orders {\n pk\n trackingKey\n packages {\n pk\n status\n pickupWaypoint {\n index\n indexDisplay\n eta\n legDistance\n }\n waypoint {\n index\n indexDisplay\n eta\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"estimateCreateOrder": { | |
"totalEstimate": { | |
"totalCost": "81.04", | |
"totalEta": 2552, | |
"totalDistance": 50.18 | |
}, | |
"ordersEstimate": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Passo 01 chamar /location/configGet | |
Para ver se uma location nossa ja esta registrada | |
{ | |
"location_id": "3", | |
"provider": "loggi" | |
} | |
Passo 02 chamar /location/config (se necessario) |
NewerOlder