Merchant key error
This topic contains 14 replies, has 3 voices, and was last updated by Kiran 8 years, 6 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: PayFast
-
AuthorPosts
-
May 8, 2017 at 7:56 am #377353
Hi,
I keep getting merchant key error (sandbox mode) since the core plugin update.
And signature error (live) since the update of the core plugin.
I double checked and my plugins are still current versions.How can I fix this, This is really time sensitive..
May 8, 2017 at 8:19 am #377359if I use the standard settings for testing “[email protected] ” in sandbox its perfect.
Not in live, it gives merchant_key invalid.When I switch to any one of my accounts then the MerchantKey error happens in test and signature error in live
May 8, 2017 at 8:22 am #377360This reply has been marked as private.May 8, 2017 at 9:14 am #377367This reply has been marked as private.May 8, 2017 at 9:17 am #377368also , fix spelling on line 112 … If you have a pass phrase set in your PyaFast
May 8, 2017 at 12:28 pm #377384This reply has been marked as private.May 8, 2017 at 5:28 pm #377436hi,
I alerted the developers.
Thanks for your patience…
May 9, 2017 at 8:44 am #377537Found another error in your output string..
…..pid%3D914¬ify_url=http%3A%2F%2Fwww……..
¬ify_url != ¬ify_url
Md5 signature will fail in the array as its calculating falsely
This sample is echoed out at line 300 after
$data['signature'] = md5( $getString );May 9, 2017 at 9:45 am #377546error confirmed at line 289
$pfOutput .= $key .'='. urlencode( trim( $val ) ) .'&';“¬” is being replaced with “¬”
separating the functions didn’t help and gave same results…
I then remembered that in some browsers the html parser needs proper validation.
Please change lines 284 – 295 with my updated code
OLD:
$pfOutput =''; foreach( $data as $key => $val ) { if(!empty($val)) { $pfOutput .= $key .'='. urlencode( trim( $val ) ) .'&'; } } // Remove last ampersand $getString = substr( $pfOutput, 0, -1 );With this new code:
$pfOutput =''; foreach( $data as $key => $val ) { if(!empty($val)) { $pfOutput .= $key .'='. urlencode( trim( $val ) ) .'&'; } } // Remove last ampersand $getString = substr( $pfOutput, 0, -4 );Now I’ll work on this Merchant_key issue …
May 9, 2017 at 10:09 am #377550Hi Miguel,
I have tested your live PayFast account details in my live test site & localhost site. At both places it successfully takes me to the login page at PayFast without “signature” problem.
Please check Pass Phrase value at PayFast account. If at PayFast site Pass Phrase is empty then no worry, but if you have set Pass Phrase then it must be saved at GeoDirectory PayFast plugin settings.
Let us provide FTP details we can look into more.
Thanks,
KiranMay 9, 2017 at 10:38 am #377557This reply has been marked as private.May 9, 2017 at 11:22 am #377563double confirmed, if I comment out the md5 you are producing then I can transact normally.
it is an optional variable, hence the test working
..oops , I see someone is on.. I’ll stop editing..
I just reverted my edits for you
May 9, 2017 at 11:42 am #377568Hi Miguel,
Please check and let us know.
FYI: Currently your live PayFast account details set at GeoDirectory PayFast plugin payment settings.Thanks,
KiranMay 9, 2017 at 12:13 pm #377577confirmed..
may I ask, what was wrong ?
I see the code is different but haven’t gone into it.May 9, 2017 at 12:32 pm #377584There are few changes at line no. 312, 428 & 498 related to CURL & PayFast pass phrase.
Kiran
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket