Suggestion for Authnet AIM/CIM membership site - authorize.net

I have built a software solution for recurring billing using ARB and I now have the task of using AIM and CIM. I have searched for an hour before asking just as an FYI.
I assume for single transactions I use AIM. Then, to store the card on Authnet servers for future charges I use createCustomerProfile followed by createCustomerPaymentProfile.
My question is this:
Should I use AIM to charge the card, if its successful then I make the call to createCustomerProfile and use the return id for createCustomerPaymentProfile.
I know this seems like a simple question but I just want to be sure before I start into it.

Yes. You always want to use AIM first as it is both fast and allows you the opportunity to verify the card is valid before creating a CIM profile.

Related

Anchor smart contract where two parties pays the contract and one of them get's the amount

i'm new to solana development and working on a personal project using the anchor framework.
I fould some resources like solana escrow example and some youtube videos on solana PDA but not able to understand it completely. What i want to achive is:
Let's sat there are two players A & B, both pay same amount (ex: 0.01 SOL) to the contract, based on a condition or i invoke a function (not sure how it's done) one of the player is paid the amount (winner).
How can i achive this using the solana (Anchor), i would really appreciate some resource.
Thanks 🙂
Couple things going on here -
Think of a PDA, 'Program Derived Address', as an account address derived from the address of your program and whatever you salt it with, instead of a random address. This is useful for storing some data that you'd like to be able to grab later without having to remember the address, and rather just needing to remember what you salt this with. In your case, you'd likely want to create an account with a PDA salted with some kind of GameID or player (for instance, player A creates a game, and you generate a PDA with your program address and player A's pubkey).
PaulX's Escrow Program is a excellent resource, however he is not using Anchor framework and is instead implementing it natively, which sounds out of scope for what you're working on.
I think my dutch token auction program may be of some use for you, as far as PDA's go. Additionally, check out the Solana Cookbook, or more specifically the section on sending SOL, which is a method within the SystemProgram.
Solana/Anchor is awesome, but it's difficult without scouring the docs. The Solana Cookbook and the Anchor Discord Server are your friends!

Use a code executing every hour in Django

I'm using Django for developing an app for booking cars, then I need an automated code to check if a car is booked automatically every hour, I'm new in Django and I don't have idea how to do this
I agree with abhijeetviswa's answer and also the linked answer that mentioned Celery (if you need something a bit more complex).
I'd also think very carefully about what it is you are trying to achieve and to consider if there is a different way to do it. Unless you are going to use Django signals to be able to respond to the user when it finds that the car is booked, you might not actually need this to be a Django thing at all.
For example, if you just wanted to know if the car was booked or not, you could consider refreshing that information just before you need to know it, (i.e. before building some results) rather than polling for it every hour.
Obviously, this depends heavily on what you want to achieve.
You can look into management commands and cronjobs. You basically create a management command that will perform a specific function. You can then schedule a cronjob to run every hour which will execute this management command.
Check out this answer as well.

Master-Detail (parent-child) Input form with Admin-on-rest

I need help/recommendation for creating an order like input form with MASTER inputs like (order no, date, customer name, address) along with DETAIL info in multiple rows like (Item no, Description, Qty, Rate, Amount).
I am using Admin-on-rest as front-end interface and Loopback for my backend api.
Being new to react/redux and still learning core concepts, I am getting a hard time in finding a good example/starting point to build this functionality. So far, I think this example based on redux-form can help in creating a custom component, but I am yet not competent enough to build this myself.
Any reference to a similar example or some simple code to get me started will be very helpful.
Ref. Image
I think you need this.
How to richly style AOR Edit page
The last answer on the page is a somewhat detailed guide on creating a custom edit component in AOR. Feel free to ask more questions here about how this will be done.
Looking at your design you will need to also think how this data will be updated at the API level. AOR itself will make a single request when you hit save. So how will your API handle updates to multiple models etc.

Multiple HITs or ExternalQuestion in Mechanical Turk?

First of all I must say I am totally new to MT so forgive me if I am thinking in a totally wrong way.
I have to create a task for workers where they have to classify a sentence if it is spam or if it falls into a certain category. I will have about 2500 sentences to classify a day.
What is the best way to use the API to do this. I understand how to create a HIT using the API, but it is my understanding that I can't create a recurrent HIT that changes itself once each of the sentence is classified. Do I need to create 2500 HITs?
I researched and found out about the External Question which I can setup in my server and make it change with each form submit.
In that case will it be just 1 HIT? is that the correct way to do this?
I am confused in the dynamic part of MT.
Any tip, documentation (updated) or suggestion will be appreciated.
Thanks!
You likely want to create separate HITs.
If you create an single External HIT (hosted on your server), a
MTurk Worker who takes your HIT will not be eligible to take another
task (e.g. a classification task) since Workers are not allowed to
take a single HIT more than once. However, if you create separate
HITs, a Worker can take as many of them as they wish, which is
probably what you want.
You are correct that you cannot automatically change a HIT
dynamically unless it is run on your own server.

Weekly Facebook Scores clearing?

we want to do something that's relatively common among mobile games. We want to reset our Facebook scoreboard every week. I am surprised to find that - looking around - there is no automatic way to do this.
Is it in the plans to offer this functionality? A probably easier thing on Facebook's end that would work for us is if when we ask for friends scores, we get the date of each score, so we can then filter out the scores that are too old.
Other than that, it seems that we'd have to write a Windows Service or Cron task to call the Facebook every week and do this (or do it manually from Putty or other tool), neither of which seem accceptable for this small task.
Thank you and let us know!
-Brian Hunsaker
Technical Director # DarkTonic Games
There's no way to tell Facebook to wipe your app's Scores automatically, but you only need to make a single API call to wipe all scores:
https://graph.facebook.com/[APP ID]?access_token=[APP ACCESS TOKEN]&method=delete
This is mentioned here:
https://developers.facebook.com/docs/score/
The call to delete all the scores from your facebook App is as follows (may have changed):
https://graph.facebook.com/[APP ID]/scores?access_token=[APP TOKEN]&method=delete
it should return true.