I have integrated Payflow pro payment gateway into my php application and processing payment requests using Payflow as payment gateway.
I need to retrieve transaction history which includes refunds too for specific profile ID.
Below is the code that I am using: ref – (https://github.com/rcastera/Paypal-PayFlow-API-Wrapper-Class).
require_once(__DIR__.'/Class.PayFlow.php');
$PayFlowAuth = new PayFlow($Vendor, $Partner, $User, $Password, 'single');
$PayFlowAuth->setTransactionType('R');
$PayFlowAuth->setProfileAction('I');
$PayFlowAuth->setCustomField('ORIGPROFILEID', 'RP0000000XYZ' );
$PayFlowAuth->setCustomField('PAYMENTHISTORY', 'Y' );
$PayFlowAuth->setEnvironment('live');
$PayFlowAuth->processTransaction();
$response = $PayFlowAuth->getResponse();
echo '<pre>';
print_r($response);
I get below response:
Array
(
[RESULT] => 0
[RPREF] => RHX51F5D3XYZ
[PROFILEID] => RP0000000XYZ
[P_PNREF1] => BK0P6E1C2XYZ
[P_TRANSTIME1] => 19-Jun-19 04:42 AM
[P_RESULT1] => 0
[P_TENDER1] => C
[P_AMT1] => 30.00
[P_TRANSTATE1] => 8
[P_PNREF2] => BK0P6EB8DXYZ
[P_TRANSTIME2] => 21-Jul-19 04:44 AM
[P_RESULT2] => 12
[P_TENDER2] => C
[P_AMT2] => 30.00
[P_TRANSTATE2] => 1
[P_PNREF3] => BR0P6482FXYZ
[P_TRANSTIME3] => 19-Aug-19 04:52 AM
[P_RESULT3] => 0
[P_TENDER3] => C
[P_AMT3] => 30.00
[P_TRANSTATE3] => 8
)
However it does not include refunded transaction. When I search in paypal manager, I can see these 3 transactions along with 1 refund transaction too. I tried changing TRXTYPE to C (credit) but it gives the error: Invalid tender
So I am looking for any such parameter change where I can retrieve refunded transaction history or may be any method in payflow pro api.
2
Answers
At the end asked paypal support and they replied.
That is correct. Credits are issued outside of the profile so they are not tied to it and as a result do not show up when doing a PAYMENTHISTORY call.