Skip to content

Instantly share code, notes, and snippets.

Created October 23, 2017 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/58f2a157c786af880fbf8d2b33330529 to your computer and use it in GitHub Desktop.
Save anonymous/58f2a157c786af880fbf8d2b33330529 to your computer and use it in GitHub Desktop.
Erro ao gerar o Boleto devido a inconsistências no seu cadastro.
Array
(
[companyname] => Mega Dedicados
[systemurl] => https://www.megadedicados.com.br/
[langpaynow] => Pagar agora
[admin] => 1
[cancelbillet] =>
[clientid] => Retirado
[clientidsandbox] => Retirado
[clientsecret] => Retirado
[clientsecretsandbox] =>
[convertto] =>
[customfieldcnpj] =>
[customfieldcpf] => 1
[customfielddescontotipo] =>
[customfielddescontovalor] =>
[debugmode] => on
[descontooutaxa] => 2
[diasantesvencadddesconto] => 0
[diasparavencimento] => 4
[emailonerror] => 3
[exibedescontooutaxa] => on
[fee] =>
[footer] =>
[instruction1] => Após vencimento aceitar pagamento somente no banco emissor.
[instruction2] => Não cobrar juros após o vencimento.
[instruction3] => Não cobrar multa após o vencimento.
[instruction4] => Aceitar apenas pagamento em dinheiro.
[juros] => 0.33
[message] => Não precisa informar o pagamento a MegaDedicados
[minimunamount] => 5
[multa] =>
[name] => Gofas Gerencianet - Boleto
[paybutton] => https://megadedicados.com.br/images/botao_gerencianet.PNG
[redirecttobillet] =>
[requirecnpjandcpf] =>
[separator_1] =>
[separator_2] =>
[separator_3] =>
[separator_4] =>
[separator_5] =>
[separator_6] =>
[showbarcode] => on
[showduedate] => on
[testmode] =>
[tipodescontooutaxa] => 2
[type] => Invoices
[valordescontooutaxa] => 3.48
[visible] => on
[paymentmethod] => gofasgerencianetboleto
[whmcsVersion] => 7.2.3-release.1
[invoiceid] => 3993
[invoicenum] => 3993
[amount] => 5.00
[description] => Mega Dedicados - Fatura #3993
[returnurl] =>
[dueDate] => 2017-10-28
[clientdetails] => Array
(
[userid] => 133
[id] => 133
[uuid] => 0819e6ad-b006-44a6-81ff-de523cda785f
[firstname] => DIEGO
[lastname] => CUPERTINO
[fullname] => DIEGO CUPERTINO
[companyname] => MegaDedicados
[email] => dscdiego@hotmail.com
[address1] => Rua Selma Santos
[address2] => Numero 80 -
[city] => Rio das Ostras
[fullstate] => RJ
[state] => RJ
[postcode] => 28890690
[countrycode] => BR
[country] => BR
[phonenumber] => 22992688851
[password] => $2y$10$6Gk05bmILTjzvc2hFGYq/.myoINggM6T.sDEs6J/Y.uIZKHTEsini
[model] => WHMCS\User\Client Object
(
[table:protected] => tblclients
[columnMap:protected] => Array
(
[passwordHash] => password
[twoFactorAuthModule] => authmodule
[twoFactorAuthData] => authdata
[currencyId] => currency
[defaultPaymentGateway] => defaultgateway
[overrideLateFee] => latefeeoveride
[overrideOverdueNotices] => overideduenotices
[disableAutomaticCreditCardProcessing] => disableautocc
[billingContactId] => billingcid
[securityQuestionId] => securityqid
[securityQuestionAnswer] => securityqans
[creditCardType] => cardtype
[creditCardLastFourDigits] => cardlastfour
[creditCardExpiryDate] => expdate
[storedBankNameCrypt] => bankname
[storedBankTypeCrypt] => banktype
[storedBankCodeCrypt] => bankcode
[storedBankAccountCrypt] => bankacct
[paymentGatewayToken] => gatewayid
[lastLoginDate] => lastlogin
[lastLoginIp] => ip
[lastLoginHostname] => host
[passwordResetKey] => pwresetkey
[passwordResetKeyRequestDate] => pwresetexpiry
)
[timestamps] => 1
[dates:protected] => Array
(
[0] => lastLoginDate
[1] => passwordResetKeyRequestDate
)
[booleans:protected] => Array
(
[0] => taxExempt
[1] => overrideLateFee
[2] => overrideOverdueNotices
[3] => separateInvoices
[4] => disableAutomaticCreditCardProcessing
[5] => emailOptOut
[6] => overrideAutoClose
[7] => emailVerified
)
[unique] => Array
(
[0] => email
)
[appends:protected] => Array
(
[0] => fullName
[1] => countryName
)
[fillable:protected] => Array
(
[0] => lastlogin
[1] => ip
[2] => host
[3] => pwresetkey
[4] => pwresetexpiry
)
[guardedForUpdate] => Array
(
)
[strings:protected] => Array
(
)
[ints:protected] => Array
(
)
[semanticVersions:protected] => Array
(
)
[commaSeparated:protected] => Array
(
)
[characterSeparated:protected] => Array
(
)
[connection:protected] =>
[primaryKey:protected] => id
[perPage:protected] => 15
[incrementing] => 1
[attributes:protected] => Array
(
[id] => 133
[uuid] => 0819e6ad-b006-44a6-81ff-de523cda785f
[firstname] => DIEGO
[lastname] => CUPERTINO
[companyname] => MegaDedicados
[email] => dscdiego@hotmail.com
[address1] => Rua Selma Santos
[address2] => Numero 80 -
[city] => Rio das Ostras
[state] => RJ
[postcode] => 28890690
[country] => BR
[phonenumber] => 22992688851
[password] => $2y$10$6Gk05bmILTjzvc2hFGYq/.myoINggM6T.sDEs6J/Y.uIZKHTEsini
[authmodule] =>
[authdata] =>
[currency] => 1
[defaultgateway] =>
[credit] => 0.00
[taxexempt] => 0
[latefeeoveride] => 0
[overideduenotices] => 0
[separateinvoices] => 0
[disableautocc] => 0
[datecreated] => 2016-08-15
[notes] =>
[billingcid] => 0
[securityqid] => 1
[securityqans] => wDd0/EJL8BSDucyWbH2jzLXMjEEr9evApHtrOWOrPorWZeZ1pIVYeO9V
[groupid] => 0
[cardtype] =>
[cardlastfour] =>
[cardnum] =>
[startdate] =>
[expdate] =>
[issuenumber] =>
[bankname] =>
[banktype] =>
[bankcode] =>
[bankacct] =>
[gatewayid] =>
[lastlogin] => 2017-09-26 18:30:50
[ip] => 189.113.74.59
[host] => 189-113-74-59.static.sumicity.net.br
[status] => Inactive
[language] =>
[pwresetkey] =>
[emailoptout] => 0
[overrideautoclose] => 0
[allow_sso] => 1
[email_verified] => 0
[created_at] => 0000-00-00 00:00:00
[updated_at] => 2016-08-16 18:11:30
[pwresetexpiry] => 0000-00-00 00:00:00
)
[original:protected] => Array
(
[id] => 133
[uuid] => 0819e6ad-b006-44a6-81ff-de523cda785f
[firstname] => DIEGO
[lastname] => CUPERTINO
[companyname] => MegaDedicados
[email] => dscdiego@hotmail.com
[address1] => Rua Selma Santos
[address2] => Numero 80 -
[city] => Rio das Ostras
[state] => RJ
[postcode] => 28890690
[country] => BR
[phonenumber] => 22992688851
[password] => $2y$10$6Gk05bmILTjzvc2hFGYq/.myoINggM6T.sDEs6J/Y.uIZKHTEsini
[authmodule] =>
[authdata] =>
[currency] => 1
[defaultgateway] =>
[credit] => 0.00
[taxexempt] => 0
[latefeeoveride] => 0
[overideduenotices] => 0
[separateinvoices] => 0
[disableautocc] => 0
[datecreated] => 2016-08-15
[notes] =>
[billingcid] => 0
[securityqid] => 1
[securityqans] => wDd0/EJL8BSDucyWbH2jzLXMjEEr9evApHtrOWOrPorWZeZ1pIVYeO9V
[groupid] => 0
[cardtype] =>
[cardlastfour] =>
[cardnum] =>
[startdate] =>
[expdate] =>
[issuenumber] =>
[bankname] =>
[banktype] =>
[bankcode] =>
[bankacct] =>
[gatewayid] =>
[lastlogin] => 2017-09-26 18:30:50
[ip] => 189.113.74.59
[host] => 189-113-74-59.static.sumicity.net.br
[status] => Inactive
[language] =>
[pwresetkey] =>
[emailoptout] => 0
[overrideautoclose] => 0
[allow_sso] => 1
[email_verified] => 0
[created_at] => 0000-00-00 00:00:00
[updated_at] => 2016-08-16 18:11:30
[pwresetexpiry] => 0000-00-00 00:00:00
)
[relations:protected] => Array
(
)
[hidden:protected] => Array
(
)
[visible:protected] => Array
(
)
[guarded:protected] => Array
(
[0] => *
)
[dateFormat:protected] =>
[casts:protected] => Array
(
)
[touches:protected] => Array
(
)
[observables:protected] => Array
(
)
[with:protected] => Array
(
)
[morphClass:protected] =>
[exists] => 1
[wasRecentlyCreated] =>
)
[statecode] => RJ
[countryname] => Brazil
[phonecc] => 55
[phonenumberformatted] => +55.22992688851
[billingcid] => 0
[notes] =>
[twofaenabled] =>
[currency] => 1
[defaultgateway] =>
[cctype] =>
[cclastfour] =>
[gatewayid] =>
[securityqid] => 1
[securityqans] => �>Wo�z�<
[groupid] => 0
[status] => Inactive
[credit] => 0.00
[taxexempt] =>
[latefeeoveride] =>
[overideduenotices] =>
[separateinvoices] =>
[disableautocc] =>
[emailoptout] =>
[overrideautoclose] =>
[allowSingleSignOn] => 1
[language] =>
[lastlogin] => Date: 26/09/2017 18:30<br>IP Address: 189.113.74.59<br>Host: 189-113-74-59.static.sumicity.net.br
[customfields1] => 56332957573
[customfields] => Array
(
[0] => Array
(
[id] => 1
[value] => 56332957573
)
[1] => Array
(
[id] => 2
[value] => 16/07/1987
)
[2] => Array
(
[id] => 3
[value] => 22992688851
)
[3] => Array
(
[id] => 23
[value] => on
)
)
[customfields2] => 16/07/1987
[customfields3] => 22992688851
[customfields4] => on
)
[currency] => BRL
[currencyId] => 1
)
Resultado da consulta por informações da fatura (API interna - WHMCS).
Array
(
[result] => success
[invoiceid] => 3993
[invoicenum] =>
[userid] => 133
[date] => 2017-10-23
[duedate] => 2017-10-28
[datepaid] => 0000-00-00 00:00:00
[lastcaptureattempt] => 0000-00-00 00:00:00
[subtotal] => 5.00
[credit] => 0.00
[tax] => 0.00
[tax2] => 0.00
[total] => 5.00
[balance] => 5.00
[taxrate] => 0.00
[taxrate2] => 0.00
[status] => Unpaid
[paymentmethod] => gofasgerencianetboleto
[notes] =>
[ccgateway] =>
[items] => Array
(
[item] => Array
(
[0] => Array
(
[id] => 3561
[type] =>
[relid] => 0
[description] => teste boleto gofas
[amount] => 5.00
[taxed] => 0
)
)
)
[transactions] =>
)
Transações registradas por esta fatura - API WHMCS.
Nenhuma transação registrada.
Configurações de juros e multa
Array
(
[interest] => 330
)
Multa de % equivale a fine = 0
Juros de 0.33% equivale a interest = 330
Produtos/serviços da fatura - API WHMCS.
Itens com valor negativo:
Array
(
)
Itens da Fatura:
Soma dos itens com valor negativo:
$discount_item:
$whmcs_discount:
Desconto válido até:
2017-10-28 | 0 dias antes do vencimento
Cálculos.
Hoje:
Vencimento:
Diferença entre datas: dia(s)
Multa:
Juros:
Valor original * 100: 0
Total:
Dados do cliente - API WHMCS.
stdClass Object
(
[id] => 133
[uuid] => 0819e6ad-b006-44a6-81ff-de523cda785f
[firstname] => DIEGO
[lastname] => CUPERTINO
[companyname] => MegaDedicados
[email] => dscdiego@hotmail.com
[address1] => Rua Selma Santos
[address2] => Numero 80 -
[city] => Rio das Ostras
[state] => RJ
[postcode] => 28890690
[country] => BR
[phonenumber] => 22992688851
[password] => $2y$10$6Gk05bmILTjzvc2hFGYq/.myoINggM6T.sDEs6J/Y.uIZKHTEsini
[authmodule] =>
[authdata] =>
[currency] => 1
[defaultgateway] =>
[credit] => 0.00
[taxexempt] => 0
[latefeeoveride] => 0
[overideduenotices] => 0
[separateinvoices] => 0
[disableautocc] => 0
[datecreated] => 2016-08-15
[notes] =>
[billingcid] => 0
[securityqid] => 1
[securityqans] => wDd0/EJL8BSDucyWbH2jzLXMjEEr9evApHtrOWOrPorWZeZ1pIVYeO9V
[groupid] => 0
[cardtype] =>
[cardlastfour] =>
[cardnum] =>
[startdate] =>
[expdate] =>
[issuenumber] =>
[bankname] =>
[banktype] =>
[bankcode] =>
[bankacct] =>
[gatewayid] =>
[lastlogin] => 2017-09-26 18:30:50
[ip] => 189.113.74.59
[host] => 189-113-74-59.static.sumicity.net.br
[status] => Inactive
[language] =>
[pwresetkey] =>
[emailoptout] => 0
[overrideautoclose] => 0
[allow_sso] => 1
[email_verified] => 0
[created_at] => 0000-00-00 00:00:00
[updated_at] => 2016-08-16 18:11:30
[pwresetexpiry] => 0000-00-00 00:00:00
)
Dados do cliente enviados à GN API
cpf:
cnpj:
$customer:
$juridical_data:
* Trying 104.20.78.210... * TCP_NODELAY set * Connected to api.gerencianet.com.br (104.20.78.210) port 443 (#0) * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 * ALPN, server accepted to use http/1.1 * Server certificate: * subject: CN=*.gerencianet.com.br * start date: Jan 6 00:00:00 2017 GMT * expire date: Apr 7 23:59:59 2019 GMT * subjectAltName: host "api.gerencianet.com.br" matched cert's "*.gerencianet.com.br" * issuer: C=US; O=GeoTrust Inc.; CN=RapidSSL SHA256 CA * SSL certificate verify ok. > POST /v1/authorize HTTP/1.1 Host: api.gerencianet.com.br Content-Type: application/json api-sdk: php-2.0.0 partner-token: baaf5b95d55433890bd835cf006772b9462bde8f User-Agent: GuzzleHttp/6.2.1 curl/7.55.1 PHP/5.6.31 Authorization: Basic Q2xpZW50X0lkXzQ4MWYyOTYyM2JhZjUwYmEwMTczNDdmZDYzOGY0NDQyYzYzNGY2OTE6Q2xpZW50X1NlY3JldF8xMDE5ZDU0YTZjMGMyYTE5ZjY1ZDY5NjQ1MTg3MWJhNTA1OTE3MDdl Content-Length: 35 * upload completely sent off: 35 out of 35 bytes < HTTP/1.1 200 OK < Date: Mon, 23 Oct 2017 23:19:00 GMT < Content-Type: application/json < Content-Length: 233 < Connection: keep-alive < Set-Cookie: __cfduid=d3cdfe5ea80cbe6f2687f6fed169666741508800740; expires=Tue, 23-Oct-18 23:19:00 GMT; path=/; domain=.gerencianet.com.br; HttpOnly < cache-control: no-store < pragma: no-cache < Server: cloudflare-nginx < CF-RAY: 3b286b32480487b2-GIG < * Connection #0 to host api.gerencianet.com.br left intact * Hostname api.gerencianet.com.br was found in DNS cache * Trying 104.20.78.210... * TCP_NODELAY set * Connected to api.gerencianet.com.br (104.20.78.210) port 443 (#0) * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 * ALPN, server accepted to use http/1.1 * Server certificate: * subject: CN=*.gerencianet.com.br * start date: Jan 6 00:00:00 2017 GMT * expire date: Apr 7 23:59:59 2019 GMT * subjectAltName: host "api.gerencianet.com.br" matched cert's "*.gerencianet.com.br" * issuer: C=US; O=GeoTrust Inc.; CN=RapidSSL SHA256 CA * SSL certificate verify ok. > POST /v1/charge HTTP/1.1 Host: api.gerencianet.com.br Content-Type: application/json User-Agent: GuzzleHttp/6.2.1 curl/7.55.1 PHP/5.6.31 Authorization: Bearer 05682c2619abc35b8e9b090c016dfc37fb3063b461db38a3d31f1b71a1a8cecc api-sdk: php-2.0.0 partner-token: baaf5b95d55433890bd835cf006772b9462bde8f Content-Length: 222 * upload completely sent off: 222 out of 222 bytes < HTTP/1.1 200 OK < Date: Mon, 23 Oct 2017 23:19:01 GMT < Content-Type: application/json; charset=utf-8 < Content-Length: 122 < Connection: keep-alive < Set-Cookie: __cfduid=d3cdfe5ea80cbe6f2687f6fed169666741508800740; expires=Tue, 23-Oct-18 23:19:00 GMT; path=/; domain=.gerencianet.com.br; HttpOnly < X-RateLimit-Limit: 7500 < X-RateLimit-Reset: 1508883564 < X-RateLimit-Remaining: 7477 < ETag: W/"7a-15VO8v3K5O+H6BY1A9m9LA" < Server: cloudflare-nginx < CF-RAY: 3b286b36183987b2-GIG < * Connection #0 to host api.gerencianet.com.br left intact
Nova transação gerada com sucesso - API Gerencianet.
Array
(
[code] => 200
[data] => Array
(
[charge_id] => 5323983
[status] => new
[total] => 848
[custom_id] => 3993
[created_at] => 2017-10-23 21:19:01
)
)
charge id: 5323983
* Found bundle for host api.gerencianet.com.br: 0x39bd1d0 [can pipeline] * Re-using existing connection! (#0) with host api.gerencianet.com.br * Connected to api.gerencianet.com.br (104.20.78.210) port 443 (#0) > POST /v1/charge/5323983/pay HTTP/1.1 Host: api.gerencianet.com.br Content-Type: application/json User-Agent: GuzzleHttp/6.2.1 curl/7.55.1 PHP/5.6.31 Authorization: Bearer 05682c2619abc35b8e9b090c016dfc37fb3063b461db38a3d31f1b71a1a8cecc api-sdk: php-2.0.0 partner-token: baaf5b95d55433890bd835cf006772b9462bde8f Content-Length: 173 * upload completely sent off: 173 out of 173 bytes < HTTP/1.1 500 Internal Server Error < Date: Mon, 23 Oct 2017 23:19:01 GMT < Content-Type: application/json; charset=utf-8 < Content-Length: 163 < Connection: keep-alive < Set-Cookie: __cfduid=d628a6eb7d18f8e7b141fdd52338ba2971508800741; expires=Tue, 23-Oct-18 23:19:01 GMT; path=/; domain=.gerencianet.com.br; HttpOnly < X-RateLimit-Limit: 10000 < X-RateLimit-Reset: 1508883565 < X-RateLimit-Remaining: 9977 < X-Content-Type-Options: nosniff < ETag: W/"a3-rGMaQPfGce5dTpX+k/cRvA" < Server: cloudflare-nginx < CF-RAY: 3b286b39087087b2-GIG < * Connection #0 to host api.gerencianet.com.br left intact
Falha ao gerar o boleto - 1ª tentativa, - API Gerencianet.
Tipo inválido: null (esperado object).: /payment/banking_billet/customer
$params2 & $BODY2:
Array
(
[id] => 5323983
)
Array
(
[payment] => Array
(
[banking_billet] => Array
(
[expire_at] => 2017-10-28
[customer] =>
[message] => Não precisa informar o pagamento a MegaDedicados
[configurations] => Array
(
[interest] => 330
)
)
)
)
Email envido ao admin notificando o erro - API WHMCS.
Array
(
[result] => success
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment