Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/11/2017, 09:39
alvaro_trewhela
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Problemas con variable array

590 es una constante, justamente lo que dejaste como comentario debe ser la variable, digo ya que ese comentario hace referencia a la misma key

Código PHP:
Ver original
  1. $preference_data = array(
  2. "items" => array(
  3.         array(
  4.         "title" => "Pago de Producto",
  5.         "currency_id" => "ARG",
  6.         "category_id" => "Category",
  7.         "quantity" => 1,
  8.         // "unit_price" => 590)
  9.         "unit_price" => $PrecioItem)
  10.     )
  11. );

Disculpa por entrometerme en tu trabajo, pero es necesario ese doble array?. No sería mejor solo 1

Código PHP:
Ver original
  1. $preference_data = array(
  2. "items" =>
  3.     array(
  4.     "title" => "Pago de Producto",
  5.     "currency_id" => "ARG",
  6.     "category_id" => "Category",
  7.     "quantity" => 1,
  8.     //"unit_price" => 590)
  9.     "unit_price" => $PrecioItem)
  10. );

Saludos