Marketpress - Change PAYMENTINFO details

Where can I change the content of the PAYMENTINFO code in the MP confirmation?

  • Amir

    Currently, the PAYMENTINFO displays as a block:

    For instance:

    Payment Method: Credit Card Payment Type: Visa Card ending in 4242 - Expires 6/2021 Transaction ID: ch_103ilO2acJE9zPWcff6Sb2vs Payment Total: 296.00 USD Your payment for this order is complete.

    How can I change the code to put a line break between for the data to display as:

    Payment Method: Credit Card
    Payment Type: Visa Card ending in 4242 - Expires 6/2021
    Transaction ID: ch_103ilO2acJE9zPWcff6Sb2vs
    Payment Total: 296.00 USD
    Your payment for this order is complete.

    $payment_info = __('Payment Method:', 'mp') . ' ' . $order->mp_payment_info['gateway_public_name'];
    
    		if ($order->mp_payment_info['method'])
    	 	$payment_info .= "\n" . __('Payment Type:', 'mp') . ' ' . $order->mp_payment_info['method'];
    
    		if ($order->mp_payment_info['transaction_id'])
    			$payment_info .= "\n" . __('Transaction ID:', 'mp') . ' ' . $order->mp_payment_info['transaction_id'];
    
    		$payment_info .= "\n" . __('Payment Total:', 'mp') . ' ' . number_format_i18n((float)$order->mp_payment_info['total'], 2) . ' ' . $order->mp_payment_info['currency'];
    	 $payment_info .= "\n\n";
    	 if ($order->post_status == 'order_received') {
    		$payment_info .= __('Your payment for this order is not yet complete. Here is the latest status:', 'mp') . "\n";
    		$statuses = $order->mp_payment_info['status'];
    		krsort($statuses); //sort with latest status at the top
    		$status = reset($statuses);
    		$timestamp = key($statuses);
    		$payment_info .= $this->format_date($timestamp) . ': ' . $status;
    	 } else {
    		$payment_info .= __('Your payment for this order is complete.', 'mp');
    	 }
  • Vinod Dalvi

    Hi Amir,

    Thank you for your reply.

    Could you please try using the following code in place of the previous code?

    $payment_info = __('Payment Method:', 'mp') . ' ' . $order->mp_payment_info['gateway_public_name'];
    
    		if ($order->mp_payment_info['method'])
    	 	$payment_info .= "\n <br />" . __('Payment Type:', 'mp') . ' ' . $order->mp_payment_info['method'];
    
    		if ($order->mp_payment_info['transaction_id'])
    			$payment_info .= "\n <br />" . __('Transaction ID:', 'mp') . ' ' . $order->mp_payment_info['transaction_id'];
    
    		$payment_info .= "\n <br />" . __('Payment Total:', 'mp') . ' ' . number_format_i18n((float)$order->mp_payment_info['total'], 2) . ' ' . $order->mp_payment_info['currency'];
    	 $payment_info .= "\n\n <br /><br />";
    	 if ($order->post_status == 'order_received') {
    		$payment_info .= __('Your payment for this order is not yet complete. Here is the latest status:', 'mp') . "\n <br />";
    		$statuses = $order->mp_payment_info['status'];
    		krsort($statuses); //sort with latest status at the top
    		$status = reset($statuses);
    		$timestamp = key($statuses);
    		$payment_info .= $this->format_date($timestamp) . ': ' . $status;
    	 } else {
    		$payment_info .= __('Your payment for this order is complete.', 'mp');
    	 }

    Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.