python-payflowpro
python-payflowpro copied to clipboard
BAID Not Supported
There seems to be no way to create a recurring billing profile to charge a PayPal account. For this we would need to provide a BAID parameter.
Moreover, would it make sense to include support in this library for obtaining such a BAID?
To add some more info, I'm trying to achieve the process known as "Obtaining the BAID Without Express Checkout Purchase" as described in Express Checkout for PayFlow Document Number: 200042.en_US-201306
Adding the following method to the client appears to work
def baid_set_checkout(self, setpaypal, amount, extras=[]):
params = dict(trxtype = "A", action = "S")
for item in [setpaypal, amount] + extras:
params.update(item.data)
return self._do_request(None, params)
And I use it like this:
setpaypal = SetPaypal(returnurl='https:/domain.org/paypal/baid/return',cancelurl='https://domain.org/paypal/baid/cancel')
zeroamt = Amount(amt=0.00, currency="USD")
btype = BillingType(billingtype='MerchantInitiatedBilling')
extras = [btype]
r=pclient.baid_set_checkout(setpaypal, zeroamt,extras=extras)
I wonder if I could have achieved this result without modifying the source.