1
votes

I've implemented Website Payments Pro Hosted on my website. I can pay using the PayPal log in and it gives me the link to return to my store which is fine as I then display my order confirmation page to the user.

When the user decides to pay via credit card:

enter image description here

They are then redirected to a confirmation page I don't seem to have any control over:

enter image description here

What I've tried:

  1. Setting auto return on in my preferences and setting a return url (both via the Profile and in my initial API call when generating the button.
  2. Changing the Web Payments Pro confirmation page setting to On my sites confirmation page.

When the payment is taken via credit card, I'd like to redirect the user to my actual payment confirmation page. Is this possible?

1

1 Answers

1
votes

It turns out that showHostedThankyouPage=true was causing this issue.

I am using the .NET button API to generate the request for the iFrame like so:

var service = new PayPalAPIInterfaceServiceService(GetConfig(request));
        var createButtonResponse = service.BMCreateButton(new BMCreateButtonReq
        {
            BMCreateButtonRequest = new BMCreateButtonRequestType
            {
                ButtonType = ButtonTypeType.PAYMENT,
                ButtonCode = ButtonCodeType.TOKEN,
                ButtonCountry = countryCodeType,
                ButtonVar = new List<string>
                {
                    String.Format("subtotal={0}", _salesOrderPriceService.GetGrossTotal(request.Order)),
                    String.Format("notify_url={0}", request.NotifyUrl),
                    String.Format("return={0}", request.ReturnUrl),
                    String.Format("invoice={0}", request.Order.Id),
                    String.Format("currency_code={0}", request.Order.Currency.Code),
                    String.Format("cancel_return={0}", request.CancelReturnUrl),
                    "billing_first_name=test",
                    "billing_last_name=tset",
                    "billing_address1=test",
                    "billing_city=test",
                    "billing_state=tes",
                    "billing_zip=test",
                    "billing_country=GB",
                    "template=templateD",
                    "paymentaction=sale",
                    "business=tset"
                }
            }
        });

I had showHostedThankyouPage=true included in the name value pairs which was causing the issue. Removing it sorted it out.