Stripe payment plugin two missing features

  • Posts: 344
  • Thank you received: 3
10 years 3 months ago #166215

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 2.5.22

I am missing two important feature in the Hikashop Stripe payment plugin

1. In the Stripe_end there should be a sentence informing the customers what he is going to pay. So that he feels safe that he is being charged for the correct amount.

2. Where the "Card validation code" is there should be a question which says "What i CVV?" And when the costumers hold the mouse over it he gets an explanation. This is standard in almost all payment system.

Please see piture below to see what I mean.



Is there any way I can impelemt these features myself ?

Attachments:
Last edit: 10 years 3 months ago by river.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #166250

Hi,

1. Edit the file plugins/hikashoppayment/stripe/stripe.php and add the line:

$this->order =& $order;
before the line:
return $this->showPage('end');

Then, in the file plugins/hikashoppayment/stripe/stripe_end.php you can add such PHP code:
<?php echo "Amount to pay, ".round($this->order->cart->full_total->prices[0]->price_value_with_tax)." kr including freight"; ?>

2. In that same plugins/hikashoppayment/stripe/stripe_end.php file, you can add the HTML you want to add such element. For example, you can use such code if you want to use the automatic tooltip system of joomla:
<?php echo JHTML::tooltip(JText::_('CVC_TOOLTIP_TEXT'), JText::_('CVC_TOOLTIP_TITLE'),
			'', 'What is CVV?'); ?>

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

  • Posts: 344
  • Thank you received: 3
10 years 3 months ago #166268

Thank you for reply. This works great =)

I have two more question

1)

<?php echo "Amount to pay, ".round($this->order->cart->full_total->prices[0]->price_value_with_tax)." kr including freight"; ?>

How can I make this font size bigger ...what code do I need to add ?

2)
<?php echo JHTML::tooltip(JText::_('CVC_TOOLTIP_TEXT'), JText::_('CVC_TOOLTIP_TITLE'),
			'', 'What is CVV?'); ?>

Where in the file /stripe_end.php should I add this code so it gets placed where I want it to be (se picture from first post) ?

Last edit: 10 years 3 months ago by river.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #166272

1. That's just CSS. For example:

<span style="font-size: 2em"><?php echo "Amount to pay, ".round($this->order->cart->full_total->prices[0]->price_value_with_tax)." kr including freight"; ?></span>

2. For example after:
<input style="text-align: center;" value="" type="text" maxlength="4" size="4" data-stripe="cvc">

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

  • Posts: 96
  • Thank you received: 1
7 years 10 months ago #258594

Hi,

I'm using the Stripe plugin, and I want to add the currency beside the amount in the code you had given.

And also, I want to limit the decimals of the amount at 2 digits, rounded eventually.

How can I do that, please ?

Thank's

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 10 months ago #258595

Hi,

The PHP round function have a parameter for the number of digits.
us3.php.net/manual/en/function.round.php

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 96
  • Thank you received: 1
7 years 10 months ago #258616

Hi,

Its ok for the decimals. Thank's

And about the currency, have you a solution, please ?

Best regards.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 10 months ago #258635

Hi,

You could do like that:
<?php $currencyClass = hikashop_get('class.currency'); ?>
<span style="font-size: 2em"><?php echo "Amount to pay: ".$currencyClass->format($this->order->cart->full_total->prices[0]->price_value_with_tax, $this->order->cart->full_total->prices[0]->price_currency_id); ?></span>

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

  • Posts: 96
  • Thank you received: 1
7 years 10 months ago #258697

Hi,

It's perfect.

Thank you very much.

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

  • Posts: 96
  • Thank you received: 1
7 years 9 months ago #261865

Hi,

I come back with an issue that I missed before.

On the site, the prices of the products are in MUR currency.
When I changed the currency, for example in Euro, the display amount is correct, but the currency is MUR, the currency of the product, instead of € (or Euro).

The link is : netweb3d.com/mauritiusproducts/fr/catego...fe-moulu-de-chamarel

You can use for testing the user This email address is being protected from spambots. You need JavaScript enabled to view it., pw : password.

Thank's for your help.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 9 months ago #261906

Hi,

I'm not sure. Try changing the code to:

<?php $currencyClass = hikashop_get('class.currency'); ?>
<span style="font-size: 2em"><?php echo "Amount to pay: ".$currencyClass->format($this->order->order_full_price, $this->order->order_currency_id); ?></span>

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

  • Posts: 96
  • Thank you received: 1
7 years 9 months ago #261911

Hi,

It's just perfect.

Thank you very much.

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

Time to create page: 0.087 seconds
Powered by Kunena Forum