jeudi 26 octobre 2017

PHP Laravel Get Values of Ticket Number

I am getting value of Email, Password and PNR in Print Out of Ticket.

Email:
Mobile:
PNR: $pnr = $result['Response']['Response']['FlightItinerary']['PNR'];

but unable to get Ticket Number I tried this:

Ticket Number :

This is the function for it in Controller

static public function addTicket($data, $type, $mes) { if(isset($data['FlightItinerary']['InvoiceNo'])) { $data1 = FlightTransReport::where('trans_id', $data['FlightItinerary']['BookingId']) ->where('type', $type);

    $data1->update([

        'confirmation_id'   => $data['FlightItinerary']['InvoiceNo'],
        'ticket_status'     => 1,
        'flight_code'       => $data['FlightItinerary']['AirlineCode'],

        'jdate'             => $data['FlightItinerary']['Segments'][0]['Origin']['DepTime'],
        'source_dest'       => $data['FlightItinerary']['Origin'].'-'.$data['FlightItinerary']['Destination'],
        'no_of_pass'        => count($data['FlightItinerary']['Passenger']),
        'status'            => 'success',
        'statusmsg'         => $mes
    ]);

    $tid = $data1->pluck('transaction_id');

    foreach ($data['FlightItinerary']['Passenger'] as $key1 => $value1) {
        if(isset($value1['Ticket'])) {
            DB::table('passenger_details')->where('pass_uid', $value1['PaxId'])->where('transaction_id', $tid)
                ->update(
                    [   'eticket_no' => $value1['Ticket']['TicketNumber'],
                        'flight_uid' => $value1['Ticket']['ValidatingAirline'], 
                        'ticket_id' => $value1['Ticket']['TicketId'], 
                        'issue_date' => $value1['Ticket']['IssueDate']
                    ]
            );
        }
    }

    ReportsNew::where('transaction_id', $tid)->update(['status' => 'Success']);
}

}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2y6LReb
via IFTTT

Aucun commentaire:

Enregistrer un commentaire