Force responsive Paypal layout - layout

I'm using Paypal as a vendor.
My website is responsive and somehow I'd like to use the new Paypal responsive layout for my customers as well when it comes to payment.
Is there any kind of parameter I can submit in the buy now Paypal URLs so that I force the new responsive paypal layout? It seems as if there's still an A/B test ongoing on Paypal side - old none responsive layout vs. the new one.
Thanks!

What I found out is if your API call contains either item details or recurring payment, it uses old layout, otherwise it uses new layout.

Related

Can I redirect customer back to my store from Stripe Hosted Invoice page?

I'm generating Invoice object in Stripe and then redirecting customer to the hosted_invoice_url (https://stripe.com/docs/api/invoices/object#invoice_object-hosted_invoice_url)
After customer completes the payment, in the final step they are presented with two buttons - Download Invoice and Download Receipt, but there is no button/link for going back to my store. So it's a dead end. Customer can only close their browser tab.
Is there a way to specify something like success_url or home_url that would add a button for getting the customer back to my store?
Right now as a workaround I'm forcing hosted_invoice_url to open in a new tab. Customer closes the tab after they are finished and they get back to my store in the original tab.
From what I know, this is not possible with hosted invoices pages. I'd recommend relaying this use case/feedback directly to Stripe.
However, if you were to use Stripe Checkout you can pass success_url and cancel_url parameters which will fulfil your requirements in this case. Perhaps Checkout might be a better product for your use case?

Displaying Stripe Payment Request button as a Google Pay button

Is it possible to display the Stripe Payment Request Button as a Google Pay button? Currently, it shows up as an Apple Pay button on iOS devices. But when I open it from Chrome, it looks like this:
I believe this is intentional on stipes part - showing a button saying "google pay" would not be strictly correct, as chrome lets you pay with cards stored in the browser that are NOT google pay.
This is discussed a bit in more detail here: https://github.com/stripe/stripe-payments-demo/issues/9
However, if you don't care that it's absolutely correct, you can add whatever button you want: https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-own-button:
Using your own button
If you wish to design your own button instead of using the paymentRequestButton > Element, you may show your custom button based on the result of
paymentRequest.canMakePayment(). Then, use paymentRequest.show() to display the > browser interface when your button is clicked.
So it should be possible to create your own google pay button in whatever style you want (by styling it separately for chrome, which I'm not sure how to do, perhaps you can find help here: How to apply specific CSS rules to Chrome only?). The payment request API does not currently support determining which payment options are availible, so this is a problem you'll have to overcome.
UPDATE
Since April 2021, Stripe now shows you the google pay button by default:
Google Pay UI update: We now show a branded “Google Pay” button instead of the generic “Pay now” button when Google Pay is an option

Orchard CMS Editable Content on MVC Views

I'm working on an Orchard module for selling an e-book of sorts. Prior to purchase, a user can view a page showing a sample of the product. After purchase, there is no more need for the sample page, and the user has access to the full product.
I would like to set things up such that if a paying customer tries to access the sample page that they would be redirected to their full product and if a non-customer were to try to go to full product page they would be redirected to the sample. I'd also like my page content to be editable via the Dashboard.
My current implementation:
Controller handling the conditional routing / redirecting based on whether a purchase has been made.
A layer rule for each of my page url's each containing an html widget to provide the page content
This seems to work, but I am wondering what other options I have to accomplish this.
You may be making things way more complicated than they need to be.
Using widgets is unnecessary. It would be much better to build a regular content type and display that. You could serve it through a special controller that checks for a purchase, but even that is unnecessary. Instead, you could create a part that would have the purchase verification logic in its driver's display method. This way, you could even apply the exact same logic to any content type.

Security: Passing payment amount to PayPal

From what I understand, using the PayPal api, you can pass your payment amount by populating a hidden HTML input field which will be submitted to PayPal.
What I've got so far looks somewhat like this:
<input type="hidden" name="amount" value="60.00">
My question is - isn't this super unsafe? What's there to stop someone from changing the payment value in the element inspector for instance?
You may want to use PayPal ButtonManager API operation in order to programatically create, manage, edit, and delete PayPal Payment Standard buttons, which are the same kind of buttons that you can create from the PayPal Profile.
Hosted buttons created by this API reside on PayPal and can use all features, including inventory management; however, you can use this API to create code for non-hosted Standard buttons as well.
The button you will create from this API request will look like:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=19218
As you can see no values like "business", "amount" or others are visible and for this reason this would be a safe solution and personally I'd recommend it.
Back to your question "What's there to stop someone from changing the payment value in the element inspector for instance?"
We recommend to use API requests (see ExpressCheckout or ButtonManager to create Standard buttons) and Instant Payment Notifications service (IPN), which is a message service that notifies you of events related to PayPal transactions. You can use IPN messages to automate back-office and administrative functions, such as fulfilling orders, tracking customers, and providing status and other transaction-related information.

Docusign iframe css

Docusign iframe is wider then my wrapper(html body). Is there a way to change the width of the content in the iframe? I can change the width of the iframe to match the page, but then I end up having a horizontal scroll bar.
Also, users need to sign a document that's like quarter of a page. But Docusign shows the whole page, and when I try to change the height, I get a horizontal scroll bar. There's also a lot of white space after the document. How can I get rid of the white space after the document? Is there a way to create a document in Docusign that's only half a page, or even less?
Here's what it looks like:
http://community.docusign.com/t5/image/serverpage/image-id/845iEC30DDC72CFD7F83/image-size/original?v=mpbl-1&px=-1
Thank you.
I don't believe it's possible to configure/change the amount of screen real estate the DocuSign signing session window consumes. Whenever you're using the DocuSign API to facilitate embedded/captive signing within your site (as you are), best practice would be to launch the DocuSign URL in a new browser window/tab -- for a few reasons:
Some types of browsers have issues when external apps embedded in an iFrame try to write cookies (as DocuSign does).
Rendering DocuSign in an iFrame on a mobile device can result in a poor user experience, since DocuSign requires quite a bit of real estate and screen sizes on mobile devices are small to start with.
Rending DocuSign in its own window allows you to avoid the scrolling issues you're encountering.
Instead of trying to change the css of the iframe, why not just use Docusign's API?
Learn more about it here.

Resources