Skip to content

Payflow Gateway Reports "Invalid tender" on Reference Transaction #5

@JoeJasinski

Description

@JoeJasinski

Thank you for all the hard work on this API.

I noticed a slight issue when using the reference_transaction() method. The Payflow gateway would report back to me that I had submitted "Invalid Tender" and the transaction fails.

The payflow docs describe:
"Invalid tender type. Your merchant bank account does not support the following credit card type that
was submitted."

When I looked at the query parameters that python-payflow-pro was sending to the gateway, I noticed that what it was sending was different from what the docs suggested.

What python-payflow-pro sent to the gateway:

AMT[1]=4&CURRENCY[3]=USD&ORIGID[12]=*******&PARTNER[6]=PayPal&PWD[13]=********&TRXTYPE[1]=S&USER[12]=******&VENDOR[12]=*****

What the PayFlow Pro docs say should be sent:

TRXTYPE=A&TENDER=C&PWD=x1y2z3&PARTNER=PayPal&VENDOR=SuperMerchant&USER=SuperMerchant&ACCT=5555555555554444&EXPDATE=0308&AMT=100.00&INVNUM=123456789&STREET=5199 MAPLE&ZIP=94588

If you notice, the TENDER="C" parameter is missing from the python payflow-pro generated request.

I was able to force this parameter into the request using a Tender class with a "data" property. However, this feels a bit kludgy. Maybe I'm doing something wrong or using reference transactions incorrectly?

....

class Tender(): 
        """
        Force the tender into the parmas list sent to paypal
        """
        def __init__(self, *args, **kwargs):
            self.data =  {'TENDER':"C"}

        def __len__(self):
            return len(self.data)


 client.reference_transaction(
            transaction_type=transaction_type, original_pnref=original_pnref,
            amount=Amount(amt=amount, currency="USD"), extras=[Tender()])

Anyway, just bringing this up here in case it is an API issue.
Thanks for reading,
Joe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions