Get confused.
This commit is contained in:
@ -618,10 +618,11 @@ function uc_stripe_charge($order_id, $amount, $data) {
|
|||||||
$models[] = $item->model;
|
$models[] = $item->model;
|
||||||
}
|
}
|
||||||
$metadata = array();
|
$metadata = array();
|
||||||
if (!empty($models) and variable_get('uc_stripe_metadata_models', TRUE)) {
|
|
||||||
|
if (!empty($models)) {
|
||||||
$metadata['models'] = implode(";", $models);
|
$metadata['models'] = implode(";", $models);
|
||||||
}
|
}
|
||||||
if (!empty($titles) and variable_get('uc_stripe_metadata_titles', TRUE)) {
|
if (!empty($titles)) {
|
||||||
$metadata['titles'] = implode(";", $titles);
|
$metadata['titles'] = implode(";", $titles);
|
||||||
}
|
}
|
||||||
$params = array(
|
$params = array(
|
||||||
@ -629,12 +630,15 @@ function uc_stripe_charge($order_id, $amount, $data) {
|
|||||||
"currency" => strtolower($order->currency),
|
"currency" => strtolower($order->currency),
|
||||||
"customer" => $stripe_customer_id,
|
"customer" => $stripe_customer_id,
|
||||||
"description" => t("Order #@order_id", array("@order_id" => $order_id)),
|
"description" => t("Order #@order_id", array("@order_id" => $order_id)),
|
||||||
|
"metadata" => $metadata,
|
||||||
"payment_method" => $stripe_payment_method_id,
|
"payment_method" => $stripe_payment_method_id,
|
||||||
"payment_method_types" => ['card'],
|
"payment_method_types" => ['card'],
|
||||||
"confirm" => true,
|
"confirm" => true,
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
drupal_set_message(print_r($metadata, true), 'status');
|
||||||
|
|
||||||
$intent_id = $order->data['payment_intent_id'];
|
$intent_id = $order->data['payment_intent_id'];
|
||||||
|
|
||||||
if (!empty($shipping_info)) {
|
if (!empty($shipping_info)) {
|
||||||
@ -1027,6 +1031,7 @@ function _uc_stripe_confirm_payment(){
|
|||||||
$params = array(
|
$params = array(
|
||||||
'payment_method' => $data['payment_method_id'],
|
'payment_method' => $data['payment_method_id'],
|
||||||
"description" => t("Order #@order_id", array("@order_id" => $order_id)),
|
"description" => t("Order #@order_id", array("@order_id" => $order_id)),
|
||||||
|
"metadata" => $metadata,
|
||||||
'amount' => $amount,
|
'amount' => $amount,
|
||||||
'currency' => strtolower($order->currency),
|
'currency' => strtolower($order->currency),
|
||||||
'confirmation_method' => 'manual',
|
'confirmation_method' => 'manual',
|
||||||
@ -1103,6 +1108,7 @@ function _uc_stripe_create_stripe_customer($order, $payment_method_id = NULL){
|
|||||||
|
|
||||||
$params = array(
|
$params = array(
|
||||||
'description' => "OrderID: {$order->order_id}",
|
'description' => "OrderID: {$order->order_id}",
|
||||||
|
"metadata" => $metadata,
|
||||||
'email' => "$order->primary_email"
|
'email' => "$order->primary_email"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user