I have a website where I offer service for about $49 per month. I decided to use PayFlow to support payments. I have an account on manager.paypal.com where I set up few options.
All I want is to provide the following functionality: On my website, there is a button "buy". After customer click it he/she is redirected straight to payment website hosted on payflow servers. He chooses way to pay ( pay via credit card or pay via paypal express checkout ). After filling up credit card data or loging into paypal accout he/she sees info that he/she will be charged every month for $49. After he/she confirms this info, there is recurring profile created.
I've got issue during implementing this functionality.
When I call API with simple Sale call - without recurring:
"&TRXTYPE=S&AMT=49.00&CREATESECURETOKEN=Y&SECURETOKENID=secureTokenID&USER=username&VENDOR="vendorname&PARTNER=PayPal&PWD=password";
it is working correct when paying via paypal account or credit card
In https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PayflowPro_RecurringBilling_Guide.pdf
I read that to create a profile for a Credit Card Profile I need to make a Api call like this:
"TRXTYPE=R&TENDER=C&PARTNER=PayPal&VENDOR=Acme&USER=Acme&PWD=a1b2c3d4&ACTIO
N=A&PROFILENAME=RegularSubscription&AMT=42.00&ACCT=4012888888881881&EXPDATE
=0203&START=12012008&PAYPERIOD=WEEK&TERM=12&OPTIONALTRX=S&OPTIONALTRXAMT=2.
00&COMMENT1=First-time customer"
and for paypal account:
PARTNER=partner&VENDOR=vendor&PWD=password&USER=user&TRXTYPE=A&ACTION=S&TENDER=P&RETURNURL=http://return.com&CANCELURL=http://cancel.com&AMT=10.00&BA_DESC=purchase Time Magazine&BILLINGTYPE=MerchantInitiatedBilling&BA_CUSTOM=add magazine subscription&PAYMENTTYPE=any
However to make this API call I need BAID. It is written that to get BAID, first I have to make a API call like this
PARTNER=partner&VENDOR=vendor&PWD=password&USER=user&TRXTYPE=A&ACTION=S&TENDER=P&RETURNURL=http://return.com&CANCELURL=http://cancel.com&AMT=10.00&BA_DESC=purchaseTimeMagazine&BILLINGTYPE=MerchantInitiatedBilling&BA_CUSTOM=addmagazinesubscription&PAYMENTTYPE=any
However using this I've got issue where I'm redirected to straight to https://www.sandbox.paypal.com.
What am I doing wrong? Which parameters my API call should contains to provide recurring payments depend on client decision? Before generating button BUY on my page (before redirect to page hosted on payflow) I don't know which option (Pay by credit card or by paypal accout) customer is going to choose so it should be universal API call to handle these two options.
Thanks for any help. Best Regards, Maciek