8 Commits

Author SHA1 Message Date
aea105c1ab Revert "Merge pull request #9 from mattbk/7.x-3.1"
This reverts commit 6324febf04, reversing
changes made to fed9880872.
2019-10-03 21:53:02 -05:00
6324febf04 Merge pull request #9 from mattbk/7.x-3.1
Update from official release
2019-10-03 21:30:40 -05:00
b0c82fbcc5 Update from official release. 2019-10-03 21:29:05 -05:00
fed9880872 Fix pseudocode. 2017-05-19 10:04:42 -05:00
5920620f0d Update from 7.x-2.x-dev. 2017-05-19 09:59:40 -05:00
6d7a49f424 Ignore patches. 2017-05-07 22:15:27 -05:00
20c909cd49 Clean up pseudocode. 2017-05-07 22:09:53 -05:00
db90890002 Make suggested changes from https://www.drupal.org/node/2840526#comment-12074990. 2017-05-07 21:56:23 -05:00
4 changed files with 28 additions and 16 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
*.patch
*.patch

View File

@ -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. Im 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.
Versions of the Stripe PHP Library and Stripe API that this module currently

View File

@ -8,9 +8,9 @@ core = 7.x
php = 5.3
; Information added by Drupal.org packaging script on 2017-05-19
version = "7.x-2.2+2-dev"
; Information added by Drupal.org packaging script on 2016-10-03
version = "7.x-2.2+1-dev"
core = "7.x"
project = "uc_stripe"
datestamp = "1495159090"
datestamp = "1475516941"

View File

@ -558,21 +558,26 @@ function uc_stripe_charge($order_id, $amount, $data) {
//Bail if there's no 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){
$titles[] = $item->title;
$models[] = $item->model;
}
$metadata = array();
// Set up titles and SKUs
$titles = variable_get('uc_stripe_metadata_titles', FALSE);
$models = variable_get('uc_stripe_metadata_models', FALSE);
$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(
"amount" => $amount,
"currency" => strtolower($order->currency),