Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAID Not Supported #16

Open
sorter opened this issue Mar 3, 2016 · 1 comment
Open

BAID Not Supported #16

sorter opened this issue Mar 3, 2016 · 1 comment

Comments

@sorter
Copy link
Contributor

sorter commented Mar 3, 2016

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?

@sorter
Copy link
Contributor Author

sorter commented Mar 11, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant