omnipay-sagepay icon indicating copy to clipboard operation
omnipay-sagepay copied to clipboard

Please share an example of how to reuse token for a monthly subscription payment. I can't find out in docs.

Open dsdeoli opened this issue 5 years ago • 5 comments

Please share an example of how to reuse token for a monthly subscription payment. I can't find out in docs. please help me

dsdeoli avatar Mar 16 '20 07:03 dsdeoli

There is some documentation on card tokens here:

https://github.com/thephpleague/omnipay-sagepay#token-billing

SagePay does not provide a regular billing schedule. Instead, you get a cardReference as a standalone transaction, or get it on the back of another transaction. Then you can use the cardReference multiple times to take further payments. Your application would use the token each month to take the subscription. The cardReference will last two years (if I remember correctly) or you can remove it explicitly. The last time I looked (some time ago) there was no way to fetch a list of card references from Sage Pay, so you have to look after the list yourself.

judgej avatar Mar 16 '20 23:03 judgej

Hi judge, thanks for the reply to me. but can you please share with me an example following auto further payment like REPEAT Transaction but I need future payment using token.

"https://github.com/thephpleague/omnipay-sagepay#token-billing" I have read this doc but I can't understand to process. can you possibly to share with an example.

dsdeoli avatar Mar 17 '20 05:03 dsdeoli

I'll try to get something together over the next few days. In the middle of an office move at the moment.

judgej avatar Mar 17 '20 13:03 judgej

Yikes. Lockdown during that office move meant we never actually moved, and things got complicated. I've added examples to my ever-growing list. But if you have found your way to the solution anyway, then any examples of how you did it will be very useful.

judgej avatar Jun 18 '20 22:06 judgej

I'm guessing the office move is still off....

On this issue though - I'm setting createToken and I can see that the url ends in &CreateToken=1 as a result

However, it appears that the response should include Token as a field - which is does not. My current theory is that it is because the account has not been enabled for tokens per https://developer.sage.com/api/payments/additional-integrations/tokens/#:~:text=card%20identifiers%20(Tokens)-,Overview,proceed%20to%20the%20checkout%20pages.

However, I also note that that page does not mention the option of passing createToken and I can't find much mention on their site so it's also possible it's something they are phasing out?

eileenmcnaughton avatar Jan 04 '21 04:01 eileenmcnaughton