Skip to content

MerchantOrder return incompleted data #459

Closed Answered by agustinglez
agustinglez asked this question in Q&A
Discussion options

You must be logged in to vote

Hola! Yo lo llegué a resolver así:

$OrderId = $_GET['id'];

$MerchantOrder = MercadoPago\MerchantOrder::find_by_id($OrderId);

if ($OrderId != '') {

	$MP_PaymentData = array(
		'id' => $MerchantOrder->id,
		'site_id' => $MerchantOrder->site_id,
		'noperacion' => $MerchantOrder->external_reference,
		'operation_type' => end($MerchantOrder->payments)->operation_type,
		'status' => end($MerchantOrder->payments)->status,
		'status_detail' => end($MerchantOrder->payments)->status_detail,
		'total_paid_amount' => end($MerchantOrder->payments)->total_paid_amount,
	);
}

Replies: 1 comment 16 replies

Comment options

You must be logged in to vote
16 replies
@lucmantovani
Comment options

@agustinglez
Comment options

@SrVince
Comment options

@agustinglez
Comment options

Answer selected by agustinglez
@SrVince
Comment options

@agustinglez
Comment options

@noriellecruz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants