Jump to content

Using "prepayment" as payment method


Recommended Posts

Hello folks,

 

I hope somebody can help me.

 

I have this shop: "www.houseofliquid.de". I would like to use as payment methods only paypal and prepayment method. In German it is called "Überweisung" or "Vorkasse".

 

There is a module for this, which I activated and hooked to the payment. But it does not appear. Can somebody help me understand, what possibly is going wrong?

 

greetings,

George

Link to comment
Share on other sites

Paste the entire hookPayment function code here so we can see it

 

Did you configure the country and currencies options for this payment method?

 

Could you explain what you mean with "hookPayment function code"?

Where do I find it?

 

Edit: And yes I checked the payment restrictions and they were set correctly.

 

Here is a picture, that makes clear, what I meant:

8hzr9Ng.jpg

Edited by soigroeg (see edit history)
Link to comment
Share on other sites

The screen shot does not demonstrate that your country and currency settings for this payment module are correct.

 

Navigate to Modules | Payment section in back office, and confirm that the required countries, groups and currency settings are correct.

 

As for the hookPayment, you need to open the prepayment module code, and search for a function called hookPayment.

Link to comment
Share on other sites

tfTbLkV.jpg

You can see, that I can't choose anything at the currency control. Not sure why I can't.

 

And here is the image that shows that the country control is set up correctly:

PnsgMkr.jpg

 

 

And this is the code of the bankwire.php. I hope this helps:

 

public function hookPayment($params)
{
 if (!$this->active)
  return;
 if (!$this->checkCurrency($params['cart']))
  return;

 $this->smarty->assign(array(
  'this_path' => $this->_path,
  'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/'
 ));
 return $this->display(__FILE__, 'payment.tpl');
}
public function hookPaymentReturn($params)
{
 if (!$this->active)
  return;
 $state = $params['objOrder']->getCurrentState();
 if ($state == Configuration::get('PS_OS_BANKWIRE') || $state == Configuration::get('PS_OS_OUTOFSTOCK'))
 {
  $this->smarty->assign(array(
   'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false),
   'bankwireDetails' => Tools::nl2br($this->details),
   'bankwireAddress' => Tools::nl2br($this->address),
   'bankwireOwner' => $this->owner,
   'status' => 'ok',
   'id_order' => $params['objOrder']->id
  ));
  if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference))
   $this->smarty->assign('reference', $params['objOrder']->reference);
 }
 else
  $this->smarty->assign('status', 'failed');
 return $this->display(__FILE__, 'payment_return.tpl');
}

public function checkCurrency($cart)
{
 $currency_order = new Currency($cart->id_currency);
 $currencies_module = $this->getCurrency($cart->id_currency);
 if (is_array($currencies_module))
  foreach ($currencies_module as $currency_module)
   if ($currency_order->id == $currency_module['id_currency'])
 return true;
 return false;
}
}

Link to comment
Share on other sites

Ok, you are using the bankwire module

 

Is the bankwire module installed and enabled? Did you configure the bankwire module and add the bank information?

Are you using a custom theme?

 

When you checkout, have you confirmed that your shipping/delivery address is one of the checked countries?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...