-
Re: Stripe.com payment integration module
I am not sure exactly how i did it but it seems to now be displaying with klarna and clearpay options as expected... Also, this shows up in a different place on my crazygamer store, i get checkout payment options and fields usually on step 2 of 3, seemed a bit odd to be different. has that location been changed on my crazygamer site during initial setup and that is why i was the only person to think that order comments error was weird?
if i move the crazygamer one too stripe now takepayments will be upset but i'm ready to move providers, they promised me klarna 2 years ago was "in the works" and now they are making a v2 module... without klarna because it still hasn't been sorted?? :/ Is this module going to give me install headaches on my crazygamer site or possibly appear in what is apparently the wrong place?
-
Re: Stripe.com payment integration module
I have a customer who used to use a card number (call it "old"). That card has been replaced by a "new" one, that works fine outside of my store.
On the checkout, even though she enters the "new" card number manually, it still tries to use the "old" card.
She unchecks the "use the default card...", but it re-checks it when she tries to check out
She cleared the cache on her computer
On her Stripe account, I even removed the default card so there is nothing, and the "old" card does not appear anywhere.
Yet, it still tries to use it when she checks out.
So my question is whether the "old" card information is somewhat stuck in the checkout. Is there a way to "clear the cache" on that?
(using ZC 1.5.7c)
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
CaroleAs
I have a customer who used to use a card number (call it "old"). That card has been replaced by a "new" one, that works fine outside of my store.
On the checkout, even though she enters the "new" card number manually, it still tries to use the "old" card.
She unchecks the "use the default card...", but it re-checks it when she tries to check out
She cleared the cache on her computer
On her Stripe account, I even removed the default card so there is nothing, and the "old" card does not appear anywhere.
Yet, it still tries to use it when she checks out.
So my question is whether the "old" card information is somewhat stuck in the checkout. Is there a way to "clear the cache" on that?
(using ZC 1.5.7c)
I am not sure if that is a solution but this worked for me:
- I created an invoice on Stripe for the price of the purchase the customer wanted to buy minus $1
- the customer paid the invoice using her "new" card
- I gave a discount coupon to the customer in the amount of the invoice
- she went through the checkout, using the coupon code and paid $1
- she entered her new card number and proceeded
Now, in Stripe, her new card is set as default so everything is fine and she is set for future purchases.
So, I am not sure if had anything to do with the store, the Stripe module, or what. But this issue is now solved.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
CaroleAs
I have a customer who used to use a card number (call it "old"). That card has been replaced by a "new" one, that works fine outside of my store.
On the checkout, even though she enters the "new" card number manually, it still tries to use the "old" card.
She unchecks the "use the default card...", but it re-checks it when she tries to check out
She cleared the cache on her computer
On her Stripe account, I even removed the default card so there is nothing, and the "old" card does not appear anywhere.
Yet, it still tries to use it when she checks out.
So my question is whether the "old" card information is somewhat stuck in the checkout. Is there a way to "clear the cache" on that?
(using ZC 1.5.7c)
She has to clear her credit card information from your site database before using the new credit card.
(Customer's credit cards information are encrypted and stored in the database.)
How to clear her credit card information.
1. Log in your site.
2. Go to "My account" page.
3. "Stripe credit card information [Clear]" will be displayed.
4. Push the [Clear]button.
5. "Stripe credit card information [Clear]" will be disappeared.
It's difficult for users to understand.
:laugh:Next, let's think about how to do it.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
Gozzandes
She has to clear her credit card information from your site database before using the new credit card.
(Customer's credit cards information are encrypted and stored in the database.)
How to clear her credit card information.
1. Log in your site.
2. Go to "My account" page.
3. "Stripe credit card information [Clear]" will be displayed.
4. Push the [Clear]button.
5. "Stripe credit card information [Clear]" will be disappeared.
It's difficult for users to understand.
:laugh:Next, let's think about how to do it.
I am glad there is a way. I didn't know about that. Luckily, the workaround worked, but this would have been easier!
Thanks!
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
CaroleAs
I am glad there is a way. I didn't know about that. Luckily, the workaround worked, but this would have been easier!
Thanks!
An error occurs in the following php.
\www\includes\modules\payment\stripepay\create.php line 69
Please change from
$order->info['comments'] =$_SESSION['order_add_comment'];
to
if(isset($order_add_comment)){
$order->info['comments'] =$_SESSION['order_add_comment'];
}
This fix will be included in the next update.
-
1 Attachment(s)
Re: Stripe.com payment integration module
My zencart site is in stripe live mode and have run some test checkouts, all payments are displyed on stripe dashboard as completed, however, there is also an associated incomplete payment with each completed payment, which displays 'The customer has not entered their payment method.', see below:
Attachment 20493
It seems like payments are going through and this is a small error, but it would be good to not have the 'incomplete' messages.
-
Re: Stripe.com payment integration module
i read that myself to say one is actually the recording of the initial payment intent, after that you see the result only if they proceeded to enter their details and pay.
Plus side though, say you get an account created but no order... you will be able too see if they went too the payment details page with that payment intent and you will be able to check the total too ensure nothing is amiss.
Useful to keep an eye on that page after upgrades to your site to ensure all is well. Never complain about extra information, it could one day prove helpful :)
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
Gozzandes
An error occurs in the following php.
\www\includes\modules\payment\stripepay\create.php line 69
Please change from
$order->info['comments'] =$_SESSION['order_add_comment'];
to
if(isset($order_add_comment)){
$order->info['comments'] =$_SESSION['order_add_comment'];
}
This fix will be included in the next update.
hmmmm....
in looking at the code (which i think is the latest download and for v158) i see:
PHP Code:
//---comments---
if($order->info['comments']!=""){
$order_add_comment = $order->info['comments'];
$_SESSION['order_add_comment'] = $order_add_comment;
}
$order->info['comments'] =$_SESSION['order_add_comment'];
line 69 being the last line...
why is that line even needed? makes little sense to me.... it seems like one could delete that line with no ill effect...
adding another conditional seem completely unnecessary.
-
Re: Stripe.com payment integration module
[QUOTE=carlwhat;1399450]hmmmm....
in looking at the code (which i think is the latest download and for v158) i see:
There are two "Order confirm" buttons, one for Zen cart and one for Stripe.
When Stripe form is displayed, the Zen cart button is hidden and the stripe button is displayed.
When a customer presses the stripe "Order confirm" button and the zen cart "Order confirm" button is automatically pressed.
The first Stripe "order confirmation" button will process the payment through Stripe, and the second Zen cart"order confirmation" button will send the purchase data to Stripe, but the payment will not be processed.
Therefore, the first stripe ID is true and the second one is false.
I could not integrate Stripe buttons and Zen cart buttons.
If you have any ideas, please provide them.
-
Re: Stripe.com payment integration module
unfortunately this 2 button thing has nothing to do with my comment.
i am only commenting on a very small snippet of code, for which you state you are making a change in your next release.
perhaps when i have more time, i can give you help with regards to other issues you may be having.
but i would appreciate a response to my coding suggestion.
best.
-
Re: Stripe.com payment integration module
Thanks for the clarification. I use stripe on a woocommerce installation and I don't see the incomplete orders each time an order is completed, just the completed order. I think Gozzandes explained why this is happening in post #310. If it's not going to cause any problems then that's ok.
-
Re: Stripe.com payment integration module
Thanks for the explaination as to why there is an incomplete entry on stripe.com payments dashboard with each completed entry. If I was a php programmer I would surely help you out with this. Thank you for your contribution.
-
Re: Stripe.com payment integration module
We are accepting stripe payments on our site www.theatregiftvouchers.co.uk however we are receiving some failed payments. On reviewing the payments it is where the banks are requiring authentication 'The bank returned the decline code authentication_required. '. We are currently running ZenCart 1.5.4 and Stripe Payment 1.3.3 or 1.3.4.
Is it possible to include authentication on this version or do we need to upgrade?
Thanks
-
Re: Stripe.com payment integration module
ZC V1.5.8
OPC V2.5.1 (but currently not using it yet)
STD ZC checkout
Stripe Payments : Credit Card (stripe_modules_2.0.4)
Hi,
this is in test mode.
I have it showing and half working in that the payment gets sent to stripe but with a issue no customer details gets sent so stripe puts the customer down as guest i need the customer details to also be sent to stripe.
also and the main issue I'm having is that after i click the button to sent payment all that happens is the customer get's (Login Time Out) and no sale is made in my zen cart and no errors are given that I can find.
can someone please help me
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
DLegend10
We are accepting stripe payments on our site
www.theatregiftvouchers.co.uk however we are receiving some failed payments. On reviewing the payments it is where the banks are requiring authentication 'The bank returned the decline code authentication_required. '. We are currently running ZenCart 1.5.4 and Stripe Payment 1.3.3 or 1.3.4.
Is it possible to include authentication on this version or do we need to upgrade?
Thanks
version 1.3.4 is outdated too much you should upgrade or switch to square as the new version only works on 1.5.7 upwords only which means you would need to upgrade your zen cart also.
but first try this and see what outcome you got:
Use the following Sandbox environment testing credit cards details to test the payment process.
Successful Payment Card VISA (Without 3D Secure) - 4242424242424242
Requires Authentication Card VISA (With 3D Secure) - 4000002500003155
Failed Payment Card VISA - 4000000000009995
Select any future valid expiration date (month/year) & CVC is 123
and if this doesn't work then as your in the UK you must be able to use 3D if and when a card issuer askes and if you don't then I believe any or all transactions can be charged back without question or reply.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
dbltoe
What we are finding so far is that Stripe is not working with OPC and, unlike Square, does not show up automatically on the payment page of standard checkout either.
Instead, you have to select the Stripe payment method and hit enter to bring up the form for numbers.
I've managed to get Stripe working with OPC. I've had orders complete using test card data. It's now been handed over to the client to do some live testing.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
strelitzia
I've managed to get Stripe working with OPC. I've had orders complete using test card data. It's now been handed over to the client to do some live testing.
Congratulations! Are you going to package it up to replace the current version in the Plugins?
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
lat9
Congratulations! Are you going to package it up to replace the current version in the Plugins?
I will do once client testing has confirmed no issues.
I'd like to try and get rid of the init_header.php override too if possible.
Are there any notifiers available to manage this Cindy?
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
strelitzia
I will do once client testing has confirmed no issues.
I'd like to try and get rid of the init_header.php override too if possible.
Are there any notifiers available to manage this Cindy?
There are no notifications in /includes/init_includes/init_header.php, but what's being overridden there? Perhaps, depending on the need, there's a more 'friendly' spot to watch.
-
Re: Stripe.com payment integration module
Hi,
I have just removed and reinstall stripe_modules_2.0.4 to confirm it is not me and i get the same results:
using 3-step checkout (have got OPC but have it set to: Enable One-Page Checkout false)
1. after submitting the payment i get a:
a. Whoops! Your session has expired. (https://phpstack-1180590-4294982.clo..._page=time_out)
2. the products I'm adding to the shopping cart are (
2 x https://phpstack-1180590-4294982.clo...roducts_id=339
priced at £35.00 each,
with a cat SUB-TOTAL: £70.00
(this is correct)
then i go to checkout using 3-page checkout
Step 1 of 3 - Delivery Information £6.99 is added for shipping,ExpirationMM
Step 2 of 3 - Payment Information shows:
Your Total
£70.00 Sub-Total:
-£7.00 Group Discount:
-£40.00 Multibuy Discount:
£6.99 (Standard (3-5 Days) (£6.99) (2: 1 x £6.99 per 17)):
£29.99 Total:
(again this is correct)
Payment Method
Stripe Payments : Credit Card is auto selected due to it being the only payment method i offer.
confirm T&C
Step 3 of 3 - Order Confirmation:
Products
Qty. Product Name Total
2 x 2 for 30.00 first item£70.00
Sub-Total: £70.00
Group Discount:-£7.00
Multibuy Discount: -£40.00
(Standard (3-5 Days) (£6.99) (2: 1 x £6.99 per 17)):£6.99
Total:£29.99
29.99 will be charged to the payment method.
(at this point doing a echo $order->info['total'] shows £29.99 and this is correct.)
select stripe credit card -
enter card: 4242 4242 4242 4242 (test card)
enter Expiration: 11/26
enter CVC: 123
enter postcode: TW3 1YN
click pay.
get Whoops! Your session has expired.
then look in admin and no order is made.
look in stripe dashboard and see the payment as:
Payment details
Statement descriptor
ONLINE-JUNCTION.CO.UK
Amount
£76.99
Fee
£2.70
Net
£74.29
Status
Succeeded;
this is wrong as it has been padded the order total before discount?
)
test login details (will be deleted within 48 hours)
username: simonjohnrandall at gmail dot com
password: Pownall5968@
site url: https://phpstack-1180590-4294982.clo...ain_page=login (site still in development)
product used above: should be in cart else it's 2 X https://phpstack-1180590-4294982.clo...roducts_id=339
shipping is set to selecting lowest price shipping option which should be the £6.99.
can someone please help me on this as this should not be the way this is working.
also thr return url is coded as: $confirmationURL = '"' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'index.php?main_page=checkout_confirmation"'; (line 62: includes\modules\payment\stripepay\create.php)
-
Re: Stripe.com payment integration module
this is wrong as it has been padded the order total before discount?
should read as:
this is wrong as it has been paid the order total before discount?
-
Re: Stripe.com payment integration module
carlwhat,
Can you please help on this??
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
OJ_SIMON
carlwhat,
Can you please help on this??
i am not really sure for what sort of help you are asking. you have a lot of things going on.
i do not have a working copy of this payment module, so i can not really provide help on it. i would think @Gozzandes who submitted the last version of it perhaps could help. or maybe @strelitzia would like to help, as he seems to have it working with OPC.
getting a page time out AFTER already charging a card and collecting the money is not good; and those page time outs can be tricky to debug. but i have no experience with this module. i only some times make comments on the code when it seems off.
best.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
carlwhat
i am not really sure for what sort of help you are asking. you have a lot of things going on.
i do not have a working copy of this payment module, so i can not really provide help on it. i would think @Gozzandes who submitted the last version of it perhaps could help. or maybe @strelitzia would like to help, as he seems to have it working with OPC.
getting a page time out AFTER already charging a card and collecting the money is not good; and those page time outs can be tricky to debug. but i have no experience with this module. i only some times make comments on the code when it seems off.
best.
Thank you for that and sorry for mistaking you for the plugin maker.
-
Re: Stripe.com payment integration module
The installer has hardcoded table names and doesn't take into consideration the table prefix.
-
Re: Stripe.com payment integration module
Don't know if they mention it in the readme, etc., but using the Install SQL Patches in the admin will automatically look for a prefix and react accordingly.
https://docs.zen-cart.com/user/admin...l_sql_patches/
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
dbltoe
This hard coding is in the install() function of the payment module in the 1.5.7 directory. I didn't check the 1.5.8 directory to see if it also has the issue.
-
Re: Stripe.com payment integration module
Hi Numinix,
I have found the current Stripe plugin to be sending the wrong amount to Stripe, it is sending the befor order total discount (that's the shopping cart subtotal)and before coupon discount total (the checkout total).
So I have been working on a new Stripe plugin which I'm trying to get to work like this:
client fills card details in on checkout payment page under payment method while the page submit main form is stopped from submitting then once received token response from stripe (checkout payment page url is set as return url) (no payment is taken on this page we send checkout total before coupon total) release the main form to be submittable again so they can enter coupon code and submit the main form. (which is the only time we get to know how much the coupon is worth if any). Then on the checkout confirmation page (again we still don't know the coupon cost until the page loads and it has to refreshes again) we show under the confirmation payment method, order details with the total order value (inc all coupon and discount) and a Pay $xx.xx Now button for the customer to pay without the page submitting as again we have to stop the main page from submitting.
(also let's not go into why on the confirmation page clients still get the chance to amend the hole order, when does Zen Cart give the payment method a fixed unchangeable total! yep on the success page a bit late on that payment should of been made by then actully by confirmation page/section).
and that is just to have a good flow looking checkout for the client on the 3 page checkout and for the one-page-checkout plugin it is much the same as the one thing they have overlooked is payment method plugin's have two parts to taking a payment one is the payment method select box and the second is the confirm payment method box (which is the box the data should be entered in to). so one-checkout should include the confirmation payment box from the confirmation page and have it listed under the select payment method box.
so whit that in mid,
I have got your Fast and Easy Checkout plugin I'm just in the middle of installing and updating for Zc v1.5.8 then make the checkout flow as it should be and integrate Stripe in to it as it should be then ask you if you can test it on your paid for Ajax Fast and Easy Checkout's then we we have a checkout working with and for Stripe and as to the other main and or one-checkout to work with my Stripe plugin the Zen Cart team and or one-checkout maker will have to amind there flow to be compatible.
So my question to you is would you like to help out on getting all this working and I will offer the Stripe-Plugin and you can offer the Fast and Easy Checkout (all 3 grades of it).
-
Re: Stripe.com payment integration module
Sorry for not updating recently.
I've been busy with work and haven't been able to do anything.
www\includes\modules\payment\stripe.php line 146
$amount_total=round($order->info['total']*$order->info['currency_value'],$decimal_places)*$multiplied_by;
I think it will be OK if you change it to the code below, but I haven't tested it.
if (MODULE_ORDER_TOTAL_INSTALLED) {
$order_totals = $order_total_modules->process();
$c = count($order_totals);
$c -= 1;
$order_value = $order_totals[$c]['value'];
} else{
$order_value = $order->info['total'];
}
$amount_total=round($order_value * $order->info['currency_value'],$decimal_places)*$multiplied_by;
:wacko:
-
Re: Stripe.com payment integration module
1.
www\includes\modules\payment\stripe.php line 119
change the code from
global $order, $db,$stripeCustomerID,$user_id,$stripe_select;
to
global $order, $db,$stripeCustomerID,$user_id,$stripe_select,$order_total_modules;
2.
www\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_confirmation_default .php
You have to find following code and delete it.
<?php
if (MODULE_ORDER_TOTAL_INSTALLED) {
$order_totals = $order_total_modules->process();
?>
-
Re: Stripe.com payment integration module
Hi,
Thank you for offering the updated stripe payments module. We would like to add apple pay to our site and stripe seems like the best option. We have installed the mod on a test site and noticed a couple of issues during testing.
1) When using one page checkout (OPC) the stripe form is not appearing. This has been mentioned by other users and I believe strelitzia may have found a possible fix. I have tried adding the javascript files to OPC pages but it still did not work.
2) We noticed the path through payment process doesn’t seem to follow the usual checkout procedure. Payment modules often have a process similar to the following: customer clicks confirm at checkout_confirmation page – then on a new page card details are entered – customer is then sent to checkout_process page – if payment is successful customer will be redirected automatically to checkout_success page.
We are unsure why the $confirmationURL in create.php has been set to the checkout_confirmation page. I believe this should ideally be the checkout_process or checkout_success page.
As mentioned in post 307 the stripe dashboard shows an incomplete payment for every successful one. This could be because the customer is redirected from checkout_confirmation to checkout_confirmation when completing a stripe payment.
There is an informative post from DrByte on another thread in 2015 which explains the usual path through payment process.
If the checkout procedure for the mod could be amended it may remove the need to hide the confirm order button as mentioned in post 310.
Several core file edits/overrides are made, particularly to the checkout_confirmation page. If card details were entered on a separate (new) page the mod may not need core file edits - making it easier to install and could help avoid integration issues.
I’m sure apple pay and google pay would be a popular feature with customers – particularly if they could be used with the guest checkout feature of OPC.
If anyone can offer advice or help to resolve either of these issues it would be much appreciated.
Many thanks
Richard
-
Re: Stripe.com payment integration module
> When using one page checkout (OPC) the stripe form is not appearing. This has been mentioned by other users and I believe strelitzia may have found a possible fix. I have tried adding the javascript files to OPC pages but it still did not work.
I haven't tried OPC, so I haven't confirmed it, but maybe
You need to place the following script code in the header of the page that displays the Stripe form.
This is \includes\modules\pages\checkout_confirmation\jscript_stripe.php.
If you place the codes in OPC's header, I think the stripe form will be displayed.
<?php if(MODULE_PAYMENT_STRIPE_STATUS === 'True' && $stripe_select == 'True' ) {?>
<link rel="stylesheet" href="checkout_confirmation.css" />
<script src="https://js.stripe.com/v3/"></script>
<script src="includes/checkout.js" defer></script>
<?php } ?>
> We noticed the path through payment process doesn’t seem to follow the usual checkout procedure. Payment modules often have a process similar to the following: customer clicks confirm at checkout_confirmation page – then on a new page card details are entered – customer is then sent to checkout_process page – if payment is successful customer will be redirected automatically to checkout_success page.
I have the same opinion.
The reason why I chose this unnatural process is because
The form provided by Stripe and payment button must be the same page.
Additionally, by using the Stripe form, the credit information are directly sent to the Stripe server, resolving the risk of using the $_GET or $_POST function during payment.
> We are unsure why the $confirmationURL in create.php has been set to the checkout_confirmation page. I believe this should ideally be the checkout_process or checkout_success page.
The following variables in create.php are used in \includes\checkout.js.
Clients
PublishableKey
confirmationURL
PaymentSuccess
Also, checkout.js is used for the checkout_confirmation page.
> As mentioned in post 307 the stripe dashboard shows an incomplete payment for every successful one. This could be because the customer is redirected from checkout_confirmation to checkout_confirmation when completing a stripe payment.
exactly.
After pressing the order confirm button, \includes\modules\payment\stripe.php and create.php are reprocessed.
as the result incomplete payment is added.
-
Re: Stripe.com payment integration module
Hi Gozzandes
Many thanks for your reply. I have uploaded the suggested code (jscript_stripe.php) to includes/modules/pages/checkout_one but unfortunately it still did not appear.
When checking the browser web developer console the javascript did not load.
For testing purposes I removed the following code:
if(MODULE_PAYMENT_STRIPE_STATUS === 'True' && $stripe_select == 'True' )
The javascript now loads in the web developer console but the stripe form does not display.
An error is now displayed in the console: ReferenceError: Can't find variable: PublishableKey
This suggests that the includes/modules/payments/stripe.php file may not be loading correctly when using OPC.
It would be much appreciated if anyone could help advise why OPC seems unable to load the files required by the stripe module. Perhaps lat9 or strelitzia may be able to help.
Many thanks
Richard
-
Re: Stripe.com payment integration module
I'll explan flow of the credit Card Information.
1. Check out payment page(Step 2 of 3 -Payment Information)
Select "Stripe Payments : Crédit Card" and click "Continue" button.
and call Payment module.
2. Payment module
\includes\modules\payment\Stripe.php
line 121 to 129 =>Call Stripe publishable key and secret key.
line 131 to 146 =>Calculate currency Information.
line 146 to 154 =>Enter customer and order information into variables.
line 156 call create.php
\includes\modules\payment\stripepay\create.php
line 8 to 46=>Create Stripe paymentintent.
line 49 to 58=>Extract Stripe Client secret.
Variable Client secret
PHP : $clientS_json
Script : ClientS
3. checkout_confirmation page(Step 3 of 3 - Order Confirmation)
Following files are opened.
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_confirmation_default.ph p
\includes\modules\pages\checkout_confirmation\jscript_stripe.php
\includes\checkout.js
and Stripe form displayed.
\includes\templates\YOUR_TEMPLATE\templates\tpl_checkout_confirmation_default.ph p
line 167 to 177 Stripe form
line 196 to 206 If Stripe ClientS exist, original zen cart confirm button will not be displayed and Stripe button will be displayed.
4. Push Stripe confirm button.
Payment succeeded : Goto \includes\checkout.js line 75. and original zen cart confirm button will be clicked.
If you want to Display Stripe form, Stripe form Needs Client secret (ClientS) before opeing.
Client secret requests order total,currency,customer Name and payment methods.
Based on the flow above, when using OPC, Client secret should be generated after clicking the checkout button.
You need to create a file in \includes\modules\pages\checkout_payment\ folder that contains the code to display the stripe form.
-
Re: Stripe.com payment integration module
I may build a module for OPC, but I am currently in the busy farming season, I won't be able to do anything until September.
:no:
-
Re: Stripe.com payment integration module
Hi Gozzandes
Thank you for explaining the flow of credit card information and for your suggestion on how to fix the issue. Unfortunately I have been unable to get OPC and stripe to work together. It appears that a separate page or mod may be required. If you are able to either update the stripe mod or create a new mod in future it would be much appreciated.
Many thanks
Richard
-
Re: Stripe.com payment integration module
Before I make this update push, I was receiving error messages on the customer side (ZC 2.0.1 / PHP 8.3 / Mod version 2.05) stating that the table "myprefix_stripe" was not available. I ended up finding a table just named "stripe" in my database listing. I renamed that database as necessary and everything worked nominally.
Then noticed the following code:
in \www\includes\modules\payment\stripe.php (both directories)
PHP Code:
$db-> execute("CREATE TABLE stripe(id INT(11) AUTO_INCREMENT PRIMARY KEY,customers_id INT(11),Stripe_Customers_id VARCHAR(32))");
Should this code be changed to:
PHP Code:
$db-> execute("CREATE TABLE " . DB_PREFIX . "stripe(id INT(11) AUTO_INCREMENT PRIMARY KEY,customers_id INT(11),Stripe_Customers_id VARCHAR(32))");
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
retched
Before I make this update push, I was receiving error messages on the customer side (ZC 2.0.1 / PHP 8.3 / Mod version 2.05) stating that the table "myprefix_stripe" was not available. I ended up finding a table just named "stripe" in my database listing. I renamed that database as necessary and everything worked nominally.
Then noticed the following code:
in \www\includes\modules\payment\stripe.php (both directories)
PHP Code:
$db-> execute("CREATE TABLE stripe(id INT(11) AUTO_INCREMENT PRIMARY KEY,customers_id INT(11),Stripe_Customers_id VARCHAR(32))");
Should this code be changed to:
PHP Code:
$db-> execute("CREATE TABLE " . DB_PREFIX . "stripe(id INT(11) AUTO_INCREMENT PRIMARY KEY,customers_id INT(11),Stripe_Customers_id VARCHAR(32))");
Yes - if this is just for your own use,
No - if it is for use by others also.
-
Re: Stripe.com payment integration module
Code:
define('TABLE_STRIPE', DB_PREFIX . 'stripe');
PHP Code:
$db-> execute("CREATE TABLE " . TABLE_STRIPE . "(id INT(11) AUTO_INCREMENT PRIMARY KEY,customers_id INT(11),Stripe_Customers_id VARCHAR(32))");
the above is how it should be done then anyone can use it without having to change code.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
OJ_SIMON
Code:
define('TABLE_STRIPE', DB_PREFIX . 'stripe');
PHP Code:
$db-> execute("CREATE TABLE " . TABLE_STRIPE . "(id INT(11) AUTO_INCREMENT PRIMARY KEY,customers_id INT(11),Stripe_Customers_id VARCHAR(32))");
the above is how it should be done then anyone can use it without having to change code.
Noted. I forgot that the TABLE_ constants are always accessible. Submitting now.
-
Re: Stripe.com payment integration module
can i ask what this upgrade version is fixing or dealing with?
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
OJ_SIMON
can i ask what this upgrade version is fixing or dealing with?
Just a bugfix for configurations that are using table prefixes.
The native code makes a call to a database table named `TABLE_STRIPE` but on the modules installation, it only makes a table named 'stripe' and ignores the prefix configuration. If this module is already working, you don't need to change anything (this means your ZenCart tables do not have prefixes and works fine with the table named just stripe). However, if someone just snags the module from the plugins directory and they do have table prefixes configured, they'll run into errors as the table is wrongly named and referred to incorrectly in the database define.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
retched
Just a bugfix for configurations that are using table prefixes.
The native code makes a call to a database table named `TABLE_STRIPE` but on the modules installation, it only makes a table named 'stripe' and ignores the prefix configuration. If this module is already working, you don't need to change anything (this means your ZenCart tables do not have prefixes and works fine with the table named just stripe). However, if someone just snags the module from the plugins directory and they do have table prefixes configured, they'll run into errors as the table is wrongly named and referred to incorrectly in the database define.
Seem needed.
can i also ask if you have or could check if the amount sent to Stripe is the correct amount when using the following:
1. a coupon,
2. a product that has a offer price,
I only ask this because in my installation the only amount sent to stripe is the total before any discount is applied?
-
Re: Stripe.com payment integration module
I can check on the first in a few but can you explain the second? What do you mean by "offer price"?
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
retched
I can check on the first in a few but can you explain the second? What do you mean by "offer price"?
a offer made via SaleMaker in admin
-
Re: Stripe.com payment integration module
Code:
$i = count($order_totals);
$i -= 1;
echo $order_totals[$i]['value'];
gets the full total amount to send to Stripe but I can only get it to work on index.php?main_page=checkout_confirmation page and need to get this to
includes/modules/payment/stripe.php
line 146
PHP Code:
$amount_total=round($order->info['total']*$order->info['currency_value'],$decimal_places)*$multiplied_by;
should be like
PHP Code:
$i = count($order_totals); $i -= 1;
$order_value = $order_totals[$i]['value'];
$amount_total = round($order_value * $order->info['currency_value'], $decimal_places) * $multiplied_by;
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
OJ_SIMON
Code:
$i = count($order_totals);
$i -= 1;
echo $order_totals[$i]['value'];
gets the full total amount to send to Stripe but I can only get it to work on index.php?main_page=checkout_confirmation page and need to get this to
includes/modules/payment/stripe.php
line 146
PHP Code:
$amount_total=round($order->info['total']*$order->info['currency_value'],$decimal_places)*$multiplied_by;
should be like
PHP Code:
$i = count($order_totals); $i -= 1;
$order_value = $order_totals[$i]['value'];
$amount_total = round($order_value * $order->info['currency_value'], $decimal_places) * $multiplied_by;
I'll look into both of these but no promises as I have a bit of work ahead of me.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
retched
I'll look into both of these but no promises as I have a bit of work ahead of me.
could I hire you (paid service) to help me make a new plugin from scratch for stripe
-
Re: Stripe.com payment integration module
Sorry for making you wait.
The previous module had a problem. Stripe ID generated twice for a single order, but I resolved it today and uploaded a new module. Please wait until it is published.:smile:
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
Gozzandes
Sorry for making you wait.
The previous module had a problem. Stripe ID generated twice for a single order, but I resolved it today and uploaded a new module. Please wait until it is published.:smile:
Did you also get to the table error?
-
Re: Stripe.com payment integration module
Is there any way to change the payment confirmation page layout from tabs to accordion without radio buttons?
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
jmsnyder23
Is there any way to change the payment confirmation page layout from tabs to accordion without radio buttons?
Hi,
Yes it is possible to change the layout of the stripe payment options from tabs to accordion (without radio buttons). The stripe documentation details the various layout options available.
find the following code in checkout.js
Code:
const paymentElementOptions = {
layout: "tabs",
};
then change it to the following:
Code:
const paymentElementOptions = {
layout: {
type: 'accordion',
defaultCollapsed: true,
radios: false,
spacedAccordionItems: true
}
}
The defaultCollapsed option can be set to true or false depending on what look you prefer. It is also possible to change the order of the payment methods (e.g. to show Apple Pay first).
Richard
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
richard7315
It is also possible to change the order of the payment methods (e.g. to show Apple Pay first).
Richard
This is not a option as you have put it - as there is only two options on showing/listing of payment methods with stripe:
"Manage payment methods from the Dashboard" or "Manually list payment methods" with only the later having the ability of "changing the order of payment methods" to do this you would have to harded code each method you wish to display and the down side of this is that errors can end up being displayed to your customers if stripe would not of displayed this method if the setting was of "Manage payment methods from the Dashboard" so I would say try your best to use the default setting of "Manage payment methods from the Dashboard" as Stripe uses many factors to decide if a method should or should not be displayed which would be too large to code these within a if statement and at lest one factor is fraud detection.
-
Re: Stripe.com payment integration module
This is the best option on this point:
https://docs.stripe.com/payments/pay...ration-options
Use dynamic payment methodshttps://b.stripecdn.com/docs-statics...10ca4963de.svg
[COLOR=var(--sail-color-text)]Stripe dynamically displays the most relevant payment methods to your customers based on the payment method preferences you set in the Dashboard and eligibility factors such as transaction amount, currency, and payment flow. To enable and manage your payment method preferences, go to the Dashboard. Stripe enables certain payment methods for you by default and might enable additional payment methods after notifying you.[/COLOR]
[COLOR=var(--sail-color-text)]Unless you have to list payment methods manually, we recommend using dynamic payment methods. Dynamic payment methods automatically determines whether to display payment methods according to set rules.[/COLOR]
[COLOR=var(--sail-color-text)]See Dynamic payment methods to learn more.[/COLOR]
Manually list payment methodshttps://b.stripecdn.com/docs-statics...10ca4963de.svg
[COLOR=var(--sail-color-text)]Listing payment methods manually requires some coding. Every payment method you want your PaymentIntent to accept must be added to payment_method_types. Unless your integration requires that you list payment methods manually, we recommend that you manage payment methods from the Dashboard. Stripe handles the return of eligible payment methods based on factors such as the transaction’s amount, currency, and payment flow.[/COLOR]
-
Re: Stripe.com payment integration module
Hi,
Apologies for not being clearer - I believe it is possible to change the sort order of the stripe payment methods by using the paymentMethodOrder array.
Any payment methods listed in the paymentMethodOrder (such as Apple Pay or Google Pay) will be displayed first – other methods turned on in the dashboard will then be automatically added lower down the list.
I have not had a chance to test this yet, but I can’t see any reason why it wouldn’t work.
Full details on this feature are available here
Stripe will dynamically show payment methods that are available to your customer (e.g. Apple Pay will only be displayed if the customer is signed up).
Richard
-
2 Attachment(s)
Re: Stripe.com payment integration module
Hi,
I have been testing the latest stripe module for Zen Cart 2.0.1. Unfortunately, there appears to be a few minor issues.
1)After uploading the header_php.php file in the checkout_payment folder a PHP warning is logged (--> PHP Warning: Undefined variable $gv_balance in /includes/templates/template_default/templates/tpl_checkout_payment_default.php on line 206.).
This seems to be because the 1.5.8 file has been included with the mod instead of the 2.0.1 file.
2)When accessing the checkout_confirmation page the following PHP warnings are logged:
Code:
[11-Jul-2024 17:53:04 Europe/London] Request URI: /index.php?main_page=checkout_confirmation, Language id 1
#0 /includes/modules/payment/stripepay/create.php(69): zen_debug_error_handler()
#1 /includes/modules/payment/stripe.php(165): require_once('/home/virtual/v...')
#2 /includes/classes/payment.php(248): stripe->pre_confirmation_check()
#3 /includes/modules/pages/checkout_confirmation/header_php.php(92): payment->pre_confirmation_check()
#4 /index.php(35): require('/home/virtual/v...')
--> PHP Warning: Undefined array key "order_add_comment" in /includes/modules/payment/stripepay/create.php on line 69.
[11-Jul-2024 17:53:04 Europe/London] Request URI: /index.php?main_page=checkout_confirmation, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/templates/responsive_classic/common/html_header.php(20): header()
#2 /index.php(42): require('/home/virtual/v...')
--> PHP Warning: Cannot modify header information - headers already sent by (output started at /includes/modules/payment/stripepay/create.php:76) in /includes/templates/responsive_classic/common/html_header.php on line 20.
3)If an alternative payment method is selected (such as check/money order) the following PHP warning is logged:
Code:
[11-Jul-2024 17:58:22 Europe/London] Request URI: /index.php?main_page=checkout_confirmation, Language id 1
#0 /includes/modules/pages/checkout_confirmation/jscript_stripe.php(1): zen_debug_error_handler()
#1 /includes/templates/responsive_classic/common/html_header.php(205): require('/home/virtual/v...')
#2 /index.php(42): require('/home/virtual/v...')
--> PHP Warning: Undefined variable $stripe_select in /includes/modules/pages/checkout_confirmation/jscript_stripe.php on line 1.
4) When using payment methods other than stripe there is a problem with the order total display at checkout. Image 1 shows how the totals should display normally. Image 2 shows the orders totals do not appear.
I believe issue 4 has been caused by the core file edit to tpl_checkout_confirmation. The edit comments out the following code:
Code:
/*
if (MODULE_ORDER_TOTAL_INSTALLED) {
$order_totals = $order_total_modules->process();
?>
<?php
}
*/
I would strongly recommend that core file edits are avoided whenever possible. This will reduce the chance of compatibility issues with other mods.
Most of the PHP warnings may not cause any problems but on a busy site a large number of logs would be produced.
It would be much appreciated if anyone could help resolve any of these issues.
Many thanks
Richard
Attachment 20697Attachment 20698
-
Re: Stripe.com payment integration module
Looking at (1)
1)After uploading the header_php.php file in the checkout_payment folder a PHP warning is logged (--> PHP Warning: Undefined variable $gv_balance in /includes/templates/template_default/templates/tpl_checkout_payment_default.php on line 206.).
Isn't $gv_balance set on includes/modules/pages/checkout_payment/header_php.php line 123 ?
-
Re: Stripe.com payment integration module
Hi swguy
Thank you for your reply. Yes, the $gv_balance is set on line 123 in version 2.0.1. The issue seems to have been caused by the incorrect file being included with the stripe module.
I have uploaded the files from the stripe mod and noticed that there is an override/edit for includes/modules/pages/checkout_payment/header_php.php
The stripe mod has three sets of files that can be uploaded (depending on the zen cart version). It appears that the 2.0.1 header_php file has been mistakenly copied from the 1.5.8 version.
Issue 1 should be easy to fix – hopefully on the next update the correct file can be included. The other issues may be more complicated to fix.
Many thanks
Richard
-
Re: Stripe.com payment integration module
Update:
Issue 2
I have noticed that the first warning from issue 2 (undefined array key) has been previously fixed by gozzandes. See post #306 for details
Carlwhat has previously mentioned that line 69 of create.php could be removed – I believe this is correct, however line 179 of stripe.php would need to be changed to:
$order_comment = (isset($_SESSION['order_add_comment']))."\n Stripe ID:";
This will prevent the undefined array key warning from showing.
Issue 3
It appears issue 3 can be fixed by changing line 1 of includes/modules/pages/checkout_confirmation/jscript_stripe.php to
<?php if (isset($stripe_select) && MODULE_PAYMENT_STRIPE_STATUS === 'True' && $stripe_select == 'True' ) {?>
Issue 4
I believe issue 4 can be fixed by editing the tpl_checkout_confirmation.php file supplied with the stripe module:
change lines 157 – 166 to the following:
<?php if (MODULE_ORDER_TOTAL_INSTALLED && $_SESSION['payment'] != 'stripe') {
$order_totals = $order_total_modules->process();
}
?>
Other issues
Web developer console shows error at checkout – failed to load checkout_confirmation.css
Solution: remove line 2 from includes/modules/pages/checkout_confirmation/jscript_stripe.php
------------
Web developer console shows that some files from stripe seem to have loaded twice. This causes a hcaptcha authentication error to appear in the console.
------------
I have looked into the ‘cannot modify header information’ warning and have not found a solution yet. The cause appears to be <script> tags used at the end of the create.php file. The script code is as follows:
Code:
<script>
'use strict';
var clientS = JSON.parse('<?php echo $clientS_json; ?>');
var PublishableKey = JSON.parse('<?php echo $jason_publishable_key; ?>');
var confirmationURL = JSON.parse('<?php echo $confirmationURL; ?>');
var PaymentSuccess = JSON.parse('<?php echo $jason_PaymentSuccess; ?>');
</script>
Does anyone know if it would be possible to move the script elsewhere to prevent headers being modified?
Any help fixing this issue would be much appreciated.
Many thanks
Richard
Note: the edits I have made apply to version 2.0.1. The edits may be different for other versions.
-
Re: Stripe.com payment integration module
I'm having an issue when customers use the reward points or a gift certificate to check out. For some reason, these values show up on the page but do NOT feed to Stripe, so they're charged full price. However, the points are deducted from their account, and the gift card is marked as spent. But they're also charged for the full amount.
Has this happened to anyone else?
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
jmsnyder23
I'm having an issue when customers use the reward points or a gift certificate to check out. For some reason, these values show up on the page but do NOT feed to Stripe, so they're charged full price. However, the points are deducted from their account, and the gift card is marked as spent. But they're also charged for the full amount.
Has this happened to anyone else?
Have you updated to the latest version of the plugin as I think this has been fixed.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
jmsnyder23
I'm having an issue when customers use the reward points or a gift certificate to check out. For some reason, these values show up on the page but do NOT feed to Stripe, so they're charged full price. However, the points are deducted from their account, and the gift card is marked as spent. But they're also charged for the full amount.
Has this happened to anyone else?
Also what version of Zen Cart and PHP are you running
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
jmsnyder23
I'm having an issue when customers use the reward points or a gift certificate to check out. For some reason, these values show up on the page but do NOT feed to Stripe, so they're charged full price. However, the points are deducted from their account, and the gift card is marked as spent. But they're also charged for the full amount.
Has this happened to anyone else?
Ver 2.0.4 and later of this module should have resolved this issue.
What is your module version?
-
Re: Stripe.com payment integration module
just installed this and credit card payments work fine but when i try to use klarna or clearpay it goes straight to the order success page without visiting either payment provider and in stripe dashboard i see a failure that mentions i must specify a return url for klarna/clearpay. Did I miss a step that the dev who helped me get it loading has also not spotted or maybe a crucial file edit somewhere that's being missed by a bad merge?
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
flappingfish
just installed this and credit card payments work fine but when i try to use klarna or clearpay it goes straight to the order success page without visiting either payment provider and in stripe dashboard i see a failure that mentions i must specify a return url for klarna/clearpay. Did I miss a step that the dev who helped me get it loading has also not spotted or maybe a crucial file edit somewhere that's being missed by a bad merge?
Following file should be fixed.
\www\includes\checkout.js
It's rice harvesting season now and I can't do anything.
-
Re: Stripe.com payment integration module
i see the following section but no instructions on how it should be edited, is this what you are refering too?
Code:
const { error } = await stripe.confirmPayment({
elements,
confirmParams: {
// Make sure to change this to your payment completion page
return_url: confirmationURL,
},
});
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
flappingfish
i see the following section but no instructions on how it should be edited, is this what you are refering too?
Code:
const { error } = await stripe.confirmPayment({
elements,
confirmParams: {
// Make sure to change this to your payment completion page
return_url: confirmationURL,
},
});
whoops, looking at older checout.js on another site there, is this a known fault with module or just something site specific? i have quite a few modules that required a file merge or 2
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
flappingfish
whoops, looking at older checout.js on another site there, is this a known fault with module or just something site specific? i have quite a few modules that required a file merge or 2
\includes\checkout.js
Cange the line 75 of this file from
document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
document.getElementById('payment-form').style.visibility = 'hidden';
document.getElementById('submit').style.visibility = 'hidden';
document.getElementById("btn_submit").click();
to
document.getElementById('checkoutConfirmDefaultHeading').textContent = 'Payment succeeded!.';
Delete the line 76, 77, 78.
*After taking action, please reply with the results.
-
Re: Stripe.com payment integration module
I don't actually use this payment module.
Created just for fun. As a result, problem discovery is delayed.
sorry.
Stripe module ver2.1.3 has already been uploaded.
Please wait until it is published.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
Gozzandes
I don't actually use this payment module.
Created just for fun. As a result, problem discovery is delayed.
sorry.
Stripe module ver2.1.3 has already been uploaded.
Please wait until it is published.
Thankyou Gozzandes, That edit you specified earlier worked, klarna and clearpay now load, assuming i followed your instructions correctly and did not get slightly confused on deleting items, i do notice the following seems to appear on checkout page flow on my site...
Code:
int(9589) string(1) "0"
unsure if that is stripe module or something site specific but worth mentioning incase you missed it on your test run?
i will keep an eye out for updated module version being published and compare my checkout.js to that to make sure it isn't me getting it wrong and update you if that turns out to be the case
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
flappingfish
Thankyou Gozzandes, That edit you specified earlier worked, klarna and clearpay now load, assuming i followed your instructions correctly and did not get slightly confused on deleting items, i do notice the following seems to appear on checkout page flow on my site...
Code:
int(9589) string(1) "0"
unsure if that is stripe module or something site specific but worth mentioning incase you missed it on your test run?
i will keep an eye out for updated module version being published and compare my checkout.js to that to make sure it isn't me getting it wrong and update you if that turns out to be the case
It was actually site specific that other issue, I was trying to get a surcharge on items for I store collection based on value of v_dropship and messed up with syntax it seems lol. Thankyou for the fix :cool:
-
Re: Stripe.com payment integration module
Still not seeing the published update and i've encountered an issue, not sure if i made a mistake or?? current fault, payment is taken from customers bank account, website displays "payment success!" instead of confirmation order page and order is not registered
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
flappingfish
Still not seeing the published update and i've encountered an issue, not sure if i made a mistake or?? current fault, payment is taken from customers bank account, website displays "payment success!" instead of confirmation order page and order is not registered
Please rewrite all the contents of checkout.js to the code below.
Code:
const stripe = Stripe (PublishableKey);
let elements;
initialize();
checkStatus();
document
.querySelector("#payment-form")
.addEventListener("submit", handleSubmit);
// Fetches a payment intent and captures the client secret
async function initialize(){
const { clientSecret } = await clientS;
// const { clientSecret } =await fetch("/create.php", {
// method: "POST",
// headers: { "Content-Type": "application/json" },
// body: JSON.stringify({ items }),
// }).then((r) => r.json());
elements = stripe.elements({ clientSecret });
const paymentElementOptions = {
layout: "tabs",
};
const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");
}
async function handleSubmit(e) {
e.preventDefault();
setLoading(true);
const response = await stripe.confirmPayment({
elements,
confirmParams: {
},
redirect: 'if_required'
}
)
if (response.error) {
showMessage(response.error.message);
} else {
showMessage(`Payment Succeeded: ${response.paymentIntent.id}`);
document.getElementById("btn_submit").click();
}
setLoading(false);
}
// Fetches the payment intent status after payment submission
async function checkStatus() {
const clientSecret = new URLSearchParams(window.location.search).get(
"payment_intent_client_secret"
);
if (!clientSecret) {
return;
}
const { paymentIntent } = await stripe.retrievePaymentIntent(clientSecret);
switch (paymentIntent.status) {
case "succeeded":
document.getElementById('checkoutConfirmDefaultHeading').textContent = 'Payment succeeded!.';
showMessage("Payment succeeded!");
break;
case "processing":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment is processing.';
showMessage("Your payment is processing.");
break;
case "requires_payment_method":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment was not successful, please try again.';
showMessage("Your payment was not successful, please try again.");
break;
default:
document.getElementById('checkoutConfirmDefaultHeading').textContent='Something went wrong.';
showMessage("Something went wrong.");
break;
}
}
// ------- UI helpers -------
function showMessage(messageText) {
const messageContainer = document.querySelector("#payment-message");
messageContainer.classList.remove("hidden");
messageContainer.textContent = messageText;
setTimeout(function () {
messageContainer.classList.add("hidden");
messageText.textContent = "";
}, 4000);
}
// Show a spinner on payment submission
function setLoading(isLoading) {
if (isLoading) {
// Disable the button and show a spinner
document.querySelector("#submit").disabled = true;
document.querySelector("#spinner").classList.remove("hidden");
document.querySelector("#button-text").classList.add("hidden");
} else {
document.querySelector("#submit").disabled = false;
document.querySelector("#spinner").classList.add("hidden");
document.querySelector("#button-text").classList.remove("hidden");
}
}
-
Re: Stripe.com payment integration module
Card payments now work but klarna and clearpay ar eback to the same error but this time no confirmed order without a klarna or clearpay pop up but instead a verbose output that says "
You must provide a `return_url` when confirming a PaymentIntent with the payment method type klarna." (same with clearpay)
Also when you do make a card payment the succesful payment id comes up as a verbose above the confirm button, i thought i had to click confirm again there and it let me and then said "unregecognised error" and then loaded the order confirmation page, everything processed as expected though on the card tests in live mode. i'm using 1.58 atm, not sure if that makes a difference to checkout.js file for my site?
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
flappingfish
Card payments now work but klarna and clearpay ar eback to the same error but this time no confirmed order without a klarna or clearpay pop up but instead a verbose output that says "
You must provide a `return_url` when confirming a PaymentIntent with the payment method type klarna." (same with clearpay)
Also when you do make a card payment the succesful payment id comes up as a verbose above the confirm button, i thought i had to click confirm again there and it let me and then said "unregecognised error" and then loaded the order confirmation page, everything processed as expected though on the card tests in live mode. i'm using 1.58 atm, not sure if that makes a difference to checkout.js file for my site?
Setting of the return_url is line 44.Could you add "return_url: confirmationURL," before redirect?
Code:
return_url: confirmationURL,
redirect: 'if_required'
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
Gozzandes
Setting of the return_url is line 44.Could you add "return_url: confirmationURL," before redirect?
Code:
return_url: confirmationURL,
redirect: 'if_required'
assuming i added that correctly, it did not work and still states i must provide a return url, provided that section so you can confirm if its me...
Code:
async function handleSubmit(e) {
e.preventDefault();
setLoading(true);
const response = await stripe.confirmPayment({
elements,
confirmParams: {
},
return_url: confirmationURL,
redirect: 'if_required'
}
)
if (response.error) {
showMessage(response.error.message);
} else {
showMessage(`Payment Succeeded: ${response.paymentIntent.id}`);
document.getElementById("btn_submit").click();
}
setLoading(false);
}
-
Re: Stripe.com payment integration module
[QUOTE=flappingfish;1403574]assuming i added that correctly, it did not work and still states i must provide a return url, provided that section so you can confirm if its me...
I'm sorry I made a mistake.
and I cannot check klarna and clearpay payment.
Code:
const response = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: confirmationURL,
},
redirect: 'if_required'
}
)
-
Re: Stripe.com payment integration module
[QUOTE=Gozzandes;1403575]
Quote:
Originally Posted by
flappingfish
assuming i added that correctly, it did not work and still states i must provide a return url, provided that section so you can confirm if its me...
I'm sorry I made a mistake.
and I cannot check klarna and clearpay payment.
Code:
const response = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: confirmationURL,
},
redirect: 'if_required'
}
)
That did the trick nicely, all working as expected as far as I can test, klarna and clearpay are loading as expected and card payments are working. Will have to wait until someone uses klarna or clearpay to confirm it indeed processes the order correctly upon successful finance application. It has made a big difference to sales already though, every man and his dog knows the name stripe, i think people distrusted the takepayments branded payment module i was using :)
-
Re: Stripe.com payment integration module
[QUOTE=flappingfish;1403577]
Quote:
Originally Posted by
Gozzandes
That did the trick nicely, all working as expected as far as I can test, klarna and clearpay are loading as expected and card payments are working. Will have to wait until someone uses klarna or clearpay to confirm it indeed processes the order correctly upon successful finance application. It has made a big difference to sales already though, every man and his dog knows the name stripe, i think people distrusted the takepayments branded payment module i was using :)
just had a pair of customers come in and use klarna for instore collection and the payment plans where setup and payment succeeded but it did not then register the payment success and directed to the "payment success" message above the payment form but pressing confirm demands fresh payment, no way to confirm the order after payment success :/
-
Re: Stripe.com payment integration module
[QUOTE=flappingfish;1403578]
Quote:
Originally Posted by
flappingfish
just had a pair of customers come in and use klarna for instore collection and the payment plans where setup and payment succeeded but it did not then register the payment success and directed to the "payment success" message above the payment form but pressing confirm demands fresh payment, no way to confirm the order after payment success :/
Could you please give me a few weeks?
Please try using version 2.0.5 temporarily. I think klarna works with this version, but it creates two payments, one incomplete and one successful.
-
Re: Stripe.com payment integration module
Could you try following code?
Code:
const stripe = Stripe (PublishableKey);
let elements;
initialize();
checkStatus();
document
.querySelector("#payment-form")
.addEventListener("submit", handleSubmit);
// Fetches a payment intent and captures the client secret
async function initialize(){
const { clientSecret } = await clientS;
// const { clientSecret } =await fetch("/create.php", {
// method: "POST",
// headers: { "Content-Type": "application/json" },
// body: JSON.stringify({ items }),
// }).then((r) => r.json());
elements = stripe.elements({ clientSecret });
const paymentElementOptions = {
layout: "tabs",
};
const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");
}
async function handleSubmit(e) {
e.preventDefault();
setLoading(true);
const response = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: confirmationURL,
},
redirect: 'if_required'
}
)
if (response.error) {
showMessage(response.error.message);
} else {
showMessage(`Payment Succeeded: ${response.paymentIntent.id}`);
}
setLoading(false);
}
// Fetches the payment intent status after payment submission
async function checkStatus() {
const clientSecret = new URLSearchParams(window.location.search).get(
"payment_intent_client_secret"
);
if (!clientSecret) {
return;
}
const { paymentIntent } = await stripe.retrievePaymentIntent(clientSecret);
switch (paymentIntent.status) {
case "succeeded":
document.getElementById('checkoutConfirmDefaultHeading').textContent = 'Payment succeeded!.';
document.getElementById("btn_submit").click();
showMessage("Payment succeeded!");
break;
case "processing":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment is processing.';
showMessage("Your payment is processing.");
break;
case "requires_payment_method":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment was not successful, please try again.';
showMessage("Your payment was not successful, please try again.");
break;
default:
document.getElementById('checkoutConfirmDefaultHeading').textContent='Something went wrong.';
showMessage("Something went wrong.");
break;
}
}
// ------- UI helpers -------
function showMessage(messageText) {
const messageContainer = document.querySelector("#payment-message");
messageContainer.classList.remove("hidden");
messageContainer.textContent = messageText;
setTimeout(function () {
messageContainer.classList.add("hidden");
messageText.textContent = "";
}, 4000);
}
// Show a spinner on payment submission
function setLoading(isLoading) {
if (isLoading) {
// Disable the button and show a spinner
document.querySelector("#submit").disabled = true;
document.querySelector("#spinner").classList.remove("hidden");
document.querySelector("#button-text").classList.add("hidden");
} else {
document.querySelector("#submit").disabled = false;
document.querySelector("#spinner").classList.add("hidden");
document.querySelector("#button-text").classList.remove("hidden");
}
}
-
Re: Stripe.com payment integration module
It does not work.
sorry.
Could you give me a few weeks?
and Try version 2.0.5.
-
Re: Stripe.com payment integration module
Could you try following code?
Code:
const stripe = Stripe (PublishableKey);
let elements;
initialize();
checkStatus();
document
.querySelector("#payment-form")
.addEventListener("submit", handleSubmit);
// Fetches a payment intent and captures the client secret
async function initialize(){
const { clientSecret } = await clientS;
// const { clientSecret } =await fetch("/create.php", {
// method: "POST",
// headers: { "Content-Type": "application/json" },
// body: JSON.stringify({ items }),
// }).then((r) => r.json());
elements = stripe.elements({ clientSecret });
const paymentElementOptions = {
layout: "tabs",
};
const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");
}
async function handleSubmit(e) {
e.preventDefault();
setLoading(true);
const response = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: confirmationURL,
},
redirect: 'if_required'
}
)
if (response.error) {
showMessage(response.error.message);
} else {
showMessage(`Payment Succeeded: ${response.paymentIntent.id}`);
document.getElementById("btn_submit").click();
}
setLoading(false);
}
// Fetches the payment intent status after payment submission
async function checkStatus() {
const clientSecret = new URLSearchParams(window.location.search).get(
"payment_intent_client_secret"
);
if (!clientSecret) {
return;
}
const { paymentIntent } = await stripe.retrievePaymentIntent(clientSecret);
switch (paymentIntent.status) {
case "succeeded":
document.getElementById('checkoutConfirmDefaultHeading').textContent = 'Payment succeeded!.';
showMessage("Payment succeeded!");
document.getElementById("btn_submit").click();
break;
case "processing":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment is processing.';
showMessage("Your payment is processing.");
break;
case "requires_payment_method":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment was not successful, please try again.';
showMessage("Your payment was not successful, please try again.");
break;
default:
document.getElementById('checkoutConfirmDefaultHeading').textContent='Something went wrong.';
showMessage("Something went wrong.");
break;
}
}
// ------- UI helpers -------
function showMessage(messageText) {
const messageContainer = document.querySelector("#payment-message");
messageContainer.classList.remove("hidden");
messageContainer.textContent = messageText;
setTimeout(function () {
messageContainer.classList.add("hidden");
messageText.textContent = "";
}, 4000);
}
// Show a spinner on payment submission
function setLoading(isLoading) {
if (isLoading) {
// Disable the button and show a spinner
document.querySelector("#submit").disabled = true;
document.querySelector("#spinner").classList.remove("hidden");
document.querySelector("#button-text").classList.add("hidden");
} else {
document.querySelector("#submit").disabled = false;
document.querySelector("#spinner").classList.add("hidden");
document.querySelector("#button-text").classList.remove("hidden");
}
}
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
Gozzandes
Could you try following code?
Code:
const stripe = Stripe (PublishableKey);
let elements;
initialize();
checkStatus();
document
.querySelector("#payment-form")
.addEventListener("submit", handleSubmit);
// Fetches a payment intent and captures the client secret
async function initialize(){
const { clientSecret } = await clientS;
// const { clientSecret } =await fetch("/create.php", {
// method: "POST",
// headers: { "Content-Type": "application/json" },
// body: JSON.stringify({ items }),
// }).then((r) => r.json());
elements = stripe.elements({ clientSecret });
const paymentElementOptions = {
layout: "tabs",
};
const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");
}
async function handleSubmit(e) {
e.preventDefault();
setLoading(true);
const response = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: confirmationURL,
},
redirect: 'if_required'
}
)
if (response.error) {
showMessage(response.error.message);
} else {
showMessage(`Payment Succeeded: ${response.paymentIntent.id}`);
document.getElementById("btn_submit").click();
}
setLoading(false);
}
// Fetches the payment intent status after payment submission
async function checkStatus() {
const clientSecret = new URLSearchParams(window.location.search).get(
"payment_intent_client_secret"
);
if (!clientSecret) {
return;
}
const { paymentIntent } = await stripe.retrievePaymentIntent(clientSecret);
switch (paymentIntent.status) {
case "succeeded":
document.getElementById('checkoutConfirmDefaultHeading').textContent = 'Payment succeeded!.';
showMessage("Payment succeeded!");
document.getElementById("btn_submit").click();
break;
case "processing":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment is processing.';
showMessage("Your payment is processing.");
break;
case "requires_payment_method":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment was not successful, please try again.';
showMessage("Your payment was not successful, please try again.");
break;
default:
document.getElementById('checkoutConfirmDefaultHeading').textContent='Something went wrong.';
showMessage("Something went wrong.");
break;
}
}
// ------- UI helpers -------
function showMessage(messageText) {
const messageContainer = document.querySelector("#payment-message");
messageContainer.classList.remove("hidden");
messageContainer.textContent = messageText;
setTimeout(function () {
messageContainer.classList.add("hidden");
messageText.textContent = "";
}, 4000);
}
// Show a spinner on payment submission
function setLoading(isLoading) {
if (isLoading) {
// Disable the button and show a spinner
document.querySelector("#submit").disabled = true;
document.querySelector("#spinner").classList.remove("hidden");
document.querySelector("#button-text").classList.add("hidden");
} else {
document.querySelector("#submit").disabled = false;
document.querySelector("#spinner").classList.add("hidden");
document.querySelector("#button-text").classList.remove("hidden");
}
}
Just tested now and that did the trick thankyou :)
Klarna, clearpay and card payments work as expected, could possibly benefit from a pop up to confirm the order is processing between the redirect from payment succeeded to order confirmation page for people with slow connections? The payment form shows below the payment succeeded message, i waited momentarily knowing it may take a few moments, slightly confusing for folk but functional though :)
-
Re: Stripe.com payment integration module
A message will be displayed after a successful payment.
To change this message, change the code of line6 TEXT_PAYMENT_STRIPE_SUCCESS in \includes\languages\----------\modules\payment\lang.stripe.php.
Fixed checkout.js
Code:
const stripe = Stripe (PublishableKey);
let elements;
initialize();
checkStatus();
document
.querySelector("#payment-form")
.addEventListener("submit", handleSubmit);
// Fetches a payment intent and captures the client secret
async function initialize(){
const { clientSecret } = await clientS;
// const { clientSecret } =await fetch("/create.php", {
// method: "POST",
// headers: { "Content-Type": "application/json" },
// body: JSON.stringify({ items }),
// }).then((r) => r.json());
elements = stripe.elements({ clientSecret });
const paymentElementOptions = {
layout: "tabs",
};
const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");
}
async function handleSubmit(e) {
e.preventDefault();
setLoading(true);
const response = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: confirmationURL,
},
redirect: 'if_required'
}
)
if (response.error) {
showMessage(response.error.message);
} else {
document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
showMessage(PaymentSuccess);
document.getElementById("btn_submit").click();
}
setLoading(false);
}
// Fetches the payment intent status after payment submission
async function checkStatus() {
const clientSecret = new URLSearchParams(window.location.search).get(
"payment_intent_client_secret"
);
if (!clientSecret) {
return;
}
const { paymentIntent } = await stripe.retrievePaymentIntent(clientSecret);
switch (paymentIntent.status) {
case "succeeded":
document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
showMessage(PaymentSuccess);
document.getElementById("btn_submit").click();
break;
case "processing":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment is processing.';
showMessage("Your payment is processing.");
break;
case "requires_payment_method":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment was not successful, please try again.';
showMessage("Your payment was not successful, please try again.");
break;
default:
document.getElementById('checkoutConfirmDefaultHeading').textContent='Something went wrong.';
showMessage("Something went wrong.");
break;
}
}
// ------- UI helpers -------
function showMessage(messageText) {
const messageContainer = document.querySelector("#payment-message");
messageContainer.classList.remove("hidden");
messageContainer.textContent = messageText;
setTimeout(function () {
messageContainer.classList.add("hidden");
messageText.textContent = "";
}, 4000);
}
// Show a spinner on payment submission
function setLoading(isLoading) {
if (isLoading) {
// Disable the button and show a spinner
document.querySelector("#submit").disabled = true;
document.querySelector("#spinner").classList.remove("hidden");
document.querySelector("#button-text").classList.add("hidden");
} else {
document.querySelector("#submit").disabled = false;
document.querySelector("#spinner").classList.add("hidden");
document.querySelector("#button-text").classList.remove("hidden");
}
}
-
Re: Stripe.com payment integration module
Please rewrite the contents of includes/checkout.js with this code until ver2.1.5 is available for download.
Code:
const stripe = Stripe (PublishableKey);
let elements;
initialize();
checkStatus();
document
.querySelector("#payment-form")
.addEventListener("submit", handleSubmit);
// Fetches a payment intent and captures the client secret
async function initialize(){
const { clientSecret } = await clientS;
// const { clientSecret } =await fetch("/create.php", {
// method: "POST",
// headers: { "Content-Type": "application/json" },
// body: JSON.stringify({ items }),
// }).then((r) => r.json());
elements = stripe.elements({ clientSecret });
const paymentElementOptions = {
layout: "tabs",
};
const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");
}
async function handleSubmit(e) {
e.preventDefault();
setLoading(true);
const response = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: confirmationURL,
},
redirect: 'if_required'
}
)
if (response.error) {
showMessage(response.error.message);
} else {
document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
showMessage(PaymentSuccess);
document.getElementById("btn_submit").click();
}
setLoading(false);
}
// Fetches the payment intent status after payment submission
async function checkStatus() {
const clientSecret = new URLSearchParams(window.location.search).get(
"payment_intent_client_secret"
);
if (!clientSecret) {
return;
}
const { paymentIntent } = await stripe.retrievePaymentIntent(clientSecret);
switch (paymentIntent.status) {
case "succeeded":
document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
showMessage(PaymentSuccess);
document.getElementById("btn_submit").click();
break;
case "processing":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment is processing.';
showMessage("Your payment is processing.");
break;
case "requires_payment_method":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment was not successful, please try again.';
showMessage("Your payment was not successful, please try again.");
break;
default:
document.getElementById('checkoutConfirmDefaultHeading').textContent='Something went wrong.';
showMessage("Something went wrong.");
break;
}
}
// ------- UI helpers -------
function showMessage(messageText) {
const messageContainer = document.querySelector("#payment-message");
messageContainer.classList.remove("hidden");
messageContainer.textContent = messageText;
setTimeout(function () {
messageContainer.classList.add("hidden");
messageText.textContent = "";
}, 4000);
}
// Show a spinner on payment submission
function setLoading(isLoading) {
if (isLoading) {
// Disable the button and show a spinner
document.querySelector("#submit").disabled = true;
document.querySelector("#spinner").classList.remove("hidden");
document.querySelector("#button-text").classList.add("hidden");
} else {
document.querySelector("#submit").disabled = false;
document.querySelector("#spinner").classList.add("hidden");
document.querySelector("#button-text").classList.remove("hidden");
}
}
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
Gozzandes
Please rewrite the contents of includes/checkout.js with this code until ver2.1.5 is available for download.
Code:
const stripe = Stripe (PublishableKey);
let elements;
initialize();
checkStatus();
document
.querySelector("#payment-form")
.addEventListener("submit", handleSubmit);
// Fetches a payment intent and captures the client secret
async function initialize(){
const { clientSecret } = await clientS;
// const { clientSecret } =await fetch("/create.php", {
// method: "POST",
// headers: { "Content-Type": "application/json" },
// body: JSON.stringify({ items }),
// }).then((r) => r.json());
elements = stripe.elements({ clientSecret });
const paymentElementOptions = {
layout: "tabs",
};
const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");
}
async function handleSubmit(e) {
e.preventDefault();
setLoading(true);
const response = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: confirmationURL,
},
redirect: 'if_required'
}
)
if (response.error) {
showMessage(response.error.message);
} else {
document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
showMessage(PaymentSuccess);
document.getElementById("btn_submit").click();
}
setLoading(false);
}
// Fetches the payment intent status after payment submission
async function checkStatus() {
const clientSecret = new URLSearchParams(window.location.search).get(
"payment_intent_client_secret"
);
if (!clientSecret) {
return;
}
const { paymentIntent } = await stripe.retrievePaymentIntent(clientSecret);
switch (paymentIntent.status) {
case "succeeded":
document.getElementById('checkoutConfirmDefaultHeading').textContent = PaymentSuccess;
showMessage(PaymentSuccess);
document.getElementById("btn_submit").click();
break;
case "processing":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment is processing.';
showMessage("Your payment is processing.");
break;
case "requires_payment_method":
document.getElementById('checkoutConfirmDefaultHeading').textContent='Your payment was not successful, please try again.';
showMessage("Your payment was not successful, please try again.");
break;
default:
document.getElementById('checkoutConfirmDefaultHeading').textContent='Something went wrong.';
showMessage("Something went wrong.");
break;
}
}
// ------- UI helpers -------
function showMessage(messageText) {
const messageContainer = document.querySelector("#payment-message");
messageContainer.classList.remove("hidden");
messageContainer.textContent = messageText;
setTimeout(function () {
messageContainer.classList.add("hidden");
messageText.textContent = "";
}, 4000);
}
// Show a spinner on payment submission
function setLoading(isLoading) {
if (isLoading) {
// Disable the button and show a spinner
document.querySelector("#submit").disabled = true;
document.querySelector("#spinner").classList.remove("hidden");
document.querySelector("#button-text").classList.add("hidden");
} else {
document.querySelector("#submit").disabled = false;
document.querySelector("#spinner").classList.add("hidden");
document.querySelector("#button-text").classList.remove("hidden");
}
}
done :smile:
-
Re: Stripe.com payment integration module
i found a slight quirk, if you head to the checkout confirmation page with a different payment method selected (for me it was in store credit card option via zxpos and standard checkout option) it throws an undefined stripe select warning. i slightly amended includes/modules/pages/checkout_confirmation/jscript_stripe.php to prevent the error...
Code:
<?php
// Check if Stripe is active and if $stripe_select is defined and true
if (defined('MODULE_PAYMENT_STRIPE_STATUS') && MODULE_PAYMENT_STRIPE_STATUS === 'True' && isset($stripe_select) && $stripe_select === 'True') {
?>
<link rel="stylesheet" href="checkout_confirmation.css" />
<script src="https://js.stripe.com/v3/"></script>
<script src="includes/checkout.js" defer></script>
<?php
}
?>
basically checking stripe was chosen as the payment method and its module status is true instead of just checking it is set to true. error log was as follows....
Code:
[10-Nov-2024 16:01:05 UTC] Request URI: /checkout_confirmation, IP address: my ip address, Language id 1
#1 include(/includes/modules/pages/checkout_confirmation/jscript_stripe.php) called at [/includes/templates/wokiee/wt_common/tpl_wt_before_body_end.php:53]
#2 require(/includes/templates/wokiee/wt_common/tpl_wt_before_body_end.php) called at [/includes/templates/wokiee/common/tpl_main_page.php:239]
#3 require(/includes/templates/wokiee/common/tpl_main_page.php) called at [/index.php:96]
--> PHP Warning: Undefined variable $stripe_select in /includes/modules/pages/checkout_confirmation/jscript_stripe.php on line 1.
-
Re: Stripe.com payment integration module
I've run into an issue today, just received the following email....
Code:
Why are we contacting you?
We’re following up to remind you of the importance of keeping your promotional material in line with UK Financial Promotion regulations, and how Klarna’s On-site Messaging (OSM) can help. When advertising Klarna's BNPL products you MUST follow Klarna’s Rules for your advert to be compliant with the laws around advertising credit in the UK, and therefore approved by Klarna. If you are not the decision-maker or the individual responsible for implementing our OSM tool, please forward this email to the appropriate party within your organisation immediately.
Why is this important?
Compliance not only safeguards your business from regulatory risks but also builds customer trust. With Klarna’s OSM, you can ensure that your promotions meet UK regulations without the need for custom ads.
The benefits of On-site Messaging
•
Guaranteed compliance: Automatically adheres to local regulations.
•
Time-saving: Eliminates the need for creating custom promotions.
•
Consistency: Provides clear Klarna payment options to customers.
•
Enhanced Shopping Experience: Delivers dynamic, relevant offers to your customers.
Your responsibility
When advertising Klarna's BNPL products, it's essential to comply with our advertising guidelines. Non-compliance may result in regulatory breaches if you're not FCA-authorised.
Next steps
To continue benefiting from compliant and effective promotions, please ensure you’ve implemented On-site Messaging.
Klarna for Business
looking on stripe it took a search for klarna in the search bar on their developers tab to get to a mini article where it states the following....
Code:
Klarna branding
Let your customers know you accept payments with Klarna by including the Payment Method Messaging Element on your product and cart pages. You must comply with Klarna’s marketing compliance guides.
If you’re in the UK, there are FCA regulatory requirements in the UK regarding advertising Klarna’s BNPL payment methods. Failure to comply can result in criminal charges. As per these requirements, you must only advertise Klarna with messaging approved by Klarna. You can find Klarna approved messaging in Klarna’s UK Financial Promotion Rules.
I also tried klarna's website first and found that they have been messing around with code and have issues with their htaccess and cors rules that is blocking the code snippets i suppossedly need from popping up, it seems to be region specific snippets, although stripe may have made a dynamic version for their api/sdk?
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
flappingfish
I've run into an issue today, just received the following email....
Code:
Why are we contacting you?
We’re following up to remind you of the importance of keeping your promotional material in line with UK Financial Promotion regulations, and how Klarna’s On-site Messaging (OSM) can help. When advertising Klarna's BNPL products you MUST follow Klarna’s Rules for your advert to be compliant with the laws around advertising credit in the UK, and therefore approved by Klarna. If you are not the decision-maker or the individual responsible for implementing our OSM tool, please forward this email to the appropriate party within your organisation immediately.
Why is this important?
Compliance not only safeguards your business from regulatory risks but also builds customer trust. With Klarna’s OSM, you can ensure that your promotions meet UK regulations without the need for custom ads.
The benefits of On-site Messaging
•
Guaranteed compliance: Automatically adheres to local regulations.
•
Time-saving: Eliminates the need for creating custom promotions.
•
Consistency: Provides clear Klarna payment options to customers.
•
Enhanced Shopping Experience: Delivers dynamic, relevant offers to your customers.
Your responsibility
When advertising Klarna's BNPL products, it's essential to comply with our advertising guidelines. Non-compliance may result in regulatory breaches if you're not FCA-authorised.
Next steps
To continue benefiting from compliant and effective promotions, please ensure you’ve implemented On-site Messaging.
Klarna for Business
looking on stripe it took a search for klarna in the search bar on their developers tab to get to a mini article where it states the following....
Code:
Klarna branding
Let your customers know you accept payments with Klarna by including the Payment Method Messaging Element on your product and cart pages. You must comply with Klarna’s marketing compliance guides.
If you’re in the UK, there are FCA regulatory requirements in the UK regarding advertising Klarna’s BNPL payment methods. Failure to comply can result in criminal charges. As per these requirements, you must only advertise Klarna with messaging approved by Klarna. You can find Klarna approved messaging in Klarna’s UK Financial Promotion Rules.
I also tried klarna's website first and found that they have been messing around with code and have issues with their htaccess and cors rules that is blocking the code snippets i suppossedly need from popping up, it seems to be region specific snippets, although stripe may have made a dynamic version for their api/sdk?
You need to complain to Stripe, so far as I know you have no control over Klarna messages created by Stripe.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
marton_1
You need to complain to Stripe, so far as I know you have no control over Klarna messages created by Stripe.
I figured it out, sort of, realised i didnt have stripe installed on my testing sandbox so its got a TODO comment and hardcoded publishable key
the code is dynamically pulled from stripe and injected into the following div...
Code:
<div id="payment-method-messaging-element"></div>
it loads and does the calculations as expected, the TODO is self explanatory. This particular edit covers the "tpl_product_info.php" in includes/templates/your_template_folder/templates/ but should also be presented in the basket with the price set as the total basket price and i think i have covered the issue then?
i'm not happy with the location of the div, the page is a bit funky from playing around with it yesterday trying to improve its layout... BUT, it works :)
Code:
* @version $Id: Steve 2021 Jun 14 Modified in v1.5.8-alpha $
*/
//require(DIR_WS_MODULES . '/debug_blocks/product_info_prices.php');
//require_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/stripe.php');
// TODO test without hardcoding credentials double check language definition url and uncomment above require statement
define('MODULE_PAYMENT_STRIPE_PUBLISHABLE_KEY', 'pk_live_add_your_pk_live_here');
?>
<script src="https://js.stripe.com/v3/"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
// Set your publishable key. Replace with your live key in production.
const stripe = Stripe('<?php echo MODULE_PAYMENT_STRIPE_PUBLISHABLE_KEY; ?>', {
locale: 'en-GB' // Sets the locale to British English
});
// Get the product price dynamically from the span with id "productPrices"
const priceElement = document.querySelector('#productPrices');
if (!priceElement) {
console.error('Price element not found. Ensure the id "productPrices" exists.');
return;
}
// Extract and convert the price to pence
const productPrice = parseFloat(priceElement.innerText.replace(/[^\d.]/g, '')) * 100;
// Check if price was extracted correctly
if (isNaN(productPrice)) {
console.error('Failed to extract the product price. Check the price format.');
return;
}
// Create an instance of Stripe Elements
const elements = stripe.elements();
// Payment Method Messaging Element options
const options = {
amount: productPrice, // Use dynamically fetched product price
currency: 'GBP', // Set to British Pounds
countryCode: 'GB', // Country code for the UK
};
// Create the Payment Method Messaging Element
const paymentMessageElement = elements.create('paymentMethodMessaging', options);
// Mount the element to a container with the specified ID
paymentMessageElement.mount('#payment-method-messaging-element');
});
</script>
<div class="centerColumn product-info" id="productGeneral">
<!--bof Form start-->
<?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product', $request_type), 'post', 'enctype="multipart/form-data" id="addToCartForm"') . "\n"; ?>
<!--eof Form start-->
<?php if ($messageStack->size('product_info') > 0) echo $messageStack->output('product_info'); ?>
<!--bof Category Icon -->
<?php if ($module_show_categories != 0) { ?>
<?php
/**
* display the category icons
*/
//require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
<?php } ?>
<!--eof Category Icon -->
<!--bof Prev/Next top position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 1 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
* display the product previous/next helper
*/
require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next top position-->
<div id="prod-info-top" class="container-fluid-mobile <?php echo ( $elevatezoom_style == 'pro' ) ? 'container-mobile-airSticky' : ''; ?>">
<div class="row <?php echo ( $elevatezoom_style == 'pro' ) ? 'airSticky_stop-block' : ''; ?>">
<div id="pinfo-left" class="<?php echo $prod_info_img_class; ?> hidden-xs group">
<!--bof Main Product Image -->
<?php if (!empty($products_image)) { ?>
<?php require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
<?php } ?>
</div>
<div class="tt-mobile-product-layout col-12 visible-xs">
<div class="tt-mobile-product-slider arrow-location-center slick-animated-show-js">
<div><?php echo wt_image(addslashes($products_image_large), addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'data-zoom-image="' . addslashes($products_image_large) . '"'); ?></div>
<?php
if ( is_array( $list_box_contents ) > 0 ) {
for ( $row = 0; $row < sizeof( $list_box_contents ); $row++ ) {
for ( $col = 0; $col < sizeof( $list_box_contents[$row] ); $col++ ) {
if ( isset( $list_box_contents[$row][$col]['text']['large'] ) ) {
echo '<div ' . wt_stringify_atts( $list_box_contents[$row][$col]['params'] ) . '>' . $list_box_contents[$row][$col]['text']['large'] . '</div>';
}
}
}
}
?>
</div>
</div>
<h1 id="productName" class="tt-title productGeneral"><?php echo $products_name; ?></h1>
<div class="tt-price">
<span id="productPrices" class="productGeneral new-price">
<?php
// base price
if ($show_onetime_charges_description == 'true') {
$one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br>';
} else {
$one_time = '';
}
echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?>
</span>
</div>
<div id="payment-method-messaging-element"></div>
if anyone decides to go ahead and implement this you need the div id and to locate it where you please. alot of this code wont match up to what you may have, the important pieces are....
Code:
//require_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/stripe.php');
// TODO test without hardcoding credentials double check language definition url and uncomment above require statement
define('MODULE_PAYMENT_STRIPE_PUBLISHABLE_KEY', 'pk_live_add_your_pk_live_here');
?>
<script src="https://js.stripe.com/v3/"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
// Set your publishable key. Replace with your live key in production.
const stripe = Stripe('<?php echo MODULE_PAYMENT_STRIPE_PUBLISHABLE_KEY; ?>', {
locale: 'en-GB' // Sets the locale to British English
});
// Get the product price dynamically from the span with id "productPrices"
const priceElement = document.querySelector('#productPrices');
if (!priceElement) {
console.error('Price element not found. Ensure the id "productPrices" exists.');
return;
}
// Extract and convert the price to pence
const productPrice = parseFloat(priceElement.innerText.replace(/[^\d.]/g, '')) * 100;
// Check if price was extracted correctly
if (isNaN(productPrice)) {
console.error('Failed to extract the product price. Check the price format.');
return;
}
// Create an instance of Stripe Elements
const elements = stripe.elements();
// Payment Method Messaging Element options
const options = {
amount: productPrice, // Use dynamically fetched product price
currency: 'GBP', // Set to British Pounds
countryCode: 'GB', // Country code for the UK
};
// Create the Payment Method Messaging Element
const paymentMessageElement = elements.create('paymentMethodMessaging', options);
// Mount the element to a container with the specified ID
paymentMessageElement.mount('#payment-method-messaging-element');
});
</script>
and your div....
<div id="payment-method-messaging-element"></div>
which might take some experimenting with until you locate it where you like... do be careful and backup your tpl_display_product_info.php before making any changes :cool:
SIDENOTE: if you are not in the uk you need to edit the currency and country code :)
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
flappingfish
I figured it out, sort of, realised i didnt have stripe installed on my testing sandbox so its got a TODO comment and hardcoded publishable key
the code is dynamically pulled from stripe and injected into the following div...
Code:
<div id="payment-method-messaging-element"></div>
it loads and does the calculations as expected, the TODO is self explanatory. This particular edit covers the "tpl_product_info.php" in includes/templates/your_template_folder/templates/ but should also be presented in the basket with the price set as the total basket price and i think i have covered the issue then?
i'm not happy with the location of the div, the page is a bit funky from playing around with it yesterday trying to improve its layout... BUT, it works :)
Code:
* @version $Id: Steve 2021 Jun 14 Modified in v1.5.8-alpha $
*/
//require(DIR_WS_MODULES . '/debug_blocks/product_info_prices.php');
//require_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/stripe.php');
// TODO test without hardcoding credentials double check language definition url and uncomment above require statement
define('MODULE_PAYMENT_STRIPE_PUBLISHABLE_KEY', 'pk_live_add_your_pk_live_here');
?>
<script src="https://js.stripe.com/v3/"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
// Set your publishable key. Replace with your live key in production.
const stripe = Stripe('<?php echo MODULE_PAYMENT_STRIPE_PUBLISHABLE_KEY; ?>', {
locale: 'en-GB' // Sets the locale to British English
});
// Get the product price dynamically from the span with id "productPrices"
const priceElement = document.querySelector('#productPrices');
if (!priceElement) {
console.error('Price element not found. Ensure the id "productPrices" exists.');
return;
}
// Extract and convert the price to pence
const productPrice = parseFloat(priceElement.innerText.replace(/[^\d.]/g, '')) * 100;
// Check if price was extracted correctly
if (isNaN(productPrice)) {
console.error('Failed to extract the product price. Check the price format.');
return;
}
// Create an instance of Stripe Elements
const elements = stripe.elements();
// Payment Method Messaging Element options
const options = {
amount: productPrice, // Use dynamically fetched product price
currency: 'GBP', // Set to British Pounds
countryCode: 'GB', // Country code for the UK
};
// Create the Payment Method Messaging Element
const paymentMessageElement = elements.create('paymentMethodMessaging', options);
// Mount the element to a container with the specified ID
paymentMessageElement.mount('#payment-method-messaging-element');
});
</script>
<div class="centerColumn product-info" id="productGeneral">
<!--bof Form start-->
<?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product', $request_type), 'post', 'enctype="multipart/form-data" id="addToCartForm"') . "\n"; ?>
<!--eof Form start-->
<?php if ($messageStack->size('product_info') > 0) echo $messageStack->output('product_info'); ?>
<!--bof Category Icon -->
<?php if ($module_show_categories != 0) { ?>
<?php
/**
* display the category icons
*/
//require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
<?php } ?>
<!--eof Category Icon -->
<!--bof Prev/Next top position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 1 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
* display the product previous/next helper
*/
require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next top position-->
<div id="prod-info-top" class="container-fluid-mobile <?php echo ( $elevatezoom_style == 'pro' ) ? 'container-mobile-airSticky' : ''; ?>">
<div class="row <?php echo ( $elevatezoom_style == 'pro' ) ? 'airSticky_stop-block' : ''; ?>">
<div id="pinfo-left" class="<?php echo $prod_info_img_class; ?> hidden-xs group">
<!--bof Main Product Image -->
<?php if (!empty($products_image)) { ?>
<?php require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
<?php } ?>
</div>
<div class="tt-mobile-product-layout col-12 visible-xs">
<div class="tt-mobile-product-slider arrow-location-center slick-animated-show-js">
<div><?php echo wt_image(addslashes($products_image_large), addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'data-zoom-image="' . addslashes($products_image_large) . '"'); ?></div>
<?php
if ( is_array( $list_box_contents ) > 0 ) {
for ( $row = 0; $row < sizeof( $list_box_contents ); $row++ ) {
for ( $col = 0; $col < sizeof( $list_box_contents[$row] ); $col++ ) {
if ( isset( $list_box_contents[$row][$col]['text']['large'] ) ) {
echo '<div ' . wt_stringify_atts( $list_box_contents[$row][$col]['params'] ) . '>' . $list_box_contents[$row][$col]['text']['large'] . '</div>';
}
}
}
}
?>
</div>
</div>
<h1 id="productName" class="tt-title productGeneral"><?php echo $products_name; ?></h1>
<div class="tt-price">
<span id="productPrices" class="productGeneral new-price">
<?php
// base price
if ($show_onetime_charges_description == 'true') {
$one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br>';
} else {
$one_time = '';
}
echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?>
</span>
</div>
<div id="payment-method-messaging-element"></div>
if anyone decides to go ahead and implement this you need the div id and to locate it where you please. alot of this code wont match up to what you may have, the important pieces are....
Code:
//require_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/stripe.php');
// TODO test without hardcoding credentials double check language definition url and uncomment above require statement
define('MODULE_PAYMENT_STRIPE_PUBLISHABLE_KEY', 'pk_live_add_your_pk_live_here');
?>
<script src="https://js.stripe.com/v3/"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
// Set your publishable key. Replace with your live key in production.
const stripe = Stripe('<?php echo MODULE_PAYMENT_STRIPE_PUBLISHABLE_KEY; ?>', {
locale: 'en-GB' // Sets the locale to British English
});
// Get the product price dynamically from the span with id "productPrices"
const priceElement = document.querySelector('#productPrices');
if (!priceElement) {
console.error('Price element not found. Ensure the id "productPrices" exists.');
return;
}
// Extract and convert the price to pence
const productPrice = parseFloat(priceElement.innerText.replace(/[^\d.]/g, '')) * 100;
// Check if price was extracted correctly
if (isNaN(productPrice)) {
console.error('Failed to extract the product price. Check the price format.');
return;
}
// Create an instance of Stripe Elements
const elements = stripe.elements();
// Payment Method Messaging Element options
const options = {
amount: productPrice, // Use dynamically fetched product price
currency: 'GBP', // Set to British Pounds
countryCode: 'GB', // Country code for the UK
};
// Create the Payment Method Messaging Element
const paymentMessageElement = elements.create('paymentMethodMessaging', options);
// Mount the element to a container with the specified ID
paymentMessageElement.mount('#payment-method-messaging-element');
});
</script>
and your div....
<div id="payment-method-messaging-element"></div>
which might take some experimenting with until you locate it where you like... do be careful and backup your tpl_display_product_info.php before making any changes :cool:
SIDENOTE: if you are not in the uk you need to edit the currency and country code :)
slight mistake that only showed when i moved it to my live site, stripe pk is already defined globally so these lines aren't necessary...
Code:
//require_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/stripe.php');
// TODO test without hardcoding credentials double check language definition url and uncomment above require statement
define('MODULE_PAYMENT_STRIPE_PUBLISHABLE_KEY', 'pk_live_add_your_pk_live_here');
-
Re: Stripe.com payment integration module
I've fixed Stripe secure payment module 1.3.4 and uploaded as a version 1.3.5.
It works for One-page checkout.
but
Credit card payment and
USD or CAN or GBP or EUR only.
:D
-
Re: Stripe.com payment integration module
For those of us looking at the Plugins and seeing version 2.1.5 as the latest version, can you enlighten us as to where we can find 1.3.5?
thanx
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
dbltoe
For those of us looking at the Plugins and seeing version 2.1.5 as the latest version, can you enlighten us as to where we can find 1.3.5?
thanx
2.1.5
1. Stripe form is embedded in the checkout confirmation page.
2. Compared to version 1, it has better security because customers enter card information directly into Stripe server without using $_post.
3.A lot of payment methods are acceptable. For example Credit card, Apple pay, Google pay, iDEAL, Paypal and so on.
4.One-page checkout is not available.
1.3.5
1. Credit card payment only.
2. One-page checkout is available.
Version 1.3.5 has been fixed in Zen Cart 1.5.8 to the extent that no errors occur, so please be sure to test it.
Please wait until it is available for download.Please wait until it is available for download.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
Gozzandes
2.1.5
1. Stripe form is embedded in the checkout confirmation page.
2. Compared to version 1, it has better security because customers enter card information directly into Stripe server without using $_post.
3.A lot of payment methods are acceptable. For example Credit card, Apple pay, Google pay, iDEAL, Paypal and so on.
4.One-page checkout is not available.
1.3.5
1. Credit card payment only.
2. One-page checkout is available.
Version 1.3.5 has been fixed in Zen Cart 1.5.8 to the extent that no errors occur, so please be sure to test it.
Please wait until it is available for download.Please wait until it is available for download.
I was misunderstanding the one-page checkout module.
Word "stripe" should be added into the admin page one-page checkout setting=>Payment Methods Requiring Confirmation.
I can build stripe module version 2 for One-page checkout payment.
Please wait 1week.
-
Re: Stripe.com payment integration module
Quote:
Originally Posted by
Gozzandes
I was misunderstanding the one-page checkout module.
Word "stripe" should be added into the admin page one-page checkout setting=>Payment Methods Requiring Confirmation.
I can build stripe module version 2 for One-page checkout payment.
Please wait 1week.
Please don't forget the following changes to each of the three versions, they break the install if you have a prefix set:
/www/includes/payment/stripe.php
PHP Code:
$db-> execute("DROP TABLE IF EXISTS stripe ;");
$db-> execute("CREATE TABLE " . DB_PREFIX . " stripe(id INT(11) AUTO_INCREMENT PRIMARY KEY,customers_id INT(11),Stripe_Customers_id VARCHAR(32))");
to
PHP Code:
$db-> execute("DROP TABLE IF EXISTS " . DB_PREFIX . "stripe ;");
$db-> execute("CREATE TABLE " . DB_PREFIX . "stripe(id INT(11) AUTO_INCREMENT PRIMARY KEY,customers_id INT(11),Stripe_Customers_id VARCHAR(32))");
The DROP table directive doesn't automatically try to find DB_PREFIX . stripe and the CREATE TABLE directory includes a space before PREFIX. I submitted the above change to the plugin directory but not sure if it'll make it in time.
-
Re: Stripe.com payment integration module
Thank you for your advice.
I've just fixed it and uploaded.
-
Re: Stripe.com payment integration module
The next modification will be "Payment succeeded" message.
Administrator can change the message in the admin page.
and
I'll change the location of the payment form from bottom to under the billing address.
<HR>
Nihon Yokane corporation