diff --git a/code/game/machinery/computer3/lapvend.dm b/code/game/machinery/computer3/lapvend.dm
index b2e84f1cd2..0c038b6c87 100644
--- a/code/game/machinery/computer3/lapvend.dm
+++ b/code/game/machinery/computer3/lapvend.dm
@@ -46,8 +46,8 @@
if(vendmode == 3)
if(istype(W,/obj/item/weapon/card))
var/obj/item/weapon/card/I = W
- reimburse(I)
- vendmode = 0
+ if(reimburse(I))
+ vendmode = 0
if(vendmode == 0)
if(istype(W, /obj/item/device/laptop))
var/obj/item/device/laptop/L = W
@@ -215,6 +215,9 @@
var/obj/item/weapon/card/id/C = I
visible_message("[usr] swipes a card through [src].")
var/datum/money_account/CH = get_account(C.associated_account_number)
+ if(!CH)
+ usr << "\icon[src]No valid account number is associated with this card."
+ return
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
if(vendor_account)
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
@@ -363,18 +366,25 @@
var/obj/item/weapon/card/id/C = I
visible_message("[usr] swipes a card through [src].")
var/datum/money_account/CH = get_account(C.associated_account_number)
+ if(!CH)
+ usr << "\icon[src]No valid account number is associated with this card."
+ return 0
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
if(vendor_account)
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
transfer_and_reimburse(D)
+ return 1
else
usr << "\icon[src]Unable to access account. Check security settings and try again."
+ return 0
else
usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support."
+ return 0
else
transfer_and_reimburse(CH)
+ return 1
/obj/machinery/lapvend/proc/transfer_and_reimburse(var/datum/money_account/D)
var/transaction_amount = total()