Email issue

  • Posts: 32
  • Thank you received: 0
11 years 3 months ago #146654

Hi,

I'm having a minor issue with some of the emails being sent out by hikashop during the checkout process. If a successful payment is made on worldpay then i receive the email in screenshotA (attached). Notice how in the first line of text after the "Hello" line, that the order status seems to be missing. Furthermore, If a payment is cancelled on worldpay then i receive the email in screenshotB (attached). Notice how in the first line of text after the "Hello" line, that the order status seems to be missing again. Where can i edit these files to put in the missing text (which i assume is coming from the database)? I have checked in the backend of hikashop (under "system->emails" but i definately dont see those emails being generated there.

Thanks

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 3 months ago #146669

Hi,
I just checked the code of the HikaShop WorldPay Business Gateway payment plugin, and I think that you should edit the file "plugins\hikashoppayment\bf_rbsbusinessgateway\bf_rbsbusinessgateway.php" and change this line :

		switch ($vars['transStatus']) {
			case 'Y':
				$payment_status = 'Authenticated';
				$order_status = $this->payment_params->verified_status;
				$history->notified = 1;
				break;
			default:
				$payment_status = 'Unknown';
				$order_status = $this->payment_params->invalid_status;
				$order_text = JText::sprintf('CHECK_DOCUMENTATION',HIKASHOP_HELPURL.'payment-rbsworldpay-error#pending')."\r\n\r\n".$order_text;
		}
		$mail_status=$statuses[$order->order_status];
		$email->subject = JText::sprintf('PAYMENT_NOTIFICATION_FOR_ORDER','Worldpay Business Gateway',$payment_status,$dbOrder->order_number);
		$body = str_replace('<br/>',"\r\n",JText::sprintf('PAYMENT_NOTIFICATION_STATUS','Worldpay Business Gateway',$vars['payment_status'])).' '.JText::sprintf('ORDER_STATUS_CHANGED',$mail_status)."\r\n\r\n".$order_text;
		$email->body = $body;
By :
		switch ($vars['transStatus']) {
			case 'Y':
				$payment_status = 'Authenticated';
				$order_status = $this->payment_params->verified_status;
				$history->notified = 1;
				break;
			default:
				$payment_status = 'Unknown';
				$order_status = $this->payment_params->invalid_status;
				$order_text = JText::sprintf('CHECK_DOCUMENTATION',HIKASHOP_HELPURL.'payment-rbsworldpay-error#pending')."\r\n\r\n".$order_text;
		}
		$mail_status=$statuses[$order->order_status];
		$email->subject = JText::sprintf('PAYMENT_NOTIFICATION_FOR_ORDER','Worldpay Business Gateway',$payment_status,$dbOrder->order_number);
		$body = str_replace('<br/>',"\r\n",JText::sprintf('PAYMENT_NOTIFICATION_STATUS','Worldpay Business Gateway',$order_status)).' '.JText::sprintf('ORDER_STATUS_CHANGED',$mail_status)."\r\n\r\n".$order_text;
		$email->body = $body;

Last edit: 11 years 3 months ago by Mohamed Thelji.
The following user(s) said Thank You: diesel1984

Please Log in or Create an account to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum