thephpleague / omnipay-payflow

Payflow driver for the Omnipay PHP payment processing library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Currency not being passed

dvlsg opened this issue · comments

We recently ran across an issue with a client in Australia using PayFlow where they were unable to pass AUD as a currency, and USD was being picked by default.

Currency was provided to the PayFlow library through the Omnipay request parameters, but I noticed the actual request being sent to PayFlow's API from the PayFlow driver did not contain a CURRENCY setting.

The PayFlow docs seem a bit spare when it comes to the parameter list, but I noticed there were quite a few examples that included CURRENCY. Here's an example from the linked docs:

TRXTYPE=A&BILLTOSTREET=123 Main St.&BILLTOZIP=95131&AMT=23.45&CURRENCY=USD&INVNUM=INV12345
&PONUM=PO9876&**CREATESECURETOKEN**=Y&**SECURETOKENID**=9a9ea8208de1413abc3d60c86cb1f4c5

I believe adding $data['CURRENCY'] to getData() in AuthorizeRequest.php might resolve the issue?

commented

I don't have access to a PayFlow production or test account to try this out. If you can make it work and send a PR then I will merge it.