PayPal API Reccuring payments

2019-05-11 11:58发布

问题:

I need add recurring payments to my site. Before registration user must pay for example 10 GBP for 1 month and thereafter 9 GBP every month. I try to create recurring payment according to [PayPal][1]. But in IPN i am not recieved responce subscr_signup or other. When i completed doExpressChechoutPayment i recieved status Pending. How much time i must wait for authorization is complete? i use sandbox.

回答1:

 'PAYMENTREQUEST_0_PAYMENTACTION'=>urlencode('Authorization'),

Should be:

 'PAYMENTREQUEST_0_PAYMENTACTION'=>urlencode('Sale'),

An authorization will 'hold' the transaction amount (guaranteed by PayPal for up to 3 days, afterwards available for another 26 days), after which you can capture a partial or full amount of the authorized transaction.
In order to immediately capture the funds, set the paymentaction to 'Sale'.
See also PayPal.com: Using Authorization & Capture