Retrieve transaction id paypal - paypal

I create a recurring payment by using paypal express checkout without call DoExpressCheckoutPayment. Do you know how can I get transaction ID after created Recurring Profile?

If you do not call DoExpressCheckoutPayment, the recurring payment profile will not be created and thus will not have a Transaction ID associated with it.
The transaction ID will be returned in the DoExpressCheckoutPayment response.

Related

Paypal Express Checkout : Get Billing Agreement ID later

During a transaction with creation of billing agreement id using Paypal Express Checkout, if customer completes the payment on paypal page and the network between him and merchant disrupts when redirecting to merchant page. Will his card be charged even if DoExpressCheckout is not made? How to get transaction status along with billing Id after the token is expired for above scenario?
No, Unless you call the DoExpressCheckout API , money is not going to be charged on the buyer's account .

PayPal PayFlow - converting existing transaction into Recurring Payment Profile

I'm a bit confused about PayPal Payflow Recurring Billing
I read in the documentation that I can convert an existing transaction into a recurring payment profile.
This means that I can send my user to the ExpressCheckout page where she makes a "zero dollar" one time transaction, and then, PayPal sends me back the transaction ID (PNREF) which I can use as ORIGID value when I'm creating the new profile?
And if its correct, it means that I don't have to handle credit card and other sensitive information, because basically the user types her details on the PayPal hosted checkout page?
Yes, you can use a completed transaction to create a recurring billing profile, but it cannot be an auth transaction (zero dollars or otherwise). Quote from the documentation:
IMPORTANT: You can use only a Sale or Delayed Capture transaction as a
template for a profile.
https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/pp_payflowpro_recurringbilling_guide.pdf

Paypal Digital Goods, Transactions not displaying

I've integrated Digital Goods with Express Checkout for my site and I've successfully tested with using sandbox. However I doesn't show any record of the transaction I've just completed in either the merchant account or the test account.
Should I be seeing a transaction? and if so, what could have gone wrong such that a transaction record isn't appearing?
You're most likely not calling the DoExpressCheckoutPayment API call to finalize the transaction.
DoExpressCheckoutPayment is a mandatory API call used to create a transaction out of a TOKEN and PAYERID (assuming the buyer has approved the transaction on the PayPal website).
The API doc (NVP) for DoExpressCheckoutPayment is available at developer.paypal.com.

Paypal IPN - Differentiating between Recurring Payment and Initial Payment

I've created a recurring payments profile on Paypal setting an initial payment.
When I receive the IPN, the txn_id is the same for both the initial payment and the recurring payment. I would like to know if there's a way of differentiating between them.
I've noticed that when I receive the recurring payment, there's this variable "period_type= Regular". This doesn't appear in the initial payment IPN. Is this a good way to make the distinction?
Thanks
I think you might be getting confused with what you're getting in the IPN's.
When the profile is first created, you'll get an IPN with the profile ID of the profile that was just created, and you would only get a transaction ID if you included the original amount to be charged. The transaction ID here is only for that original amount. If you didn't have that all you would get is the profile ID.
If your recurring payments are scheduled to start on the same day as well you will get an additional IPN for the recurring payment and that will have its own transaction ID.

Recurring payment using reference transaction

Is it possible to Create a Recurring Payment Profile using DoReferenceTransaction or is there any other way to set up recurring payment when I've got "billing agree" from customer and REFERENCEID - an id of customer's previous transaction.
Thanks
You can set
RECURRING
field of DoReferenceTransaction API call, but first you need a billing agreement with buyer.
I recommend doing recurring payment with CreateRecurringPaymentsProfile call.
API is here.
I've got billing agreement with buyer ("billing agreement ID") - according to reference transaction api .
I also can do transactions with DoReferenceTransaction like:
$nvpstr="&L_AMT0=".$itemamt."&L_QTY0=1&AMT=".(string)$amt."&ITEMAMT=".(string)$itemamt."&CALLBACKTIMEOUT=4&REFERENCEID=B-6J7244599E964634T&ReturnUrl=".$returnURL."&CANCELURL=".$cancelURL ."&CURRENCYCODE=".$currencyCodeType."&PAYMENTACTION=".$paymentType;
$resArray=hash_call("DoReferenceTransaction",$nvpstr);
However I still don't know how to set up recurring payment using reference transaction cause in API link you gave me, there is a note that Credit Card ACCT number is required - but I don't want to store client's card numbers in my database (I am using express checkout).