0

From a 3rd party payment gateway system that we are using, we are getting following response for my request. How can I handle this request. It clearly does not look like a json.

array(18) {
  ["tran_id"]=>
  string(13) "572F1950EA6D7"
  ["error"]=>
  string(17) "Cancelled by User"
  ["amount"]=>
  string(5) "783.8"
  ["bank_tran_id"]=>
  string(0) ""
  ["status"]=>
  string(9) "CANCELLED"
  ["tran_date"]=>
  string(19) "2016-05-08 16:47:45"
  ["currency"]=>
  string(3) "BDT"
  ["store_id"]=>
  string(7) "testbox"
  ["verify_sign"]=>
  string(32) "dd6f94dc58f31b9d75e3efd1fb6c7a9c"
  ["verify_key"]=>
  string(154) "amount,bank_tran_id,base_fair,currency,currency_amount,currency_rate,currency_type,error,status,store_id,tran_date,tran_id,value_a,value_b,value_c,value_d"
  ["currency_type"]=>
  string(3) "USD"
  ["currency_amount"]=>
  string(5) "10.00"
  ["currency_rate"]=>
  string(5) "78.38"
  ["base_fair"]=>
  string(4) "0.00"
  ["value_a"]=>
  string(6) "REF001"
  ["value_b"]=>
  string(6) "REF002"
  ["value_c"]=>
  string(6) "REF003"
  ["value_d"]=>
  string(6) "REF004"
}
sadaf2605
  • 7,332
  • 8
  • 60
  • 103

1 Answers1

0

This seems to be the output of a PHP var_dump() function. This answer has an unvar_dump function to convert it back, but it's written in PHP.

For Ruby, this is the closest I could find.

Community
  • 1
  • 1