cancel
Showing results for 
Search instead for 
Did you mean: 

Sandbox - Test Store - Continue not working

Options
AndrewDay
Contributor
Posted on

I am trying to to test an order I made with the API. When I go to the Accept URL returned from the API and log into the site as a test account from my sandbox it takes me to the "Test Store" page then I select my "Pay with" as "PayPal balance" then press the "Continue" button is just keeps redirecting me to "Test Store" I assume this should be going somewhere else....

 

Can anyone tell me what I may be missing?

 

Thanks

6 REPLIES 6

Sandbox - Test Store - Continue not working

Options
MTS_Justin
Moderator
Hello,

This sounds like you didn't pass a "return url" when you created the order. You'll need to pass a "return" and "cancel" URL within the order creation request and they need to be passed within the "application_context" object, as shown below.

"application_context": {
"return_url": "https://yourdomain.com/return",
"cancel_url": "https://yourdomain.com/cancel",

Thanks !


Was my post helpful? If so, please give me a kudos!

Sandbox - Test Store - Continue not working

Options
AndrewDay
Contributor

Thanks for your reply. This is what I am currently sending

 

{
	"purchase_units": [{
			"amount": {
				"value": "1.00",
				"currency_code": "CAD"
			}
		}
	],
	"intent": "CAPTURE",
	"application_contextobject": {
		"user_action": "PAY_NOW",
		"return_url": "https://ptsv2.com/t/bjyml-1628689960/post",
		"cancel_url": "https://ptsv2.com/t/bjyml-1628689960/post"
	}
}

Sandbox - Test Store - Continue not working

Options
MTS_Justin
Moderator
Hello,

I tested a simple REST v2 order creation today and used the URL's you provided.

Once I logged in and approved the payment, I was re-directed back to the URL you shared and was shown a message "Thank you for this dump. I hope you have a lovely day!".

The return URL also had some transaction information appended to it, so everything looks to be working fine from a PayPal perspective.

https://ptsv2.com/t/bjyml-1628689960/post?token=62U542349S095311W&PayerID=2MZ64KGSA3MMA

Thanks !

Was my post helpful? If so, please give me a kudos!

Sandbox - Test Store - Continue not working

Options
AndrewDay
Contributor

i login and it takes me here:

Capture.JPG

 

then press "Continue" and it just takes me back to the same page.

 

could this be an issue with the way my test store is configured? Is there something wrong with the rest of my JSON??

I am at a loss

Sandbox - Test Store - Continue not working

Options
MTS_Justin
Moderator
Hello,

I can't see the image you attached, it just shows a box with a circle with a line through it.

I can't comment if it's an issue with how your store is configured, as I can see the specific settings for it.

The part of the JSON you provided looks ok. I'd recommend using the sample template we provide and make small changes, test the code outside of your store and confirm it's working directly and that will confirm if the actual JSON is working as expected.

https://developer.paypal.com/demo/checkout/#/pattern/checkout

You should only need to change two values within the same code on this line.

<script src="https://www.paypal.com/sdk/js?client-id=test&currency=USD"></script>

1. replace the value "test" with your own client_id

2. change the currency code from USD to CAD

Copy all the code and paste into a basic text file and save it with the extension .html and then open that file in your browser. Click the PayPal button and login with an account which is different from the account which is receiving the payment.

Once you've confirmed basic payment functionality is working, you can then make small changes to the code, for example adding the "return" and "cancel" URL's which we discussed earlier and test again to ensure the return / cancel work as expected.

If everything is working, you can copy the code into your production site.

Thanks !

Was my post helpful? If so, please give me a kudos!

Sandbox - Test Store - Continue not working

Options
AndrewDay
Contributor

Thanks for your reply. (I added the image 3 times and it keeps getting removed )

 

I ended up contacting Merchant Technical Support and I think he was able to replicate the Issue using my account as it has now been raised with the engineering team so I hope they can fix it.

 

I am not able to use the JavaScript code in the project I am trying to add PayPal support to  as it is in Salesforce so only the rest api will work.

We have heard there is a managed package coming for B2C Salesforce Lighting Commerce Server and that would be the ideal way to do this but there

is no date for it yet.

 

Thanks

 

 

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.