Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!