"You can create a script to convert all of your recurring subscriptions to a token using the CONVERT_PAYMENTTOPROFILE API using the legacy platform in order to create a token that can be used in Connect. Connect needs the payment information, either in raw form or as a token, for every transaction, which is why you would need to use the CONVERT_PAYMENTTOPROFILE API as opposed to using the tokens that you may already be using. "
Testing:
The script takes one parameter for how many to run at once.
In vagrant in srv/org.wikimedia.civicrm/drupal run:
`drush recurring-globalcollect-tokenize 1`
Setup a recurring donation:
The script looks for donations in civicrm_contribution_recur that have the next_sched_contribution_date of now and a day before (UTC) with trxn_ids that have RECURRING GLOBALCOLLECT in them.
Creating a Globalcollect recurring:
Set up Globalcollect with the VPN through instructions here:
https://www.mediawiki.org/wiki/Fundraising_tech/Testing#GlobalCollect_(Legacy_Ingenico)
Testing without creating a Globalcollect recurring:
If you want to test the logic after the token is created, you can comment out lines 97-99 and set $token to an Ingenico token.
`$token = '229a1d6e-1b26-4c91-8e00-969a49c9d041'`