question

Abquhazar avatar image
Abquhazar asked

PayPal Express Checkout window Not showing in Non-receipt payment processing

Hello everyone,

I'm having troubles getting the PayPal Express Checkout window to show while using the Non-receipt payment processing.

Here is a look at my code where the Express Checkout window should show:

void payForPurchase(string orderId)
    {
        PlayFabClientAPI.PayForPurchase(new PayForPurchaseRequest() 
        {
            OrderId = orderId,
            ProviderName = "PayPal",
            Currency = "RM"
        }, result => {
            // Handle success
            Debug.Log("Pay for purchase was successful");
            confirmPurchase(orderId);
        }, error => {
            // Handle error
            Debug.LogError(error.GenerateErrorReport());
        });
    }



Within paypal, I have added billing_api1.playfab.com to allow permissions and added the express checkout window (and all other permissions for PayPal)

I have also added the PayPal Merchant ID my PlayFab PayPal in the Addons page.


looked at 2 other questions and they didn't seem to offer much help https://community.playfab.com/questions/638/208252737-PlayFab-and-PayPal-integration-problem.html

and

https://community.playfab.com/questions/21817/confirmpurchase-failed-by-payment-provider.html

i previously asked this question because i believed my issue was that the PayerID was missing. This was simply due to the fact that the Express Checkout window never showed up: https://community.playfab.com/questions/47914/checkout-payerid-is-missing.html?childToView=47973#answer-47973



I believe the issue with with my code. It seems like I have everything else configured correctly. Let me know if you have any potential ideas or can point me in the right direction.

Thank you!

Partner Add-ons
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Rick Chen avatar image
Rick Chen answered

From the code snippet you provide, in line 11, you directly confirm the purchase after the successful call of pay for purchase. You are missing the step that presenting the PurchaseConfirmationPageURL to player and let the player finish the payment from the paypal interface. This page does not show up automatically, you should redirect the user to the PurchaseConfirmationPageURL, which is returned by PayForPurchase API. You can search how to redirect to a url in Unity. For example, using Application.OpenURL.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.