Skip to content
This repository was archived by the owner on Jun 23, 2021. It is now read-only.

Use reason_code instead of txn_type. - #6

Open
kpheasey wants to merge 1 commit into
aligent:masterfrom
kpheasey:master
Open

Use reason_code instead of txn_type.#6
kpheasey wants to merge 1 commit into
aligent:masterfrom
kpheasey:master

Conversation

@kpheasey

Copy link
Copy Markdown

txn_type was not being returned when a refund was processed. This caused the condition to fail and the credit memo to be created. Using reason_code = 'refund' fixed the issue.

txn_type was not being returned when a refund was processed.  This caused the condition to fail and the credit memo to be created.  Using reason_code = 'refund' fixed the issue.
@jonpday

jonpday commented May 31, 2015

Copy link
Copy Markdown
Member

@andihan can you please test this and consider the different scenarios. i'm interested to know whether Paypal changed their API or what caused this issue to arise. thx. cc @aligentjim

@kpheasey

Copy link
Copy Markdown
Author

I should mention, this was for a partial refund.

@jonpday

jonpday commented May 31, 2015

Copy link
Copy Markdown
Member

that's useful info, thanks @kpheasey - do you know if this changed recently?

@kpheasey

Copy link
Copy Markdown
Author

I only began using PayPal Express in November of 2014. Partial refunds were creating a credit memo and marking all items returned. Last week I finally looked for a solution and found this repository. After installing, I noticed it didn't work and found this problem.

I can't say for certain when and if the PayPal callback changed, just that it was not being returned with my partial refunds.

Only other piece of information that may be relevant is that the PayPal merchant is in the UK and taking orders from the US, EU, and UK.

@andihan

andihan commented Jun 1, 2015

Copy link
Copy Markdown

@jonpday I'll look into it.

@andihan

andihan commented Jun 3, 2015

Copy link
Copy Markdown

Hi @kpheasey , have you tried a full refund? Did a full refund return txn_type?

@kpheasey

kpheasey commented Jun 3, 2015

Copy link
Copy Markdown
Author

I have not tried a full refund. Until I'm working for that client again,
I'll be unable to try that.

Maybe switching the conditional operand to an 'or' so that both can be
checked os the better solution.
On Jun 3, 2015 3:54 AM, "andihan" notifications@github.com wrote:

Hi @kpheasey https://github.com/kpheasey , have you tried a full
refund? Did a full refund return txn_type?


Reply to this email directly or view it on GitHub
#6 (comment)
.

@andihan

andihan commented Jun 5, 2015

Copy link
Copy Markdown

@kpheasey I placed an order via Paypal Express, and then issued a partial refund at Paypal side. (Did you do the same thing?)

It is confirmed that there's no txn_type in the refund IPN, which I think is fine. However, I didn't see a credit memo created in Magento by the IPN. Instead, there was a comment added to the order (see below).

IPN "Refunded". Refund issued by merchant. Registered notification about refunded amount of $16.00. Transaction ID: "6CX84106AFSD6981F". Credit Memo has not been created. Please create offline Credit Memo.

I also tried full refund issued from Paypal. The IPN still didn't contain txn_type. Differently, it created a credit memo, added the following comment, and closed the order.

IPN "Refunded". A reversal has occurred on this transaction because you have given the customer a refund. Registered notification about refunded amount of $184.99. Transaction ID: "9W67865ASDF36780U".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants