Skip to content
Snippets Groups Projects
Commit e306bf36 authored by drastik's avatar drastik
Browse files

Move name generation into JS. Add zip for address checking

parent 046bdca1
Branches
Tags
No related merge requests found
......@@ -208,11 +208,13 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
$amount = number_format($amount, 0, '', '');
// Get Cardholder's full name.
/*
$cc_name = $params['first_name'] . " ";
if (strlen($params['middle_name']) > 0) {
$cc_name .= $params['middle_name'] . " ";
}
$cc_name .= $params['last_name'];
*/
// Check for existing customer, create new otherwise.
if (isset($params['email'])) {
......@@ -271,7 +273,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
// Create a new Customer in Stripe.
if (!isset($customer_query)) {
$sc_create_params = array(
'name' => $cc_name,
//'name' => $cc_name,
'description' => 'Donor from CiviCRM',
'card' => $card_details,
'email' => $email,
......@@ -311,7 +313,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
}
else {
$sc_create_params = array(
'name' => $cc_name,
//'name' => $cc_name,
'description' => 'Donor from CiviCRM',
'card' => $card_details,
'email' => $email,
......
......@@ -50,6 +50,8 @@
return true;
}
Stripe.createToken({
name: cj('#billing_first_name').val() + ' ' + cj('#billing_last_name').val(),
address_zip: cj("#billing_postal_code-5").val(),
number: cj('#credit_card_number').val(),
cvc: cj('#cvv2').val(),
exp_month: cj('#credit_card_exp_date\\[M\\]').val(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment