Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • PierreD Savard 183 posts 290 karma points
    May 01, 2015 @ 02:30
    PierreD Savard
    0

    Paypal Express payement return Invoice #

    Hi, I use the great Payapal express paiement provider. All is working good for transmission, I can see my transaction in the paypal sandbox. But after paying on paypal, the return URL look like this:

    inv=9EE489E8B5852A329D1774D7071FCE471E150E1D0391823CC202E1331250C6ACD3C23B134A9C57B36809A8A6380DE8A7BC1F251E41EFB7E1637B7A627DC612B99A69CF1CCA401A6C75B816451912D12CB7D4A35F954F6417955B1A1F8EC31B6ED161E426819E255AD68A1D0DD9E90BB4EC0A59C0FC66D049B1B5A55030D0403778E65D8EFBE1BFC5DC95B7BE5C0112BDC2CBECBDC21C71AFEE05EB511819F61E

    I was thinking receiving the merchello invoice GUID to pass it to my receipt page (for now I use the one in the kitten sample merchello website).

    In the paypal provider I use this setting: /receipt/?inv=%INVOICE%

    Any suggestion?

  • Jason Prothero 422 posts 1243 karma points MVP 2x c-trib
    May 01, 2015 @ 17:47
    Jason Prothero
    0

    The PayPal plugin was created by Scandia.  I've pinged Nik Walberg and hopefully he can give a response.

     

    Thanks
    Jason 

  • Nik Wahlberg 639 posts 1237 karma points MVP
    May 01, 2015 @ 18:09
    Nik Wahlberg
    0

    Hi Pierre, I will have one of the devs take a look.

    Thanks!

  • Nik Wahlberg 639 posts 1237 karma points MVP
    May 04, 2015 @ 13:22
    Nik Wahlberg
    0

    Hi, looked at this and it appears the invoice key is encrypted. Please use one of the following methods to solve the issue in your install:

    1. Decrypt using EncryptionHelper.Decrypt(string value) or value.DecryptWithMachineKey()
    2. Or, always display the latest invoice details (like Bazaar currently does)
    Hope this helps.
    Best,
    Nik 
  • PierreD Savard 183 posts 290 karma points
    May 05, 2015 @ 01:52
    PierreD Savard
    0

    HI, I try the EncryptionHelper like this one: http://johnnycoder.com/blog/2008/07/03/c-encryption-decryption-helper-class/

    But I got an exception {"Bad Data.\r\n"}

    I take a look in the bazaar app and in the receiptController, the only get the invoice key lke that: CustomerContext.GetValue("invoiceKey"); But in my case the CustomerContext is null at this point.

    How I can't decrypt or control the way papal return value? Thanks

  • PierreD Savard 183 posts 290 karma points
    May 15, 2015 @ 20:49
    PierreD Savard
    0

    I dig an little more, When the paiement is completed, the URL used by Paypal for callback is:

    http://localhost:65079/umbraco/MerchelloPayPal/PayPalApi/SuccessPayment?InvoiceKey=b4050932-93bb-495d-826f-0503d3e92300&PaymentKey=8cfd4174-9cab-400a-9e2f-8624d59fd2f7&token=EC-0LC28218XE2191156&PayerID=ZHMY3BS9M3QRG"

    We can see that the InvoiceKey is good. But just after that the plugin call my page with this

    http://localhost:65079/receipt?inv=A8237017A537A28553A93455018417C58E010146B66EE4E0D63547D0F55A55EF6DFFC958724E56C69B3D245171780559AE9360B33D1483C663B801B33E5D1B1BCB1E5CEB7E7FCD9775206212EA682FA7BAA86797319053E6468DB7A814BE690A0121F53138487E6819EA2D91264FAFFE6745934234BFFDC877F219622B692C31AC6EA8352AC27E167399817301C6ECBD8FE45BEB1A06F15D004C28C59708F266

    That wrong. I try to found why. I download the source code from here:

    https://github.com/Merchello/Merchello/tree/1.6.1

    Where I can found the source of that controller? I open the solution in the Merchello-1.6.1\Plugin\Payments\PayPal\src\Merchello.Plugin.Payments.PayPal folder but I can't found anything on the function "successPayement" thanks

    EDIT: I am totally lost! The source code provided do not seam to correspond to the Paypalexpresss plugin 1.4.1 ?! In the source code we got a PayPalEpressCheckout.html in the Merchello.Paypal folder. Nothing like that in the 1.4.1 build.

  • PierreD Savard 183 posts 290 karma points
    May 27, 2015 @ 01:39
    PierreD Savard
    0

    Nobody use this paypal module? I just need to solve this to deploy to my client. Do Merchello have another working paypal provider that I can use instead?

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    May 27, 2015 @ 09:02
    Biagio Paruolo
    0

    I'm interested too. I like to start to use Merchello and to devel and deploy it.

  • Nik Wahlberg 639 posts 1237 karma points MVP
    May 27, 2015 @ 13:20
    Nik Wahlberg
    0

     

    Thanks,
    Nik 
  • Nik Wahlberg 639 posts 1237 karma points MVP
    May 27, 2015 @ 13:31
    Nik Wahlberg
    101

    Not sure what's with the posting, sorry. 

    Please use one of the following options if decrypting:

    1. Merchello.Web.EncryptionHelper.Decrypt()
    2. Umbraco.Core.StringExtensions.DecryptWithMachineKey()

    Let me know if any of those work. Thanks!
  • PierreD Savard 183 posts 290 karma points
    May 29, 2015 @ 21:32
    PierreD Savard
    0

    Thank for your help! The second line work like a charm (Umbraco.Core.StringExtensions.DecryptWithMachineKey())...

    The only thing I need to making work is the capture funds problems: https://our.umbraco.org/projects/collaboration/merchello/merchello/64487-Paypal-Express-capture-funds-problem

    Can you take a look ?

  • Matt 12 posts 98 karma points
    Oct 20, 2015 @ 00:37
    Matt
    0

    I can get the invoice ok, Is it possible to get the Paypal Transaction Id in the return url?

    I need this to store so I can reconcile transactions in a seperate database

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Oct 26, 2015 @ 21:22
    Biagio Paruolo
    0

    You have to customize the Paypal code where build the return URL

    https://github.com/Merchello/Merchello/blob/merchello-dev/Plugin/Payments/PayPal/src/Merchello.Plugin.Payments.PayPal/Controllers/PayPalApiController.cs

            // redirect to Site
            var returnUrl = payment.ExtendedData.GetValue(Constants.ExtendedDataKeys.ReturnUrl);
            var response = Request.CreateResponse(HttpStatusCode.Moved);
            response.Headers.Location = new Uri(returnUrl.Replace("%INVOICE%", invoice.Key.ToString().EncryptWithMachineKey()));
    
  • Matt 12 posts 98 karma points
    Oct 26, 2015 @ 22:08
    Matt
    0

    So the PayPalApiController.cs retrieves the PayPal TransactionId?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies