• 21-10-2019, 23:41:18
    #1
    {
    "payuPaymentReference": "1901222",
    "status": "SUCCESS",
    "paymentResult": {
    "payuResponseCode": "3DS_ENROLLED",
    "url": "https://service.moka.com/PaymentDealerThreeDProcess?threeDTrxCode=1",
    "type": "redirect"
    },
    "message": "3DS Enrolled Card.",
    "code": "200",
    "amount": 29.049999999999997
    }
    elimde böyle bir json değeri var apiden geliyor

    $dizi = json_decode($result,true);
    echo "<br>".$dizi["payuPaymentReference"];
    echo "<br>".$dizi["status"];
    bu şekilde okuyorum paymentResult değerinin içindekileri nasıl alabilirim. Foreach ile yada başka bir yöntem.
  • 21-10-2019, 23:47:12
    #2
    $dizi["paymentResult"]["payuResponseCode"]

    Bu şekilde olması lazım.
  • 21-10-2019, 23:47:44
    #3
    echo $dizi['paymentResult']['payuResponseCode']; // 3DS_ENROLLED
    echo $dizi['paymentResult']['url']; // https://service.moka.com/PaymentDealerThreeDProcess?threeDTrxCode=1
    echo $dizi['paymentResult']['type']; // redirect
  • 21-10-2019, 23:50:12
    #4
    Veya

    foreach ($dizi["paymentResult"] as $key => $value) {
    echo $dizi["paymentResult"][$key];
    // veya
    echo $value;
    }
  • 21-10-2019, 23:50:31
    #5
    onur bey teşekkürler oldu keşke bunu 1 saat önceden düşünseydim



    Benden böyle birşey isteniliyor 3D secure ekranı için. referans kodunu belirtilen url adresine post mu etmem gerekiyor ?