temp testing to workaround stripe bug
This commit is contained in:
@@ -176,13 +176,15 @@ function booking_stripe_validate_form_payment($form, &$form_state) {
|
|||||||
$card_country = (isset($form_state['input']['card_country']) ? $form_state['input']['card_country'] : '');
|
$card_country = (isset($form_state['input']['card_country']) ? $form_state['input']['card_country'] : '');
|
||||||
|
|
||||||
//if card issuer is american express then the transaction fee charged should be the international rate
|
//if card issuer is american express then the transaction fee charged should be the international rate
|
||||||
if ($card_brand == 'American Express') {
|
if ($card_brand === 'American Express') {
|
||||||
$person = node_load($nid);
|
$person = node_load($nid);
|
||||||
$amount = (isset($form_state['input']['foreign_gross_amount']) ? $form_state['input']['foreign_gross_amount'] : $amount);
|
$amount = (isset($form_state['input']['foreign_gross_amount']) ? $form_state['input']['foreign_gross_amount'] : $amount);
|
||||||
watchdog('booking_debug', "Detected Amex card use, setting amount to !amount", array('!amount' => $amount));
|
watchdog('booking_debug', "Detected Amex card use, setting amount to !amount", array('!amount' => $amount));
|
||||||
}
|
}
|
||||||
//if card is issued from a different country then apply the international rate also
|
//if card is issued from a different country then apply the international rate also
|
||||||
elseif (variable_get('booking_default_country', 'Australia') == 'Australia' && $card_country != 'AU') {
|
//@todo figure out a better way of matching country name to country code
|
||||||
|
// probably via https://api.drupal.org/api/drupal/includes%21locale.inc/function/country_get_list/7.x
|
||||||
|
elseif (variable_get('booking_default_country', 'Australia') === 'Australia' && $card_country !== 'US') {
|
||||||
$person = node_load($nid);
|
$person = node_load($nid);
|
||||||
$amount = (isset($form_state['input']['foreign_gross_amount']) ? $form_state['input']['foreign_gross_amount'] : $amount);
|
$amount = (isset($form_state['input']['foreign_gross_amount']) ? $form_state['input']['foreign_gross_amount'] : $amount);
|
||||||
watchdog('booking_debug', "Detected foreign card use (country !country), setting amount to !amount",
|
watchdog('booking_debug', "Detected foreign card use (country !country), setting amount to !amount",
|
||||||
|
Reference in New Issue
Block a user