PayPal Sandbox: testing payment - paypal-sandbox

I am testing checkout via paypal
Paypal always adds something like this:
395&county=6
to my return url and its breakes my seo url.
For example, my returning page is
http://mysite.com/pay/success
(<input type="hidden" id="return" name="return" value="http://mysite.com/pay/success" />)
After payment, when i click on "Return to My site Test Store",
i go to
http://mysite.com/pay/success395&county=6
So, i get 404 page instead my thank you page
Solved. Specific problem on my side. With paypal all fine.

Related

How do you login via the WebEx URL REST API?

I'm new to the Webex API and am trying to run my first few calls. Starting with a login call, it looks to me like our REST url for that should be https://[ourSite].webex.com/[ourSite]/p.php?AT=LI
What I’m unclear about is how to authenticate. The documentation (page 2-22) doesn’t list username or password as fields that can be sent. The only field it lists as required is WID (Webex ID), which I assume is to be the authentication string? If so, how does one find this value? I do not see it in the user edit screen in site administration, which seems like the logical place for it to me. Is there some special screen I need to access for API information like this?
It would be https://sitename.webex.com/sitename/p.php?AT=LI&WID=[WebExID]
It used to allow passing account password, meeting passwords and partner IDs in the URL itself, but a security update removed that functionality, so they must be passed in an HTTP POST form. Example:
<form action="https://sitename.webex.com/sitename/p.php?AT=LI&WID=username" method="POST">
<input type="text" name="PW" value="">
<input type="submit">
</form>
Check out the blog post below for more details:
https://communities.cisco.com/community/developer/webex/blog/2016/02/11/recent-url-api-changes--get2post

BBPress bbp_new_reply action not firing when user replies to embedded thread

I'm working an educational website that produces video content and uses a BBPress forum for discussion rather than the native WordPress comments. Here's how it works:
I have a hook on wp_insert_post that creates a new BBPress topic when a new video post is created and saves this new topic_id to a _comment_topic_id meta field.
In my single-video.php template where the video is displayed, I'm using the BBPress [bbp-single-topic id=$topic_id] shortcode to display the topic thread and reply form for people to post comments.
All of this works great! I'm just having one problem - the "subscribe" feature of BBPress isn't working when people post replies via the Video Single page. The reply is posted just fine, but subscribed users don't receive a notification. If you're not familiar - when a user subscribes to a thread, they receive an email whenever someone replies to the thread. This is still working fine when someone posts a reply via the actual Thread single page - it's only a problem on the thread embedded via the shortcode on the Video single page.
I've tried digging into the core and I got so far as to discover that the bbp_new_reply action isn't firing - BBPress uses a function called bbp_notify_topic_subscribers hooked into bbp_new_reply to send the notifications and that function isn't running at all when a reply is made via the Video single page.
It seems that BBPress uses some hidden inputs to determine what actions to run after a reply has been submitted, but those seem to be included properly through the shortcode. These appear at the bottom of the Topic single form (that works properly);
<input type="hidden" name="bbp_topic_id" id="bbp_topic_id" value="422573">
<input type="hidden" name="bbp_reply_to" id="bbp_reply_to" value="0">
<input type="hidden" name="action" id="bbp_post_action" value="bbp-new-reply">
<input type="hidden" id="_wpnonce" name="_wpnonce" value="83ea236cd1">
<input type="hidden" name="_wp_http_referer" value="/forums/topic/SLUG/">
And these appear at the bottom of the Video single form (that doesn't)
<input type="hidden" name="bbp_topic_id" id="bbp_topic_id" value="422573">
<input type="hidden" name="bbp_reply_to" id="bbp_reply_to" value="0">
<input type="hidden" name="action" id="bbp_post_action" value="bbp-new-reply">
<input type="hidden" id="_wpnonce" name="_wpnonce" value="83ea236cd1">
<input type="hidden" name="_wp_http_referer" value="/videos/SLUG/">
I'm at a loss for how to debug this issue further and could really use some help. BBPress has all kinds of page type/post type checks in the core that I've been ducking and weaving around, but this one has got me stumped. I suspect the problem is that SOMEWHERE it's checking the post type of the current post, seeing it's a video instead of a topic and bailing before the action runs, but I have no idea how or where to find that and how to patch around it.
Thanks!
Turns out every lead I was following was a red herring.
I had another function hooked into wp_insert_post that was redirecting you back to the Video single page instead of sending you to the Thread single page if you posted your reply FROM the Video single page. It turns out that redirect was hitting and stopping execution before the bbp_new_reply actions were allowed allowed to fire.
I changed that function to also hook into bbp_new_reply and changed its priority to 11 so it would run after the native actions. Working great!

Validation in a modal form

I am updating our site that is used for our people to enter in orders. The first page gathers the customer information. The user currently clicks on a button that brings them to a secondary page where they can enter part of the customers name and it will return the correct customer code. The site is written in asp using sql.
I am trying, with html5, css and asp, to redesign the form so when the user clicks on the button, they will get a modal form where they can enter in part of the customers name. It would then return the id number and put it on the main page and close the modal form or it would return a not found error.
I have the asp code but where I am having an issue is how to load up the modal form. I can show a modal form from a page - but how should I handle the validation? The form itself is basically written in the html 5 page.
Thank you for your input.
George
If you are using jQuery then this is already supported. Each form element can have required to validate against empty input fields.
You can go further with changing the type attribute. For example this one requires email addresses:
<input type="email" required placeholder="Enter your email address" value="" />

nopcommerce payment plugin

I have developed a payment plugin that works with redirection logic. I used as guide the Paypal standard and MyGateVirtual
My problem is that after the user confirms the order he is redirected to the paycenter site where he inputs his credit card data and the paycenter site returns to our site in specified urls for success and failure
In the success action of my payment controller,if the payment was not accepted for some reason, I want to redirect the user to orderdetails so he can resubmit his payment.
I use a view with the following code fragment for a button that is supposed to redirect the user to orderdetails
#{ var storeLocation = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Core.IWebHelper>().GetStoreLocation() + Url.RouteUrl("OrderDetails", new {orderId = Model.OrderId});}
<input type="button" name="orderdetails" value="#T("Account.CustomerOrders.OrderDetails")" id="orderdetails" class="orderdetailsbutton" onclick="setLocation('#(storeLocation)'" />
But nothing happens if the user clicks the button.
The onclick event handler is not redirecting to orderdetails.
Please help with this issue
George
setLocation() is a JS function defined in public.common.js. I would take the following step to diagnose the problem:
Check if public.common.js is properly included in your page.
Check if the 'storeLocation' variable is generating the correct URL. You actually don't need the front part, just the part starting with 'Url.RouteUrl' will do, since you are already in your own site.
Set a breakpoint in the Developer Tool of your browser, and check if setLocation is properly called, and what's the error if it's not.
With a closer look at your code, it turns out that the JS code is not well-formed (less one parenthesis).
This is your code:
setLocation('#(storeLocation)'

How is this input tag linking to another page?

Response.Write("<div><input type='submit' name='submit' value='Update Cart' /></div>")
Response.Write("<div><input type='submit' name='submit' value='Shop More' /></div>")
Response.Write("<div><input type='submit' name='submit' value='Checkout' /></div>")
that is some example code from my teacher, but he hasn't answered my email in a couple days so I need some help.
When you click the Update Cart button it just updates the cart page it's on, but when you click the Shop More button it links to Shop.aspx a different page, and the Checkout links to another page as well. I can't figure out how it is linking just from that code, anybody have any insights?
Most likely either a server side redirect has occurred, or there is some Javascript which changed the form's action. Whether that was intentional or not is yet to be determined because the given code snippet doesn't give much to work with.
By checking the value of Request.Form["submit"].ToString() you can perform a conditional operation.

Resources