I'm working on a project that ties into an API and uses virtuemart. Basically a user can buy time for a phone card. the few things I need help with are:
A) can/how can I create a custom php function once the user signs up. For instance, the user adds Items to the cart and proceeds to checkout. once the user clicks checkout they need to create an account, after they create an account is there an area in this process that allows for a custom function so that I can tie the creation of the account to an API?
B) same as above but after checkout. After the checkout goes through, how can I make it so the new values are sent to the API? Is there an area in the files that allow for custom functions here.
C) Lastly is it possible to add more options the the virtuemart customer account maintnance screen. I want an option that will tie into the API and show them exactly how much time the have left for their phone card. This information will be provided by the api.
All of these things can be achieved with a System Plugin. You would simply look for the right url, get any information from the result screen with regex, call your API and insert any changes back into the screen.
I'm not specifically aware of any VM functions for this, but as VM is in flux with Version 2 getting closer, it may not be a good time for any such investment in any case.
Related
I've got a site that offer users 3 different subscription plans (with 3 different prices). So there's a sign up page with 3 different subscribe buttons, each of which opens Stripe Checkout for the appropriate amount for each plan (I'm using the standard Stripe simple Checkout integration https://stripe.com/docs/checkout#integration-simple ) .
On my server I know which plan a user has subscribed to because I've got a hidden field in each Stripe Checkout button form with the plan name. The problem is how to stop someone editing the form (e.g. using developer tools in their browser) and changing the hidden plan field so they get e.g. the Gold plan at the Basic plan price.
The obvious solution seemed to be to check the amount associated with the stripeToken that Stripe returns (i.e. the same as the data-amount field in the Stripe Checkout form), before calling the Stripe API to actually subscribe the user. However, I'm not sure how to get the amount from Stripe using just the token and can't find an obvious API call for this.
Or is there some better way of handling multiple subscription plan options while ensuring a user can't somehow get away with paying a lesser amount?
Thanks.
so I need to ask a question, I need to setup a simple paypal express checkout system, that one can allow users to change currencies, and two can then update the page with the updated currencies.
Then I need a way for me to get the order information. As I will be selling website templates so I need a way for me to get their email address, so I can then email them with the link to the template file download.
So my question is what data do I get if I set up an express checkout system. And what code do I need, Do i need to create a database to get the returned data back from paypal? Or do I just get an email or can i see that when i log into my paypal account and check orders and see their details that way, but the main important detail i need is their email address?
Can I also say that this is the first time I have looked into express shopping carts. So I am a complete novice in this field, So I will struggle with the coding aspect. But I think it is the route I need to go down.
Also I want to make it all in php as well. But also I don't want to use ready made systems. I just need the back-end code so that I can then just implement it into my current design. Not sure if paypal give you the code when you click the express shopping cart option in All tool section. I did notice though it redirects to a page that lists many partner sites. I couldn't find anywhere for any implementation advice or tips or code.
EDIT: Also I know I will also need to use either IPN or PDT but the documentation I read is highly confusing and just is making me unsure if I can even set a system up. I also read that you should implement both systems, but I also read that that had a risk of doing the payment twice. So yeah i am kinda a bit unsure how to even go about implementing a system I need.
Thanks in advance.
Can Any one suggest me how to implement multiple payment gateways in a single cart page in codeigniter. i would like to implement bit pay, go card less, and pay pal, i don't know how implement this any ideas???
and any implementation techniques also useful for my development. i have seen this kind of implementation in word press.
enter image description here
You will need to create a different Library for each provider - potentially storing files in the third_party folder (and referencing with APPPATH). You can then load whichever library you need depending on the choice. See : https://www.codeigniter.com/user_guide/general/creating_libraries.html
You will need to add one button in cart page like "Check Out", after clicking this button give or show multiple payment options to customer like PayPal, Credit Card etc in other page.
And than system identify which button pressed by customer or user.Also you will need to create different library for all payment options.
I'm creating a really small website where I'll sell some products.
I need this website to show the available products, the users can add to the cart, and pay at the end, then I'll send the product for them by my self. It's a really small business.
I was taking a look at the paypal options and I didn't understand very well how it works.
For what I understand, with a free account I can only use their buttons, but I can't have a dynamic solution where I can manage my products on my website (look's like I need to add the products information like name and price on their website ).
What I wanted to do was just use my own website to handle this very simple store/products, and at the end, the user click on a CheckOut button, and Then I redirect the user to a paypal page where they can pay for the total value and then paypal redirect them back to me ( as a free account or at least with the 5$ account ).
Is that possible?
By the way I'm using CakePHP to build that, and I already have the website built with this framework, and to build what I need it's more than enough, I don't really need any solution like magento or others eCommerce platform.
Thank you.
If you use Paypal's free account then your visitor will leave your website, go to Paypal's website to make the payment, and then return to your website. Paypals paid version allows you to keep your visitor on your page, but you have to program you site to work with their API. Plus the cost can add up. Paypal also has other service other than just buttons. For instance they have a shopping cart too, but here again your vistor will leave your website to go to Paypals site to add the items to the shopping cart.
Another company that you might want to look at is https://stripe.com/ here you keep the vistor on your site as well as only paying per transaction rather than a monthly fee like at Paypal.
If you want to manage your items and inventory from your website and not enter everything into buttons at PayPal.com, I would suggest that you use Express Checkout. Express Checkout is also a free service and allows you to send all of the payments details to PayPal via API and PayPal will authenticate and allow your buyers to select shipping details. The user can then be redirected back to your website to complete their order.
You can find additional information here: https://www.x.com/developers/paypal/documentation-tools/express-checkout/gs_expresscheckout
Thanks,
I got a simple Digital Goods Checkout to work in Sandbox mode. I have a "Pay with PayPal" button that I can click which pops up an window for logging into PayPal. After that it redirects me to my purchasemade.php script, and from there I can successfully download a file.
My problem is that on my website I'm going to sell many products, so I need to know which product they want to download when they finish the purchase. Each product has a unique ID, so I thought I'd pass that ID as the item number in the HTML form as a hidden field named "item_number". However, I don't know how to read that value once I reach the purchasemade.php.
How do I read values passed in POST in the original form? Otherwise, what's the best way of identifying a product? I'm using PHP as my scripting language for this project.
If you're going to stick with Payments Standard I would recommend using IPN to deliver your digital goods. You could use PDT (which is very similar to IPN) to send order data back to the page the user gets redirected to, however, there is no guarantee they will make here even with Auto-Return enabled in your PayPal account.
Alternatively, you could use the Express Checkout API instead of Payments Standard. This method guarantees the user will make it back to your site prior to completing payment. This will allow you to utilize session variables so you can present the download to the user on the thank you/receipt page.
Still, though, I think IPN would be your best bet regardless of which way you go. You can use it to auto-deliver the digital goods, send out general email notifications, update your database, hit third party web services, etc. all in real-time.