3

I am using the Paypal API (Website Payments Pro) to set up recurring payments with customers, and am currently testing in the paypal-sandbox. Paypal requires me to set up both Express Checkout and Direct Payment.

Express Checkout: Works fully with recurring payments. I get a 'success' response, and I can see the payment profile in my test account. To do this, I use SetExpressCheckout to have a user be able to get to Paypal, sign in, and be redirected to a page of my choice. I then use 'CreateRecurringPaymentsProfile' to actually create the profile with the required information.

Direct Payment: I do get a 'success' response as outlined below, but I cannot see the recurring payment profile in the test account. I am simply gathering the information on my site and sending it off to Paypal with 'CreateRecurringPaymentsProfile'.

Here is the 'success' output of my attempt at creating a recurring payment:

ACK: "Success"
AMT: "1%2e00"
AVSCODE: "X"
BUILD: "2075688"
CORRELATIONID: "bbfe83b685c0a"
CURRENCYCODE: "USD"
CVV2MATCH: "M"
TIMESTAMP: "2011%2d09%2d12T14%3a27%3a58Z"
TRANSACTIONID: "62214391KD595633B"
VERSION: "54%2e0"

I can try to provide any other details! Any help is appreciated.


Edit: Thanks for the help thus far. I am, however, receiving a success message once again with no proof of the transaction in the test account. The JSON output is this:

ACK: "Success"
BUILD: "2085867"
CORRELATIONID: "3e84486e74e80"
PROFILEID: "I%2d4Y707DELPFKD"
PROFILESTATUS: "ActiveProfile"
TIMESTAMP: "2011%2d09%2d12T20%3a13%3a15Z"
VERSION: "78%2e0"

Thanks a lot,

Daniel Moniz

Paragon
  • 2,692
  • 3
  • 20
  • 27
  • I am a little confused. You say "I can actually see new recurring payment profiles in the test account" but then "the payment profile does not show up in my test account." Are these two different test accounts? – Chriszuma Sep 12 '11 at 14:57
  • @Chriszuma Apologies! My wording was quite awful, but I believe it is clearer now. – Paragon Sep 12 '11 at 15:02
  • Ah, I understand now. Unfortunately, I have no idea why that would be happening. Sounds like a bug in their system. – Chriszuma Sep 12 '11 at 15:11
  • I don't understand still. Can you please clarify with the names of the actual PayPal API calls you're making? – Robert Sep 12 '11 at 18:08
  • @Chriszuma Do you offhand know where I should be reporting this? I'd like to communicate directly with Paypal if possible, as I'm trying to meet certain deadlines. – Paragon Sep 12 '11 at 18:15
  • Sorry, I don't have any special contacts other than what's on their support page. – Chriszuma Sep 12 '11 at 18:24
  • API support is handled by Merchant Technical Services at https://www.paypal.com/mts – Robert Sep 12 '11 at 18:46

1 Answers1

2

You're not seeing a profile because you're calling DoDirectPayment (which is only for one-off payments).
If you want to set up a recurring payment against a card (rather than a PayPal account) you would call CreateRecurringPaymentsProfile as well, but simply specify the card details rather than the token. From the response you're showing, you're not doing this.

See also https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_CreateRecurringPayments - "Credit Card Details fields".  

A sample call would be:  
METHOD=CreateRecurringPaymentsProfile&  
PROFILESTARTDATE=YYYY-mm-ddTH:i&  
DESC=Test&  
BILLINGPERIOD=Month&  
BILLINGFREQUENCY=12&  
AMT=0.01&  
CREDITCARDTYPE=Visa&  
ACCT=4111111111111111&  
EXPDATE=102012&  
CVV2=111  

Edit: I followed it and got a 'start date is required' error which got solved on replacing space with a T between date and time in PROFILESTARTDATE i.e. PROFILESTARTDATE=YYYY-mm-ddTH:i

Usman Zaheer
  • 629
  • 8
  • 24
Robert
  • 19,326
  • 3
  • 58
  • 59
  • Note: Your Sandbox and/or Live PayPal account will need to have 'Direct Payment Recurring Payments' active for this feature to work. – Robert Sep 12 '11 at 18:36
  • 1
    And a tip: increase your version. 54.0 is ancient in PayPal API terms (a lot of improvements, such as parallel payments, digital goods, and individual new features have all been released between version 68.0 - 78.0 (current). Nothing would break if you kept this, but I find it simply good practice to keep things up-to-date. – Robert Sep 12 '11 at 18:45
  • You've been really helpful so far, but after fixing the basic issue (I was indeed using the wrong method, although I thought I was using the right one), I find that I am getting another success message without seeing the result on the test account. Please see my edit in the above post, at the bottom! Thanks a lot for your help thus far. – Paragon Sep 12 '11 at 20:17
  • PROFILEID: "I%2d4Y707DELPFKD" -- that's your Profile ID. What exactly, if not that, are you looking for? – Robert Sep 12 '11 at 20:56
  • I'm looking to see that actually show up in the test user's account. When I make a recurring payment profile through Express Checkout, it shows up when I log into that user's account. It doesn't do so for only direct recurring payments. Paypal has since told me that it *is* working, so I am currently in direct contact with support to figure out what's going wrong. Thanks for your help! – Paragon Sep 15 '11 at 14:57
  • Correct; Direct Payment Recurring Payments will not show up on a buyer's account, since it's not linked to a PayPal account. (Remember; you're charging a card directly). This is the same behaviour as with DoDirectPayment transactions not being reflected on a buyer's PayPal account. This is intended. – Robert Sep 15 '11 at 16:34