0

So i posted here last night about striping an array Getting status from paypal array

Im using paypal sdk to let users make payments to me its giving me a huge array and i wanted to grab the verrifed part out of the array only and then i could do a if statement and give them there item they have bought

So ive been doing a bit of testing and i see this in the paypal sdk checkout page

try{
    $result = $payment->execute($execute , $apiContext );
    echo "testing" ;
}
catch(Exception $e){
    $data = json_decode($e->getData());
    var_dump($data->message);
    die();
}

The "testing" only shows when the user has paid i can see and if you refresh the paid or use the same token it will kill the page ( good ) would this be a safe place to add the insert to give them the item? Because testing it out shows it works with payments being made

user is on the checkout.php page then it redirects the to paypal were they pay it then sends them to a paid.php page were it should give them what they paid for but having problems getting the variable out of the array

i did try this

$nicky =  json_decode($result,true)['status'];

echo  $nicky ; 

but got Notice: Undefined index: status

Shadow1300
  • 21
  • 2
  • Possible duplicate of [Getting status from paypal array](https://stackoverflow.com/questions/45645892/getting-status-from-paypal-array) – tima Aug 13 '17 at 01:37
  • You should update your other question instead of creating a slightly modified duplicate. – tima Aug 13 '17 at 01:44

0 Answers0