How to integrate with mysql in google checkout? - mysql

I am working on Google checkout to sell my product online. i want order information to be stored in mysql database on my server only after payment verification of customer.when customer click on order now button on Google checkout synchronously that order complete information to be stored in database also. i m in fix to solve this but not getting any way of out..

Please note that the order is not complete when the customer clicks the Buy Now button. The order is complete after the customer finishes the order on Google Checkout's "Place Order" page and Google verifies and charges the credit card.
To get order processing details use the Google Checkout Notification API:
http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notification_API.html
You'll get callbacks at various order processing stages which will allow you to update your database and inventory accordingly.

Related

How to set up per-seat subscription with Stripe?

Good day!
I am trying build a per-seat subscription model for my web site.
Before, I tried use Checkout session to provide "place", to write personal data, but the max what I reached - is creating default Subscription that you could cancel for instance.
What I wanna do?
• Figure out, if possible, how to create per-seat subscription through Checkout session and after, on event "User joined" automatically replace new price of the subscription.
• If through Checkout session that is not possible, how to implement it through code?
How to get a user's card and how to upgrade later the subscription.
I read the article on Stripe, but from that I can't figure how I get client data as card.
In addition, I use Stripe Extension on firebase with cloud functions.
Hope, this problem will be solved :)
You can create a per-seat type subscription with Stripe Checkout. For that, you need to have a recurring price, just as the article suggests. Then pass the price into line_items property when creating a subscription, along with the initial quantity. For example, a customer might want to purchase 5 seats/licenses right away. You can also enable adjustable_quantity setting to allow the user to change the quantity on the Checkout Session page.
When a new user joins, use the Update Subscription API to change the quantity of the item. For example, if the new total number of users you are serving is 11, set the quantity of the price to 11. More info here.
If you don’t want to use Stripe Checkout, you can create a subscription via API, by following this guide. The upgrade step looks the same as in the other solution.
Besides that, Stripe has a Billing Customer Portal that allows users to modify their subscriptions, it’s worth taking a look.

Programmatically fetch user's last login date to G Suite

On a user's page on the G Suite admin console, an admin can see the last login of a user. For example, one user I can see has a "last login" date of two years ago.
I'm trying to pull this date programatically. However, the Reports API that provides information on login events only goes back 180 days. How is Google getting this login date, and can it be fetched via API?
Google has this information because they are logging the event when it happens and storing that to present in the admin console. If you start to build an application now and start storing those events as time passes you too will have a date that goes back years. G Suite Enterprise customers can seamlessly do this if they Set up BigQuery logs in the Admin console.
You should be able to get this information now though. Look at the following APIs used in GAMADV-XTD you can get this info with this command for example.
gam report users parameters accounts:last_login_time filters "accounts:last_login_time<#filtertime#" filtertime -5y
https://developers.google.com/admin-sdk/reports/v1/reference/activities
https://developers.google.com/admin-sdk/reports/v1/reference/customerUsageReports
https://developers.google.com/admin-sdk/reports/v1/reference/userUsageReport
I somehow missed this before, but you can get the last login date/time with the User Usage Report (rather than the Login Activity report).
API docs are here and the App Script example I'm using is here. I realized that if GAM was pulling the information there had to be an API for it.

Get TransactionID from Recurring Profile Information

I have created ReurringPaymentProfile using CreateRecurringPaymentsProfile API and can get all details of the profile using GetRecurringPaymentsProfileDetails API.But now i want make function by which site admin can refund any amount of any transaction.
I have already worked with RefundTrasaction API but that is with Ecommerce.But for RefundTrasaction we need TransactionID but in recuruing payment i have not get the tansction id.
Can any one help to get the transction id for RefundTRansction API. Or How i will refund the subscription Money using API.
Thanking you all
Check this link .
It give step by step description about creating recurring profile.
https://developer.paypal.com/docs/classic/express-checkout/ht_ec-recurringPaymentProfile-curl-etc/

Updating Woocommerce Orders Programmatically

I have an eCommerce site running Woocommerce on top of Wordpress, and the company running it has changed there shipping system to an external company who stores the products in their warehouse and ships the products when they are bought.
In terms of automation, downloading information on new orders and sending it to the shipping company is fine, but when they respond to me with an XML of the orders sent and the associated tracking numbers, I need to be able to have a system that automatically updates the orders (including sending out the emails necessary). However, the only way I currently know how to do that is to update the MySQL database. But with that method, the automated email system is overridden and ignored.
Does anyone know how I can update orders statues and other information programmatically, which would allow Woocommerce's internal functions to be executed in the same way as manually logging into the admin side and updating the order?
Found a solution to this yet?
The code below works to mark an order as complete, but does not execute other actions as you describe in the admin
// create a new checkout instance and order id
$checkout = new WC_Checkout();
$this_order_id = $checkout->create_order();
$order = new WC_Order($this_order_id);
$order->update_status('completed');

Google Group - Clone or back up a group on admin console

We have a large emergency notification list (Google group) consisting of 75000 members. The membership of this group is maintained through a daily sync with enterprise identity management tables using GSuite Admin SDK - Group Settings API. Can anybody suggest an easy way to create a backup group for this list directly on Google Admin console. If the original list lost its membership it took 14 hours to bring the list up via API. Hence the need for a backup group. This backup google group must be ready to send the emergency alert message in case some thing happened to original group membership during daily sync.