Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

105
Visualizações
PHP array with Paypal response Array

I have been having an issue trying to get the value of one field from a Paypal response array. I have been working on it for hours and can not figure it out.

I want the value of $related_resources->sale->id, however I tried

$resource_id = $related_resources->sale->id; 

AND

foreach ($related_resources as $related_resource) {
$resource_id = $related_resource->sale-id;
}

and neither have worked. Hopefully someone will be able to help me out and save me from this headache.

"related_resources": [ { "sale": { "id": "000000000000", "state": 
"completed", "amount": { "total": "0.01", "currency": "USD", "details": { 
"subtotal": "0.01" } }, "payment_mode": "INSTANT_TRANSFER", 
"protection_eligibility": "ELIGIBLE", "protection_eligibility_type": 
"ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE", 
"transaction_fee": { "value": "0.01", "currency": "USD" }, "receipt_id": 
"00000000000", "parent_payment": "PAY-000000000000000", "create_time": 
"2017-04-28T14:59:05Z", "update_time": "2017-04-28T14:59:05Z"...
over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda