Bom dia,
Realizei o testes. Utilizei uma conta Sandbox para fazer um pedido e coloquei para ir para análise de risco, n?o consegui liberar o pagamento, entrei em todas as contas Sandbox consegui achar os dados do pagamento através da conta business porém n?o pude aprovar. Em vez disso, testei através do reembolso em dois pedidos.
No primeiro pedido n?o houve resposta após o reembolso, pensei que o motivo poderia ser o fato do ambiente de testes n?o ter SSL ent?o fiz a configura??o e habilitei o SSL no ambiente de testes.
Depois do SSL ativado, prossegui para o teste do segundo pedido e também n?o houve diferen?a. Os dois pedidos permanecem no status “Aguardando Pagamento”.
Segue as informa??es sobre o evento Webhook que consta pendente em https://developer.paypal.com/developer/dashboard/webhooks/sandbox/
{
"id": "WH-2UU17358JC708224H-9JM87564P6813901W",
"create_time": "2020-03-26T12:45:38.915Z",
"resource_type": "refund",
"event_type": "PAYMENT.SALE.REFUNDED",
"summary": "A BRL 3439.73 BRL sale payment was refunded",
"resource": {
"sale_id": "2CN8999301776360E",
"refund_reason_code": "REFUND",
"amount": {
"total": "3439.73",
"currency": "BRL"
},
"refund_from_received_amount": {
"value": "3322.38",
"currency": "BRL"
},
"create_time": "2020-03-26T12:45:34Z",
"custom": "Pedido #63888 realizado na loja Saldofone",
"refund_from_transaction_fee": {
"value": "117.35",
"currency": "BRL"
},
"parent_payment": "PAYID-LZ6JGFQ2Y922191WW6239935",
"update_time": "2020-03-26T12:45:34Z",
"total_refunded_amount": {
"value": "3439.73",
"currency": "BRL"
},
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/refund/032660523K4950253",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/payment/PAYID-LZ6JGFQ2Y922191WW6239935",
"rel": "parent_payment",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/sale/2CN8999301776360E",
"rel": "sale",
"method": "GET"
}
],
"id": "032660523K4950253",
"state": "completed",
"refund_to_payer": {
"value": "3439.73",
"currency": "BRL"
},
"invoice_number": "63888"
},
"status": "PENDING",
"transmissions": [
{
"webhook_url": "https://developing.saldofone.com.br?wc-api=paypal-brasil-plus-gateway",
"transmission_id": "c0dbfbc0-6f5f-11ea-9b81-a997b6480c6e",
"status": "PENDING",
"timestamp": "2020-03-26T12:46:03Z"
},
{
"webhook_url": "https://example.com/?wc-api=paypal-brasil-plus-gateway",
"response_headers": {
"Accept-Ranges": "bytes",
"Cache-Control": "max-age=604800",
"Etag": "\"3147526947\"",
"Server": "EOS (vny/044E)",
"Expires": "Thu, 02 Apr 2020 12:46:14 GMT",
"Last-Modified": "Thu, 17 Oct 2019 07:18:26 GMT",
"Content-Length": "1256",
"Date": "Thu, 26 Mar 2020 12:46:14 GMT",
"Content-Type": "text/html; charset=UTF-8"
},
"transmission_id": "c0df0901-6f5f-11ea-9b81-a997b6480c6e",
"status": "SUCCESS",
"timestamp": "2020-03-26T12:46:03Z"
}
],
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-2UU17358JC708224H-9JM87564P6813901W",
"rel": "self",
"method": "GET",
"encType": "application/json"
},
{
"href": "https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-2UU17358JC708224H-9JM87564P6813901W/resend",
"rel": "resend",
"method": "POST",
"encType": "application/json"
}
],
"event_version": "1.0"
}