Question

Question: Is there a way to convert a Payflow Transaction (of any kind) to a Recurring Profile via code? Our billing service wants us to:

  1. Set up a transaction through Payflow that get the credit card information locked away in Paypal's servers.
  2. Convert/Use that transaction to make a Recurring Profile"
  3. Send them the profile ID that points to it.

I have code set up to perform step 1 and step 3 but I do not know of a way via code to convert any kind of Transaction object or Transaction response to such a profile.

I would first prefer to use Java as that has been the language I've been using thus far, but if that isn't an option, any alternative would be appreciated. Payflow has many APIs for each language/strategy and this makes it a daunting task to know if something isn't even supported.

If anyone needs more information regarding my task, I would be happy to provide it. Thanks in advance.

Was it helpful?

Solution

I don't know if it is still up to date. But yes it is possible, but it is limited to Sale or Delayed Capture transactions only (as mentioned in Payflow Pro Recurring Billing Service User's Guide https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PayflowPro_RecurringBilling_Guide.pdf). And I implemented this for Sale transaction and can prove that it works.

The only pitfall there that when you create RecurringAddTransaction set tender to null (because you don't have credit card info, and if you set it you will get invalid credit card number error message):

RecurringAddTransaction trans = 
    new RecurringAddTransaction(userInfo, connection, invoice, null, recurringInfo, requestId);

and then use setExtData method to add TENDER parameter (otherwise you will get Invalid Tender error message):

trans.setExtData(new ExtendData("TENDER", PayflowConstants.TENDERTYPE_CARD));

If you check the request then it looks like this:

"TRXTYPE=R&TENDER=C&PARTNER=PayPal&VENDOR=Acme&USER=Acme&PWD=a1b2c3d4&ACTIO
N=A&PROFILENAME=RegularSubscription&ORIGID=XYZ123&START=12012002&PAYPERIOD=
WEEK&TERM=12&OPTIONALTRX=S&OPTIONALTRXAMT=2.00&COMMENT1=First-time 
customer&AMT=42.00"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top