Comunidade

Ask a Question
ANSWERED
ANSWERED

Forbidden no split de pagamentos

Eu implementei o checkout transparente na minha aplicação que está sendo executada em next.js Para pagamentos sem split tudo funciona normalmente No entanto ao adicionar os dados do recebedor primario e dos outros recebedores A requisição retorna o erro 403 - forbidden que está a seguir. Error: Request failed with status code 403 at createError (C:\Users\mathe\Desktop\CPE\pet-system\node_modules\axios\lib\core\createError.js:16:15) at settle (C:\Users\mathe\Desktop\CPE\pet-system\node_modules\axios\lib\core\settle.js:17:12) at IncomingMessage.handleStreamEnd (C:\Users\mathe\Desktop\CPE\pet-system\node_modules\axios\lib\adapters\http.js:260:11) at IncomingMessage.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) { config: { url: 'https://ws.sandbox.pagseguro.uol.com.br/transactions?appId=app5219197613&appKey=1B7EC0046C6C77F224236F9A246349BF', method: 'post', data: 'payment.mode=default&payment.method=boleto&currency=BRL&items%5Bitem%5D%5Bid%5D=1&items%5Bitem%5D%5Bdescription%5D=Product%201%20Description&items%5Bitem%5D%5Bquantity%5D=2&items%5Bitem%5D%5Bamount%5D=100.00&notificationURL=https%3A%2F%2Fyourstore.com.br%2Fnotification&reference=8c540c94-08e9-4341-8c19-0507c33b4b9f&sender.name=Bilborius%20Lima&sender.CPF=22111944785&sender.areaCode=11&sender.phone=56273440&sender.email=c35506161624506613573%40sandbox.pagseguro.com.br&sender.hash=ee2f00bb5ad777cb6ec1136d6cedb67e1c4489941945c78428fd13091171c32e&shipping.address.street=Av.%20Brig.%20Faria%20Lima&shipping.address.number=1384&shipping.address.complement=5o%20andar&shipping.address.district=Jardim%20Paulistano&shipping.address.postalCode=01452002&shipping.address.city=Sao%20Paulo&shipping.address.state=SP&shipping.address.country=BRA&shipping.type=3&shipping.cost=0.00&primaryReceiver.publicKey=PUBCE22C91B3A7949DD8D3551851198618A&receiver%5B1%5D.publicKey=PUBF010A26DCD39472DA655FEF53C1F7AAB&receiver%5B1%5D.split.amount=20.00&paymentMode=default&receiverEmail=vicepresidencia%40cpejr.com.br&senderAreaCode=31&creditCardHolderAreaCode=31&senderCPF=86857818096&senderEmail=c35506161624506613573%40sandbox.pagseguro.com.br&senderName=Marcos%20Rogerio&creditCardHolderPhone=111111111&senderPhone=111111111&billingAddressCity=Belo%20Horizonte&billingAddressComplement=Apto%20302&billingAddressCountry=BRA&billingAddressDistrict=Pampulha&billingAddressNumber=13&billingAddressPostalCode=32450680&billingAddressState=MG&billingAddressStreet=Var%C3%A3oVarinho&shippingAddressRequired=False', headers: { Accept: 'application/vnd.pagseguro.com.br.v3+xml', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'axios/0.21.1', 'Content-Length': 1589 }, transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, adapter: [Function: httpAdapter], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus] }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { socket: [Function (anonymous)], abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], timeout: [Function (anonymous)], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, secureConnecting: false, _SNICallback: null, servername: 'ws.sandbox.pagseguro.uol.com.br', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 10, connecting: false, _hadError: false, _parent: null, _host: 'ws.sandbox.pagseguro.uol.com.br', _readableState: [ReadableState], _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [TLSWrap], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Circular *1], [Symbol(res)]: [TLSWrap], [Symbol(verified)]: true, [Symbol(pendingSession)]: null, [Symbol(async_id_symbol)]: 136308, [Symbol(kHandle)]: [TLSWrap], [Symbol(kSetNoDelay)]: false, [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(kCapture)]: false, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0, [Symbol(connect-options)]: [Object], [Symbol(RequestTimeout)]: undefined }, _header: 'POST /transactions?appId=app5219197613&appKey=1B7EC0046C6C77F224236F9A246349BF HTTP/1.1\r\n' + 'Accept: application/vnd.pagseguro.com.br.v3+xml\r\n' + 'Content-Type: application/x-www-form-urlencoded\r\n' + 'User-Agent: axios/0.21.1\r\n' + 'Content-Length: 1589\r\n' + 'Host: ws.sandbox.pagseguro.uol.com.br\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: noopPendingOutput], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 443, protocol: 'https:', options: [Object], requests: {}, sockets: [Object], freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'fifo', maxTotalSockets: Infinity, totalSocketCount: 1, maxCachedSessions: 100, _sessionCache: [Object], [Symbol(kCapture)]: false }, socketPath: undefined, method: 'POST', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/transactions?appId=app5219197613&appKey=1B7EC0046C6C77F224236F9A246349BF', _ended: true, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, socket: [TLSSocket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: [Object], rawHeaders: [Array], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 403, statusMessage: 'Forbidden', client: [TLSSocket], _consuming: false, _dumped: false, req: [Circular *1], responseUrl: 'https://ws.sandbox.pagseguro.uol.com.br/transactions?appId=app5219197613&appKey=1B7EC0046C6C77F224236F9A246349BF', redirects: [], [Symbol(kCapture)]: false, [Symbol(RequestTimeout)]: undefined }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'ws.sandbox.pagseguro.uol.com.br', protocol: 'https:', _redirectable: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 1589, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'https://ws.sandbox.pagseguro.uol.com.br/transactions?appId=app5219197613&appKey=1B7EC0046C6C77F224236F9A246349BF', [Symbol(kCapture)]: false }, [Symbol(kCapture)]: false, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], 'content-type': [Array], 'user-agent': [Array], 'content-length': [Array], host: [Array] } }, response: { status: 403, statusText: 'Forbidden', headers: { 'content-type': 'text/plain;charset=ISO-8859-1', 'content-length': '9', connection: 'close', date: 'Tue, 04 Jan 2022 16:10:46 GMT', server: 'Apache-Coyote/1.1', vary: 'Accept-Encoding,User-Agent', 'x-cache': 'Error from cloudfront', via: '1.1 a2e8f1d5e265fbe5b389afd12cc16abc.cloudfront.net (CloudFront)', 'x-amz-cf-pop': 'GIG51-C1', 'x-amz-cf-id': 'VwmZ6eCJrj9XLeCwDXu5yDAzGOsC_55_hiZoAoxWRtTVSe4MYZRF5Q==' }, config: { url: 'https://ws.sandbox.pagseguro.uol.com.br/transactions?appId=app5219197613&appKey=1B7EC0046C6C77F224236F9A246349BF', method: 'post', data: 'payment.mode=default&payment.method=boleto&currency=BRL&items%5Bitem%5D%5Bid%5D=1&items%5Bitem%5D%5Bdescription%5D=Product%201%20Description&items%5Bitem%5D%5Bquantity%5D=2&items%5Bitem%5D%5Bamount%5D=100.00&notificationURL=https%3A%2F%2Fyourstore.com.br%2Fnotification&reference=8c540c94-08e9-4341-8c19-0507c33b4b9f&sender.name=Bilborius%20Lima&sender.CPF=22111944785&sender.areaCode=11&sender.phone=56273440&sender.email=c35506161624506613573%40sandbox.pagseguro.com.br&sender.hash=ee2f00bb5ad777cb6ec1136d6cedb67e1c4489941945c78428fd13091171c32e&shipping.address.street=Av.%20Brig.%20Faria%20Lima&shipping.address.number=1384&shipping.address.complement=5o%20andar&shipping.address.district=Jardim%20Paulistano&shipping.address.postalCode=01452002&shipping.address.city=Sao%20Paulo&shipping.address.state=SP&shipping.address.country=BRA&shipping.type=3&shipping.cost=0.00&primaryReceiver.publicKey=PUBCE22C91B3A7949DD8D3551851198618A&receiver%5B1%5D.publicKey=PUBF010A26DCD39472DA655FEF53C1F7AAB&receiver%5B1%5D.split.amount=20.00&paymentMode=default&receiverEmail=vicepresidencia%40cpejr.com.br&senderAreaCode=31&creditCardHolderAreaCode=31&senderCPF=86857818096&senderEmail=c35506161624506613573%40sandbox.pagseguro.com.br&senderName=Marcos%20Rogerio&creditCardHolderPhone=111111111&senderPhone=111111111&billingAddressCity=Belo%20Horizonte&billingAddressComplement=Apto%20302&billingAddressCountry=BRA&billingAddressDistrict=Pampulha&billingAddressNumber=13&billingAddressPostalCode=32450680&billingAddressState=MG&billingAddressStreet=Var%C3%A3oVarinho&shippingAddressRequired=False', headers: [Object], transformRequest: [Array], transformResponse: [Array], timeout: 0, adapter: [Function: httpAdapter], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus] }, request: <ref *1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [TLSSocket], _header: 'POST /transactions?appId=app5219197613&appKey=1B7EC0046C6C77F224236F9A246349BF HTTP/1.1\r\n' + 'Accept: application/vnd.pagseguro.com.br.v3+xml\r\n' + 'Content-Type: application/x-www-form-urlencoded\r\n' + 'User-Agent: axios/0.21.1\r\n' + 'Content-Length: 1589\r\n' + 'Host: ws.sandbox.pagseguro.uol.com.br\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: noopPendingOutput], agent: [Agent], socketPath: undefined, method: 'POST', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/transactions?appId=app5219197613&appKey=1B7EC0046C6C77F224236F9A246349BF', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'ws.sandbox.pagseguro.uol.com.br', protocol: 'https:', _redirectable: [Writable], [Symbol(kCapture)]: false, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] }, data: 'Forbidden' }, isAxiosError: true, toJSON: [Function: toJSON]1
ANSWERED
ANSWERED
ANSWERED
ANSWERED
ANSWERED