The current system relies on Drupal user ID's to make payments. Is this necessary? We should at least make sure anonymous users can perform payments as well. Perhaps it is enough to let other modules that implement iDEAL API log user ID's? A Übercart implementation, for instance, would link payments to Übercart orders, and those orders to users again.

Comments

Bèr Kessels’s picture

My original (Druapl-5) code did /not/ rely on user-ids.
This code should not do that either; depending on uids is unacceptable for any payment system, but especially unacceptable for an API.

The pattern in the D5-code was easy enough to be implemented here too:

 function ideal_id() {
   if ($user->uid > 0) {
     $id = $user->uid;
   }
   elseif {
     $id = get_cookie_value('ideal_id');
     if (!$id) {
       $id = drupal_get_token();
       set_cookie_value('ideal_id', $id);
     }
   }
   return $id;
 }

In human words: if the user has a positive user-id, then use that,
else see if the user got an id in his session/cookie, if so, use that,
else generate an unguessable id, push that into the session/cookie, and use that.

xano’s picture

There is a DB column for UID's though and I read a code comment somewhere that support for UID's wasn't fully implemented yet, which indicates someone wanted this feature.

What if we just remove it altogether? If other systems need UID's to be linked to iDEAL transactions, they can do so themselves IMO.

xano’s picture

Assigned: Unassigned » xano
Status: Active » Closed (fixed)

Removed the column.

xano’s picture

Assigned: xano » Unassigned