New Zenner
- Join Date:
- Jan 2004
- Posts:
- 26
- Plugin Contributions:
- 2
Stripe.com payment integration module
http://www.zen-cart.com/downloads.php?do=file&id=1548
New Zenner
New Zenner
New Zenner
//admin title info
if (IS_ADMIN_FLAG === true) {
if (!function_exists('curl_init')) $this->title .= '<strong><span class="alert"> CURL NOT FOUND. Cannot Use.</span></strong>';
if ( MODULE_PAYMENT_STRIPEPAY_TESTING_SECRET_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_TESTING_PUBLISHABLE_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_MERCHANT_LIVE_SECRET_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_LIVE_PUBLISHABLE_KEY == ''){
$this->title .= '<strong><span class="alert"> One of your Stripe API keys is missing.</span></strong>';
}
if (ENABLE_SSL_CATALOG!=='true'){
$this->title .= '<strong><span class="alert"> Catalog SSL appears to be missing. Live payments are not possible</span></strong>';
}
}else{//client side
$this ->title.='<noscript><br><span style="color:red">Javascript is not enabled in your browser - you cannot checkout using Stripe</span></noscript>';
} //admin title info
if (IS_ADMIN_FLAG === true) {
if (!function_exists('curl_init')) $this->title .= '<strong><span class="alert"> CURL NOT FOUND. Cannot Use.</span></strong>';
if ( MODULE_PAYMENT_STRIPEPAY_TESTING_SECRET_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_TESTING_PUBLISHABLE_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_MERCHANT_LIVE_SECRET_KEY == '' ||
MODULE_PAYMENT_STRIPEPAY_LIVE_PUBLISHABLE_KEY == ''){
$this->title .= '<strong><span class="alert"> One of your Stripe API keys is missing.</span></strong>';
}
if (ENABLE_SSL_CATALOG!=='true'){
$this->title .= '<strong><span class="alert"> Catalog SSL appears to be missing. Live payments are not possible</span></strong>';
}
}else{//client side
// $this ->title.='<noscript><br><span style="color:red">Javascript is not enabled in your browser - you cannot checkout using Stripe</span></noscript>';
}New Zenner
New Zenner
filmgirl:
I was wondering if it would be possible to take the credit card details on the second page, in the same way that the authorize.net payment module takes the credit card info. on the second page (the payment confirmation page, rather than the order confirmation/finalize page).
I ask because customers prefer to see that their information is entered before they finalize the order, and you can't tell if the information has been properly saved or not with how the module is set up now.
Thanks for the help. :)
P.S. - Otherwise, this is an excellent payment module! It made me try out Zen Cart for the first time, and I am loving it much more than other similar carts. :D
New Zenner
sakwoya:
Hi there
It'll take a bit of sorting out as it changes a few bits in the code - I'll have a look at it but it will probably be early 2013 before it's ready as I fully intend to have some time off over Christmas :-)
Graeme
New Zenner
New Zenner
Tux_Rules:
Hello and good day. Just downloaded the Stripe module, unzipped it, uploaded the stripe_zencartv12 folder to /(storename)/includes/modules/payments/ and then went to the admin section, modules, payments and there is no option for stripe to install it...what did I miss???
New Zenner
New Zenner
"amount" => ($order->info['total']) * 100, // amount in cents"amount" => round($order->info['total'], 2) * 100, // amount in centsNew Zenner
New Zenner
Sensei
New Zenner
DrByte:
Do you have people actually complaining that they're confused by the month being displayed?
Sensei
New Zenner
DrByte:
It's probably code in the module itself, and likely in the confirmation() function, since that's what prepares the content which is eventually requested and displayed by the template.
$confirmation['fields'][] = array(
'title' => '<span class="card_hide" style="margin-right:10px">' . MODULE_PAYMENT_STRIPEPAY_CREDIT_CARD_EXPIRES . '</span>'.zen_draw_pull_down_menu('', $expires_month, '', 'class="card_expiry_month card_hide"') . ' ' . zen_draw_pull_down_menu('', $expires_year, '', 'class="card-expiry-year card_hide"'),
'field' => '' </script><script type="text/javascript">
function stripeResponseHandler(status, response) {
if (response.error) {
alert(response.error.message);
//$(".payment-errors").text(response.error.message);
} else {
var form$ = $("form[name=checkout_confirmation]");
var token = response['id'];
form$.append("<input type='hidden' name='StripeToken' value='" + token + "'/>");
if ( $('.new_stripe').attr('checked')) {
form$.append("<input type='hidden' name='StripeSaveCard' value='YES'/>");
}
form$.attr('action', 'index.php?main_page=checkout_process');
//hide button
$("#tdb5").hide();
// and submit
form$.get(0).submit();
}
}
</script></div>
<div class="important">
<div class="back"><span class="card_hide" style="margin-right:10px">Card Owner</span><input type="text" name="" value="Marne Mobley" class="card-name card_hide" /></div>
<div ></div>
<div class="back"><span class="card_hide" style="margin-right:10px">Credit Card Number</span><input type="text" name="" style="display:inline-block; padding-right:10px" class="card_number card_hide" /></div>
<div ></div>
<div class="back"><span class="card_hide" style="margin-right:10px">Expiry</span><select name="" class="card_expiry_month card_hide">
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>New Zenner
WallStickys:
Hello, I think I may have found a bug. Some of my customers were getting the error message, "amount must be a positive integer in cents" when attempting to check out. I found the following line of code in stripepay.php:
"amount" => ($order->info['total']) * 100, // amount in cents
I added the round function to the calculation and it seems to have corrected the issue:
"amount" => round($order->info['total'], 2) * 100, // amount in cents
Please note there are several instances where this line needs to be changed.
Other than that - everything seems to be working fine! Thanks so much!
James
New Zenner
Sensei
cubbie:
Is it possible to display credit card images during Step 2 of 3 for Stripepay checkout?
New Zenner
DrByte:
Simple: turn on the credit card images in Admin->Configuration->Credit Cards, and upload appropriate images to your server once you've confirmed that you have copyright permission to display said images on your site.
No programming required.
Destination thread ID and reason are required when shown.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.