Im trying to set up klarna payment provider but I cant get it to work. Im a bit lost on how to do it to be honest.
Ive created a new provider and filled in merchant.id and sharedSecret. Ive also set paymentFormUrl to a url that points to a node which uses a template that contains this code:
@{ Order currentOrder = TC.GetCurrentOrder( long.Parse( Model._store
) ); WebClient webclient = new WebClient(); webclient.Headers[
"referer" ] = HttpContext.Current.Request.Url.AbsoluteUri; string
html = webclient.DownloadString( currentOrder.Properties[
"teaCommerceCommunicationUrl" ]+"?communicationType=checkout" ); }
@Html.Raw( html )
When I click the Payment-button in the cart-step I just end up on a blank page (=> @Html.Raw( html ) doesnt return anything). Im probably missing something important heh..
Ahhhhhhh! sharedSecret and merchant.id is bound to a domain. I was using another domain for development and was therefore getting 401-error.
When testing while developing you have to use Klarnas testing credentials: https://docs.klarna.com/en/testing/testing-credentials (merchant.id: 200, sharedSecret: test).
Set up Klarna
Im trying to set up klarna payment provider but I cant get it to work. Im a bit lost on how to do it to be honest.
Ive created a new provider and filled in merchant.id and sharedSecret. Ive also set paymentFormUrl to a url that points to a node which uses a template that contains this code:
When I click the Payment-button in the cart-step I just end up on a blank page (=> @Html.Raw( html ) doesnt return anything). Im probably missing something important heh..
How should it be set up?
What is the url for this line of code?
currentOrder.Properties[ "teaCommerceCommunicationUrl" ]+"?communicationType=checkout"
If i add
@currentOrder.Properties[ "teaCommerceCommunicationUrl" ]
in my template it prints this:http://mysecretpage/base/TC/PaymentCommunication/1/Klarna/bbfb3c4e-e125-462a-855b-5bca7068b6d2.aspx
Then try check the log if it says something with "Klarna" after the request is made and the html is empty
Hmm! seems like I get 401-error. Is there something i must set up on Klarnas side?
You should double check your merchant.id and the sharedSecret.
Kind regards
Anders
Ahhhhhhh! sharedSecret and merchant.id is bound to a domain. I was using another domain for development and was therefore getting 401-error. When testing while developing you have to use Klarnas testing credentials: https://docs.klarna.com/en/testing/testing-credentials (merchant.id: 200, sharedSecret: test).
is working on a reply...