Commit 2a460435 authored by Sylvie Ye's avatar Sylvie Ye Committed by Vincent A

[societegenerale] add condition in transfer_check_account_id

like the commit 4a2987a9727756baf57a3934fb502e14a94be533
In PSD2, the account id is the "identifiantPrestation" when the account id is "codeGuichet+numeroCompte" in website
and the transfer_check_account_id will be False because of that

In this case, we just need to check the "codeGuichet+numeroCompte" part in the "identifiantPrestation".
parent 194be21e
......@@ -162,6 +162,14 @@ class SocieteGeneraleModule(Module, CapBankWealth, CapBankTransferAddRecipient,
def transfer_check_exec_date(self, old_exec_date, new_exec_date):
return old_exec_date <= new_exec_date <= old_exec_date + timedelta(days=4)
def transfer_check_account_id(self, old_account_id, new_account_id):
if old_account_id != new_account_id:
# in this case, old_account_id is the "identifiantPrestation"
# which is like 'XXXXXXXXXXX<codeGuichet><numeroCompte>XXXXX'
# we only need to check this part of the old_account_id
old_account_id = old_account_id[11:-5]
return old_account_id == new_account_id
def iter_resources(self, objs, split_path):
if Account in objs:
self._restrict_level(split_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment