Compare commits
8 Commits
add-metada
...
master
Author | SHA1 | Date | |
---|---|---|---|
aea105c1ab | |||
6324febf04 | |||
b0c82fbcc5 | |||
fed9880872 | |||
5920620f0d | |||
6d7a49f424 | |||
20c909cd49 | |||
db90890002 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
|
|
||||||
*.patch
|
*.patch
|
@ -1,3 +1,9 @@
|
|||||||
|
Based on the 7.x-2.x-dev branch at https://www.drupal.org/project/uc_stripe. Using
|
||||||
|
this as a working repo to track changes. I’m using this on some production sites,
|
||||||
|
but no guarantees are made for anyone else. Look through the code!
|
||||||
|
|
||||||
|
——
|
||||||
|
|
||||||
This is an Ubercart payment gateway module for Stripe.
|
This is an Ubercart payment gateway module for Stripe.
|
||||||
|
|
||||||
Versions of the Stripe PHP Library and Stripe API that this module currently
|
Versions of the Stripe PHP Library and Stripe API that this module currently
|
||||||
|
@ -8,9 +8,9 @@ core = 7.x
|
|||||||
php = 5.3
|
php = 5.3
|
||||||
|
|
||||||
|
|
||||||
; Information added by Drupal.org packaging script on 2017-05-19
|
; Information added by Drupal.org packaging script on 2016-10-03
|
||||||
version = "7.x-2.2+2-dev"
|
version = "7.x-2.2+1-dev"
|
||||||
core = "7.x"
|
core = "7.x"
|
||||||
project = "uc_stripe"
|
project = "uc_stripe"
|
||||||
datestamp = "1495159090"
|
datestamp = "1475516941"
|
||||||
|
|
||||||
|
@ -558,21 +558,26 @@ function uc_stripe_charge($order_id, $amount, $data) {
|
|||||||
|
|
||||||
//Bail if there's no customer ID
|
//Bail if there's no customer ID
|
||||||
if (empty($stripe_customer_id)) {
|
if (empty($stripe_customer_id)) {
|
||||||
throw new Exception('No customer ID found');
|
throw new Exception('No customer ID found');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($order->products as $item){
|
// Set up titles and SKUs
|
||||||
$titles[] = $item->title;
|
$titles = variable_get('uc_stripe_metadata_titles', FALSE);
|
||||||
$models[] = $item->model;
|
$models = variable_get('uc_stripe_metadata_models', FALSE);
|
||||||
}
|
$metadata = array();
|
||||||
$metadata = array();
|
|
||||||
|
foreach($order->products as $item){
|
||||||
|
$titles[] = $item->title;
|
||||||
|
$models[] = $item->model;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($models)) {
|
||||||
|
$metadata['models'] = implode(";", $models);
|
||||||
|
}
|
||||||
|
if (!empty($titles)) {
|
||||||
|
$metadata['titles'] = implode(";", $titles);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($models)) {
|
|
||||||
$metadata['models'] = implode(";", $models);
|
|
||||||
}
|
|
||||||
if (!empty($titles)) {
|
|
||||||
$metadata['titles'] = implode(";", $titles);
|
|
||||||
}
|
|
||||||
$params = array(
|
$params = array(
|
||||||
"amount" => $amount,
|
"amount" => $amount,
|
||||||
"currency" => strtolower($order->currency),
|
"currency" => strtolower($order->currency),
|
||||||
|
Reference in New Issue
Block a user