-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuc_stripe.api.php
45 lines (41 loc) · 1.17 KB
/
uc_stripe.api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* @file
* Hooks provided by the uc_stripe module.
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Allows other modules to alter intent params before Stripe Payment Intent
* is created. This is used for one time charges.
*
* @param &$intent
* The intent array used to create the intent.
* @param $order
* The order object that is being used for the intent.
*
* @return
* Nothing should be returned. Hook implementations should receive the
* $intent array by reference and alter it directly.
*/
function hook_uc_stripe_payment_intent_alter(&$intent, $order) {
$intent['metadata'] = ["order_source" => "affilate_links"];
}
/**
* Allows other modules to alter recurring charge payment intent params before Stripe
* Payment Intent is created. This is used for recurring charges.
*
* @param &$intent
* The intent array used to create the intent.
* @param $order
* The order object that is being used for the intent.
*
* @return
* Nothing should be returned. Hook implementations should receive the
* $intent array by reference and alter it directly.
*/
function hook_uc_stripe_recurring_intent_alter(&$intent, $order) {
$intent['currency'] = 'CAD';
}