Display Stripe Credit Card form above paypal

  • Posts: 82
  • Thank you received: 8
  • Hikashop Business
9 years 2 months ago #243534

-- url of the page with the problem -- : www.kathleenmcauliffe.com/checkout/check...ask-step/step-3.html
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.6
-- Browser(s) name and version -- : Chrome

Hi
I am using Paypal and Stripe for payment
on checkout users have to select either "Credit Card" (for Stripe) or Paypal


Then they are taken to the relevant page.
How can i simply show the credit card page (as shown in the image) immediately without them having to first select "Credit Card"

The paypal button could be shown underneath.
Could i for example copy the hikashop stripe plugin code into the checkout / payment.php page?
Thanks for any help

Last edit: 9 years 2 months ago by huwhuw.

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

  • Posts: 84233
  • Thank you received: 13675
  • MODERATOR
9 years 2 months ago #243550

Hi,

When you arrive on the stripe credit card form, the order has already been created, with the payment method assigned to it.
So it's a bit more complex than that.
You'll have to move the "payment" view in the 2nd step of your checkout and hide it with CSS.
That way, the finish button will be on the address step, and you'll get the stripe credit card form directly after that.
Then, you'll have to customize the "end" file of the "checkout" view to add a "pay by paypal" button below that credit card form.
That button will have to redirect to the ctrl=order&task=pay function of HikaShop with payment method and order_id in the URL, like it's done on the "pay" button of the orders listing of the customer when you have the "Payment of orders not paid immediately" and "Allow customers to change their payment method after checkout" settings turned on in the HikaShop configuration.

The following user(s) said Thank You: huwhuw

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

  • Posts: 82
  • Thank you received: 8
  • Hikashop Business
9 years 2 months ago #243621

Cool thanks Nicholas
I used your css suggestion but wasnt sure on the URL generation ctrl=order&task=pay for the button
I instead loaded a Hikashop Cart Module on the last checkout stage which has a paypal express button.
Your button solution would be neater - are there any examples of the URL?

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

  • Posts: 84233
  • Thank you received: 13675
  • MODERATOR
9 years 1 month ago #243624

Hi,

You can take a look at the code for the pay button in the file "listing" of the view "order".
It should be something like that:
index.php?option=com_hikashop&ctrl=order&task=pay&order_id=XXX&new_payment_method=YYY_ZZZ
where XXX is the id of the order, YYY is the name of the payment method ("paypal" in your case) and ZZZ the id of the payment method.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum